diff options
| author | b-naber <bn263@gmx.de> | 2021-02-18 21:01:44 +0100 |
|---|---|---|
| committer | b-naber <bn263@gmx.de> | 2021-05-11 14:09:46 +0200 |
| commit | e4d9bc66f65fd3d206587c07e33c4877fda073f9 (patch) | |
| tree | 1cbfff1dc8de7fd37b9c550e063d9e6256599676 /src/test/ui/methods | |
| parent | fe62c6e2958abfe54a9410a24a5750baf4c157e0 (diff) | |
| download | rust-e4d9bc66f65fd3d206587c07e33c4877fda073f9.tar.gz rust-e4d9bc66f65fd3d206587c07e33c4877fda073f9.zip | |
improve diagnosts for GATs
Diffstat (limited to 'src/test/ui/methods')
| -rw-r--r-- | src/test/ui/methods/method-call-lifetime-args-fail.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/methods/method-call-lifetime-args-fail.stderr | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/test/ui/methods/method-call-lifetime-args-fail.rs b/src/test/ui/methods/method-call-lifetime-args-fail.rs index af173851252..6bf55844da8 100644 --- a/src/test/ui/methods/method-call-lifetime-args-fail.rs +++ b/src/test/ui/methods/method-call-lifetime-args-fail.rs @@ -14,7 +14,7 @@ impl S { fn method_call() { S.early(); // OK S.early::<'static>(); - //~^ ERROR this associated function takes 2 lifetime arguments but only 1 lifetime argument was supplied + //~^ ERROR this associated function takes 2 lifetime arguments but 1 lifetime argument S.early::<'static, 'static, 'static>(); //~^ ERROR this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied let _: &u8 = S.life_and_type::<'static>(); @@ -61,7 +61,7 @@ fn ufcs() { S::early(S); // OK S::early::<'static>(S); - //~^ ERROR this associated function takes 2 lifetime arguments but only 1 lifetime argument was supplied + //~^ ERROR this associated function takes 2 lifetime arguments but 1 lifetime argument S::early::<'static, 'static, 'static>(S); //~^ ERROR this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied let _: &u8 = S::life_and_type::<'static>(S); diff --git a/src/test/ui/methods/method-call-lifetime-args-fail.stderr b/src/test/ui/methods/method-call-lifetime-args-fail.stderr index 2907309c27c..ea50815ec1a 100644 --- a/src/test/ui/methods/method-call-lifetime-args-fail.stderr +++ b/src/test/ui/methods/method-call-lifetime-args-fail.stderr @@ -1,4 +1,4 @@ -error[E0107]: this associated function takes 2 lifetime arguments but only 1 lifetime argument was supplied +error[E0107]: this associated function takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/method-call-lifetime-args-fail.rs:16:7 | LL | S.early::<'static>(); @@ -20,7 +20,7 @@ error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime --> $DIR/method-call-lifetime-args-fail.rs:18:7 | LL | S.early::<'static, 'static, 'static>(); - | ^^^^^ --------- help: remove this lifetime argument + | ^^^^^ ------- help: remove this lifetime argument | | | expected 2 lifetime arguments | @@ -198,7 +198,7 @@ note: the late bound lifetime parameter is introduced here LL | fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} } | ^^ -error[E0107]: this associated function takes 2 lifetime arguments but only 1 lifetime argument was supplied +error[E0107]: this associated function takes 2 lifetime arguments but 1 lifetime argument was supplied --> $DIR/method-call-lifetime-args-fail.rs:63:8 | LL | S::early::<'static>(S); @@ -220,7 +220,7 @@ error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime --> $DIR/method-call-lifetime-args-fail.rs:65:8 | LL | S::early::<'static, 'static, 'static>(S); - | ^^^^^ --------- help: remove this lifetime argument + | ^^^^^ ------- help: remove this lifetime argument | | | expected 2 lifetime arguments | |
