Suggest to add missing feature when using gated const features
This commit is contained in:
parent
d626e4dadc
commit
73867365a8
15 changed files with 70 additions and 0 deletions
|
|
@ -3,6 +3,8 @@ error[E0019]: static contains unimplemented expression type
|
|||
|
|
||||
LL | *FOO.0.get() = 5;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ error[E0019]: static contains unimplemented expression type
|
|||
|
|
||||
LL | *FOO.0.get() = 5;
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error[E0015]: calls in statics are limited to constant functions, tuple structs and tuple variants
|
||||
--> $DIR/mod-static-with-const-fn.rs:21:5
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ error[E0019]: constant function contains unimplemented expression type
|
|||
|
|
||||
LL | self.state = x;
|
||||
| ^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: references in constants may only refer to immutable values
|
||||
--> $DIR/const_let_assign3.rs:16:5
|
||||
|
|
@ -27,6 +29,8 @@ error[E0019]: constant contains unimplemented expression type
|
|||
|
|
||||
LL | *y = 42;
|
||||
| ^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ error[E0019]: constant contains unimplemented expression type
|
|||
|
|
||||
LL | unsafe { *b = 5; }
|
||||
| ^^^^^^
|
||||
|
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@ error[E0019]: static contains unimplemented expression type
|
|||
|
|
||||
LL | pub static mut STDERR_BUFFER: () = unsafe { *(&mut STDERR_BUFFER_SPACE) = 42; };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue