83 lines
3.0 KiB
Plaintext
83 lines
3.0 KiB
Plaintext
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:9:1
|
||
|
|
|
||
|
LL | static REF: &AtomicI32 = &AtomicI32::new(42);
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:10:1
|
||
|
|
|
||
|
LL | static REFMUT: &mut i32 = &mut 0;
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:13:1
|
||
|
|
|
||
|
LL | static REF2: &AtomicI32 = {let x = AtomicI32::new(42); &{x}};
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:14:1
|
||
|
|
|
||
|
LL | static REFMUT2: &mut i32 = {let mut x = 0; &mut {x}};
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:29:1
|
||
|
|
|
||
|
LL | static RAW_SYNC: SyncPtr<AtomicI32> = SyncPtr { x: &AtomicI32::new(42) };
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:31:1
|
||
|
|
|
||
|
LL | static RAW_MUT_CAST: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
error: encountered mutable pointer in final value of static
|
||
|
--> $DIR/static-no-inner-mut.rs:33:1
|
||
|
|
|
||
|
LL | static RAW_MUT_COERCE: SyncPtr<i32> = SyncPtr { x: &mut 0 };
|
||
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||
|
|
||
|
warning: skipping const checks
|
||
|
|
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:9:26
|
||
|
|
|
||
|
LL | static REF: &AtomicI32 = &AtomicI32::new(42);
|
||
|
| ^^^^^^^^^^^^^^^^^^^
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:10:27
|
||
|
|
|
||
|
LL | static REFMUT: &mut i32 = &mut 0;
|
||
|
| ^^^^^^
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:13:56
|
||
|
|
|
||
|
LL | static REF2: &AtomicI32 = {let x = AtomicI32::new(42); &{x}};
|
||
|
| ^^^^
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:14:44
|
||
|
|
|
||
|
LL | static REFMUT2: &mut i32 = {let mut x = 0; &mut {x}};
|
||
|
| ^^^^^^^^
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:29:52
|
||
|
|
|
||
|
LL | static RAW_SYNC: SyncPtr<AtomicI32> = SyncPtr { x: &AtomicI32::new(42) };
|
||
|
| ^^^^^^^^^^^^^^^^^^^
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:31:51
|
||
|
|
|
||
|
LL | static RAW_MUT_CAST: SyncPtr<i32> = SyncPtr { x : &mut 42 as *mut _ as *const _ };
|
||
|
| ^^^^^^^
|
||
|
help: skipping check that does not even have a feature gate
|
||
|
--> $DIR/static-no-inner-mut.rs:33:52
|
||
|
|
|
||
|
LL | static RAW_MUT_COERCE: SyncPtr<i32> = SyncPtr { x: &mut 0 };
|
||
|
| ^^^^^^
|
||
|
|
||
|
error: aborting due to 7 previous errors; 1 warning emitted
|
||
|
|