trait-path-type-error-once-implemented.stderr 1.7 KB
Newer Older
B
b-naber 已提交
1 2
warning: the feature `generic_associated_types` is incomplete and may not be safe to use and/or cause compiler crashes
  --> $DIR/trait-path-type-error-once-implemented.rs:1:12
B
b-naber 已提交
3
   |
B
b-naber 已提交
4 5 6 7 8 9 10
LL | #![feature(generic_associated_types)]
   |            ^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(incomplete_features)]` on by default
   = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information

error[E0107]: this associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
B
b-naber 已提交
11
  --> $DIR/trait-path-type-error-once-implemented.rs:9:29
B
b-naber 已提交
12
   |
B
b-naber 已提交
13 14
LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
   |                             ^ expected 1 lifetime argument
B
b-naber 已提交
15 16 17 18 19 20 21 22
   |
note: associated type defined here, with 1 lifetime parameter: `'a`
  --> $DIR/trait-path-type-error-once-implemented.rs:5:10
   |
LL |     type Y<'a>;
   |          ^ --
help: add missing lifetime argument
   |
B
b-naber 已提交
23 24
LL |   fn f2<'a>(arg : Box<dyn X<Y<'a, 1> = &'a ()>>) {}
   |                               ^^^
B
b-naber 已提交
25

B
b-naber 已提交
26 27 28 29 30 31 32
error[E0107]: this associated type takes 0 generic arguments but 1 generic argument was supplied
  --> $DIR/trait-path-type-error-once-implemented.rs:9:29
   |
LL |   fn f2<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
   |                             ^--- help: remove these generics
   |                             |
   |                             expected 0 generic arguments
B
b-naber 已提交
33
   |
B
b-naber 已提交
34
note: associated type defined here, with 0 generic parameters
B
b-naber 已提交
35 36 37 38
  --> $DIR/trait-path-type-error-once-implemented.rs:5:10
   |
LL |     type Y<'a>;
   |          ^
B
b-naber 已提交
39

B
b-naber 已提交
40
error: aborting due to 2 previous errors; 1 warning emitted
B
b-naber 已提交
41

B
b-naber 已提交
42
For more information about this error, try `rustc --explain E0107`.