Suggest to add missing feature when using gated const features

This commit is contained in:
mibac138 2020-05-04 23:33:10 +02:00
parent d626e4dadc
commit 73867365a8
15 changed files with 70 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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