|
| 1 | +error: lifetime in trait object type must be followed by `+` |
| 2 | + --> $DIR/gat-trait-path-parenthesised-args.rs:10:29 |
| 3 | + | |
| 4 | +LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} |
| 5 | + | ^^ |
| 6 | + |
| 7 | +error: parenthesized generic arguments cannot be used in associated type constraints |
| 8 | + --> $DIR/gat-trait-path-parenthesised-args.rs:10:27 |
| 9 | + | |
| 10 | +LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} |
| 11 | + | ^^^^^ |
| 12 | + |
| 13 | +warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes |
| 14 | + --> $DIR/gat-trait-path-parenthesised-args.rs:1:12 |
| 15 | + | |
| 16 | +LL | #![feature(generic_associated_types)] |
| 17 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 18 | + | |
| 19 | + = note: `#[warn(incomplete_features)]` on by default |
| 20 | + = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information |
| 21 | + |
| 22 | +warning: trait objects without an explicit `dyn` are deprecated |
| 23 | + --> $DIR/gat-trait-path-parenthesised-args.rs:10:29 |
| 24 | + | |
| 25 | +LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} |
| 26 | + | ^^ help: use `dyn`: `dyn 'a` |
| 27 | + | |
| 28 | + = note: `#[warn(bare_trait_objects)]` on by default |
| 29 | + |
| 30 | +error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied |
| 31 | + --> $DIR/gat-trait-path-parenthesised-args.rs:5:8 |
| 32 | + | |
| 33 | +LL | type Y<'a>; |
| 34 | + | ^ expected 1 lifetime argument |
| 35 | + | |
| 36 | +note: associated type defined here, with 1 lifetime parameter: `'a` |
| 37 | + --> $DIR/gat-trait-path-parenthesised-args.rs:5:8 |
| 38 | + | |
| 39 | +LL | type Y<'a>; |
| 40 | + | ^ -- |
| 41 | +help: add missing lifetime argument |
| 42 | + | |
| 43 | +LL | fn foo<'a>(arg: Box<dyn X<Y('a'a) = &'a ()>>) {} |
| 44 | + | ^^ |
| 45 | + |
| 46 | +error[E0107]: this associated type takes 0 type arguments but 1 type argument was supplied |
| 47 | + --> $DIR/gat-trait-path-parenthesised-args.rs:5:8 |
| 48 | + | |
| 49 | +LL | type Y<'a>; |
| 50 | + | ________^- |
| 51 | + | | | |
| 52 | + | | expected 0 type arguments |
| 53 | +LL | | |
| 54 | +LL | | |
| 55 | +LL | | } |
| 56 | +LL | | |
| 57 | +LL | | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {} |
| 58 | + | |_________________________________________- help: remove these generics |
| 59 | + | |
| 60 | +note: associated type defined here, with 0 type parameters |
| 61 | + --> $DIR/gat-trait-path-parenthesised-args.rs:5:8 |
| 62 | + | |
| 63 | +LL | type Y<'a>; |
| 64 | + | ^ |
| 65 | + |
| 66 | +error: aborting due to 4 previous errors; 2 warnings emitted |
| 67 | + |
| 68 | +For more information about this error, try `rustc --explain E0107`. |
0 commit comments