From e4d9bc66f65fd3d206587c07e33c4877fda073f9 Mon Sep 17 00:00:00 2001 From: b-naber Date: Thu, 18 Feb 2021 21:01:44 +0100 Subject: improve diagnosts for GATs --- src/test/ui/error-codes/E0107.rs | 6 +++--- src/test/ui/error-codes/E0107.stderr | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/test/ui/error-codes') diff --git a/src/test/ui/error-codes/E0107.rs b/src/test/ui/error-codes/E0107.rs index c3dde72599b..f7f6afa860e 100644 --- a/src/test/ui/error-codes/E0107.rs +++ b/src/test/ui/error-codes/E0107.rs @@ -9,15 +9,15 @@ enum Bar { struct Baz<'a, 'b, 'c> { buzz: Buzz<'a>, - //~^ ERROR this struct takes 2 lifetime arguments but only 1 lifetime argument was supplied + //~^ ERROR this struct takes 2 lifetime arguments //~| HELP add missing lifetime argument bar: Bar<'a>, - //~^ ERROR this enum takes 0 lifetime arguments but 1 lifetime argument was supplied + //~^ ERROR this enum takes 0 lifetime arguments //~| HELP remove these generics foo2: Foo<'a, 'b, 'c>, - //~^ ERROR this struct takes 1 lifetime argument but 3 lifetime arguments were supplied + //~^ ERROR this struct takes 1 lifetime argument //~| HELP remove these lifetime arguments } diff --git a/src/test/ui/error-codes/E0107.stderr b/src/test/ui/error-codes/E0107.stderr index 30a2768d060..299776b08f2 100644 --- a/src/test/ui/error-codes/E0107.stderr +++ b/src/test/ui/error-codes/E0107.stderr @@ -1,4 +1,4 @@ -error[E0107]: this struct takes 2 lifetime arguments but only 1 lifetime argument was supplied +error[E0107]: this struct takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/E0107.rs:11:11 | LL | buzz: Buzz<'a>, @@ -13,7 +13,7 @@ LL | struct Buzz<'a, 'b>(&'a str, &'b str); | ^^^^ -- -- help: add missing lifetime argument | -LL | buzz: Buzz<'a, 'b>, +LL | buzz: Buzz<'a, 'a>, | ^^^^ error[E0107]: this enum takes 0 lifetime arguments but 1 lifetime argument was supplied @@ -34,7 +34,7 @@ error[E0107]: this struct takes 1 lifetime argument but 3 lifetime arguments wer --> $DIR/E0107.rs:19:11 | LL | foo2: Foo<'a, 'b, 'c>, - | ^^^ -------- help: remove these lifetime arguments + | ^^^ ------ help: remove these lifetime arguments | | | expected 1 lifetime argument | -- cgit 1.4.1-3-g733a5