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