]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-86756.stderr
Rollup merge of #100861 - RalfJung:const-ice, r=oli-obk
[rust.git] / src / test / ui / issues / issue-86756.stderr
1 error[E0403]: the name `T` is already used for a generic parameter in this item's generic parameters
2   --> $DIR/issue-86756.rs:1:14
3    |
4 LL | trait Foo<T, T = T> {}
5    |           -  ^ already used
6    |           |
7    |           first use of `T`
8
9 error[E0412]: cannot find type `dyn` in this scope
10   --> $DIR/issue-86756.rs:5:10
11    |
12 LL | fn eq<A, B>() {
13    |           - help: you might be missing a type parameter: `, dyn`
14 LL |     eq::<dyn, Foo>
15    |          ^^^ not found in this scope
16
17 warning: trait objects without an explicit `dyn` are deprecated
18   --> $DIR/issue-86756.rs:5:15
19    |
20 LL |     eq::<dyn, Foo>
21    |               ^^^
22    |
23    = note: `#[warn(bare_trait_objects)]` on by default
24    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
25    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
26 help: use `dyn`
27    |
28 LL -     eq::<dyn, Foo>
29 LL +     eq::<dyn, dyn Foo>
30    |
31
32 error[E0107]: missing generics for trait `Foo`
33   --> $DIR/issue-86756.rs:5:15
34    |
35 LL |     eq::<dyn, Foo>
36    |               ^^^ expected at least 1 generic argument
37    |
38 note: trait defined here, with at least 1 generic parameter: `T`
39   --> $DIR/issue-86756.rs:1:7
40    |
41 LL | trait Foo<T, T = T> {}
42    |       ^^^ -
43 help: add missing generic argument
44    |
45 LL |     eq::<dyn, Foo<T>>
46    |               ~~~~~~
47
48 error: aborting due to 3 previous errors; 1 warning emitted
49
50 Some errors have detailed explanations: E0107, E0403, E0412.
51 For more information about an error, try `rustc --explain E0107`.