Promoteds can contain raw pointers, but these must still only point to immutable allocations
This commit is contained in:
parent
632387f38d
commit
10f439a011
6 changed files with 56 additions and 22 deletions
5
src/test/ui/consts/raw_pointer_promoted.rs
Normal file
5
src/test/ui/consts/raw_pointer_promoted.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// check-pass
|
||||
|
||||
pub const FOO: &'static *const i32 = &(&0 as _);
|
||||
|
||||
fn main() {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue