]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generic-associated-types/gat-trait-path-parenthesised-args.stderr
Rollup merge of #85174 - GuillaumeGomez:doc-code-block-border-radius, r=jsha
[rust.git] / src / test / ui / generic-associated-types / gat-trait-path-parenthesised-args.stderr
1 error: lifetime in trait object type must be followed by `+`
2   --> $DIR/gat-trait-path-parenthesised-args.rs:8: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:8: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:8: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    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
30    = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>
31
32 error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
33   --> $DIR/gat-trait-path-parenthesised-args.rs:8:27
34    |
35 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
36    |                           ^ expected 1 lifetime argument
37    |
38 note: associated type defined here, with 1 lifetime parameter: `'a`
39   --> $DIR/gat-trait-path-parenthesised-args.rs:5:8
40    |
41 LL |   type Y<'a>;
42    |        ^ --
43 help: add missing lifetime argument
44    |
45 LL | fn foo<'a>(arg: Box<dyn X<Y('a, 'a) = &'a ()>>) {}
46    |                             ^^^
47
48 error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
49   --> $DIR/gat-trait-path-parenthesised-args.rs:8:27
50    |
51 LL | fn foo<'a>(arg: Box<dyn X<Y('a) = &'a ()>>) {}
52    |                           ^-------------- help: remove these generics
53    |                           |
54    |                           expected 0 generic arguments
55    |
56 note: associated type defined here, with 0 generic parameters
57   --> $DIR/gat-trait-path-parenthesised-args.rs:5:8
58    |
59 LL |   type Y<'a>;
60    |        ^
61
62 error: aborting due to 4 previous errors; 2 warnings emitted
63
64 For more information about this error, try `rustc --explain E0107`.