]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-58734.stderr
Merge commit '97e504549371d7640cf011d266e3c17394fdddac' into sync_cg_clif-2021-12-20
[rust.git] / src / test / ui / issues / issue-58734.stderr
1 warning: trait objects without an explicit `dyn` are deprecated
2   --> $DIR/issue-58734.rs:20:5
3    |
4 LL |     Trait::nonexistent(());
5    |     ^^^^^
6    |
7    = note: `#[warn(bare_trait_objects)]` on by default
8    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
10 help: use `dyn`
11    |
12 LL |     <dyn Trait>::nonexistent(());
13    |     ++++      +
14
15 error[E0599]: no function or associated item named `nonexistent` found for trait object `dyn Trait` in the current scope
16   --> $DIR/issue-58734.rs:20:12
17    |
18 LL |     Trait::nonexistent(());
19    |            ^^^^^^^^^^^ function or associated item not found in `dyn Trait`
20
21 error: aborting due to previous error; 1 warning emitted
22
23 For more information about this error, try `rustc --explain E0599`.