diff options
| author | Boxy <supbscripter@gmail.com> | 2023-05-05 21:42:51 +0100 |
|---|---|---|
| committer | Boxy <supbscripter@gmail.com> | 2023-05-05 21:42:54 +0100 |
| commit | 73b3ce26ecf580aec44e45308e952753f5218e07 (patch) | |
| tree | ff5d8fd4f2caaef008268039953bed147c0f6dd5 /tests/ui/error-codes | |
| parent | 442617c0468018aa88bcee8a8b12da8525352708 (diff) | |
| download | rust-73b3ce26ecf580aec44e45308e952753f5218e07.tar.gz rust-73b3ce26ecf580aec44e45308e952753f5218e07.zip | |
improve diagnostics and bless tests
Diffstat (limited to 'tests/ui/error-codes')
| -rw-r--r-- | tests/ui/error-codes/E0771.rs | 2 | ||||
| -rw-r--r-- | tests/ui/error-codes/E0771.stderr | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/error-codes/E0771.rs b/tests/ui/error-codes/E0771.rs index 67e7d106a1f..c0a2e98a7df 100644 --- a/tests/ui/error-codes/E0771.rs +++ b/tests/ui/error-codes/E0771.rs @@ -1,7 +1,7 @@ #![feature(adt_const_params)] //~^ WARN the feature `adt_const_params` is incomplete -fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0771 +fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0770 fn main() { function_with_str::<"Hello, world!">() diff --git a/tests/ui/error-codes/E0771.stderr b/tests/ui/error-codes/E0771.stderr index b759399a940..9450c61c27b 100644 --- a/tests/ui/error-codes/E0771.stderr +++ b/tests/ui/error-codes/E0771.stderr @@ -1,10 +1,10 @@ -error[E0771]: use of non-static lifetime `'a` in const generic +error[E0770]: the type of const parameters must not depend on other generic parameters --> $DIR/E0771.rs:4:41 | LL | fn function_with_str<'a, const STRING: &'a str>() {} - | ^^ + | ^^ the type must not depend on the parameter `'a` | - = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052> + = note: lifetime parameters may not be used in the type of const parameters warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/E0771.rs:1:12 @@ -17,4 +17,4 @@ LL | #![feature(adt_const_params)] error: aborting due to previous error; 1 warning emitted -For more information about this error, try `rustc --explain E0771`. +For more information about this error, try `rustc --explain E0770`. |
