diff options
| author | mibac138 <5672750+mibac138@users.noreply.github.com> | 2020-05-04 23:33:10 +0200 |
|---|---|---|
| committer | mibac138 <5672750+mibac138@users.noreply.github.com> | 2020-05-04 23:47:00 +0200 |
| commit | 73867365a8dbeb5a2ad8c2de61b4f74faeb34ece (patch) | |
| tree | ba953ad772423dc09d7554d6a1e53fd14150f865 /src/test/ui/error-codes | |
| parent | d626e4dadc37d7027d65f087da0ad1ddb460959f (diff) | |
| download | rust-73867365a8dbeb5a2ad8c2de61b4f74faeb34ece.tar.gz rust-73867365a8dbeb5a2ad8c2de61b4f74faeb34ece.zip | |
Suggest to add missing feature when using gated const features
Diffstat (limited to 'src/test/ui/error-codes')
| -rw-r--r-- | src/test/ui/error-codes/E0010-teach.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0010.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0017.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/error-codes/E0388.stderr | 2 |
4 files changed, 7 insertions, 0 deletions
diff --git a/src/test/ui/error-codes/E0010-teach.stderr b/src/test/ui/error-codes/E0010-teach.stderr index 4c9d140692a..c15ab5c655a 100644 --- a/src/test/ui/error-codes/E0010-teach.stderr +++ b/src/test/ui/error-codes/E0010-teach.stderr @@ -12,6 +12,7 @@ error[E0019]: constant contains unimplemented expression type LL | const CON : Box<i32> = box 0; | ^ | + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable = note: A function call isn't allowed in the const's initialization expression because the expression's value must be known at compile-time. = note: Remember: you can't use a function call inside a const's initialization expression! However, you can use it anywhere else. diff --git a/src/test/ui/error-codes/E0010.stderr b/src/test/ui/error-codes/E0010.stderr index 48472d8acda..f49fb9c4632 100644 --- a/src/test/ui/error-codes/E0010.stderr +++ b/src/test/ui/error-codes/E0010.stderr @@ -9,6 +9,8 @@ error[E0019]: constant contains unimplemented expression type | LL | const CON : Box<i32> = box 0; | ^ + | + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable error: aborting due to 2 previous errors diff --git a/src/test/ui/error-codes/E0017.stderr b/src/test/ui/error-codes/E0017.stderr index 2e687c18ed3..f959ad0d008 100644 --- a/src/test/ui/error-codes/E0017.stderr +++ b/src/test/ui/error-codes/E0017.stderr @@ -12,6 +12,8 @@ error[E0019]: static contains unimplemented expression type | LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ + | + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable error[E0658]: references in statics may only refer to immutable values --> $DIR/E0017.rs:6:39 diff --git a/src/test/ui/error-codes/E0388.stderr b/src/test/ui/error-codes/E0388.stderr index 52822ebdd9e..8bdfbac3681 100644 --- a/src/test/ui/error-codes/E0388.stderr +++ b/src/test/ui/error-codes/E0388.stderr @@ -12,6 +12,8 @@ error[E0019]: static contains unimplemented expression type | LL | static STATIC_REF: &'static mut i32 = &mut X; | ^^^^^^ + | + = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable error[E0658]: references in statics may only refer to immutable values --> $DIR/E0388.rs:5:39 |
