fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
1.0 KiB23 linesraw
1warning: `&` without an explicit lifetime name cannot be used here
2  --> $DIR/infer-placeholder-in-non-suggestable-pos.rs:6:18
3   |
4LL |     const ASSOC: &dyn Fn(_) = 1i32;
5   |                  ^
6   |
7   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8   = note: for more information, see issue #115010 <https://github.com/rust-lang/rust/issues/115010>
9   = note: `#[warn(elided_lifetimes_in_associated_constant)]` on by default
10help: use the `'static` lifetime
11   |
12LL |     const ASSOC: &'static dyn Fn(_) = 1i32;
13   |                   +++++++
14
15error[E0121]: the placeholder `_` is not allowed within types on item signatures for associated constants
16  --> $DIR/infer-placeholder-in-non-suggestable-pos.rs:6:26
17   |
18LL |     const ASSOC: &dyn Fn(_) = 1i32;
19   |                          ^ not allowed in type signatures
20
21error: aborting due to previous error; 1 warning emitted
22
23For more information about this error, try `rustc --explain E0121`.