diff options
Diffstat (limited to 'tests/ui/generic-associated-types/elided-in-expr-position.stderr')
-rw-r--r-- | tests/ui/generic-associated-types/elided-in-expr-position.stderr | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/elided-in-expr-position.stderr b/tests/ui/generic-associated-types/elided-in-expr-position.stderr new file mode 100644 index 000000000..842b23bd4 --- /dev/null +++ b/tests/ui/generic-associated-types/elided-in-expr-position.stderr @@ -0,0 +1,35 @@ +error[E0107]: missing generics for associated type `Trait::Assoc` + --> $DIR/elided-in-expr-position.rs:9:26 + | +LL | fn g(&self) -> Self::Assoc; + | ^^^^^ expected 1 lifetime argument + | +note: associated type defined here, with 1 lifetime parameter: `'a` + --> $DIR/elided-in-expr-position.rs:4:10 + | +LL | type Assoc<'a> where Self: 'a; + | ^^^^^ -- +help: add missing lifetime argument + | +LL | fn g(&self) -> Self::Assoc<'_>; + | ++++ + +error[E0107]: missing generics for associated type `Trait::Assoc` + --> $DIR/elided-in-expr-position.rs:31:26 + | +LL | fn g(&self) -> Self::Assoc { + | ^^^^^ expected 1 lifetime argument + | +note: associated type defined here, with 1 lifetime parameter: `'a` + --> $DIR/elided-in-expr-position.rs:4:10 + | +LL | type Assoc<'a> where Self: 'a; + | ^^^^^ -- +help: add missing lifetime argument + | +LL | fn g(&self) -> Self::Assoc<'_> { + | ++++ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0107`. |