about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorjackh726 <jack.huey@umassmed.edu>2021-11-05 21:33:14 -0400
committerjackh726 <jack.huey@umassmed.edu>2021-11-05 21:33:14 -0400
commitb6edcbd7b5db718ff5e8ba229812b35f803ddd7a (patch)
tree95fe5883fce6ff6516f961712bc4ee0670edc445 /src
parentef5e31ac06716e2fd5c5f0dc0991b3760dc0c3ae (diff)
downloadrust-b6edcbd7b5db718ff5e8ba229812b35f803ddd7a.tar.gz
rust-b6edcbd7b5db718ff5e8ba229812b35f803ddd7a.zip
Review comments
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/generic-associated-types/self-outlives-lint.rs2
-rw-r--r--src/test/ui/generic-associated-types/self-outlives-lint.stderr16
2 files changed, 10 insertions, 8 deletions
diff --git a/src/test/ui/generic-associated-types/self-outlives-lint.rs b/src/test/ui/generic-associated-types/self-outlives-lint.rs
index 4de850384e7..af90d158855 100644
--- a/src/test/ui/generic-associated-types/self-outlives-lint.rs
+++ b/src/test/ui/generic-associated-types/self-outlives-lint.rs
@@ -109,6 +109,7 @@ trait NoGat<'a> {
 }
 
 // Lifetime is not on function; except `Self: 'a`
+// FIXME: we require two bounds (`where Self: 'a, Self: 'b`) when we should only require one
 trait TraitLifetime<'a> {
     type Bar<'b>;
     //~^ Missing required bounds
@@ -116,6 +117,7 @@ trait TraitLifetime<'a> {
 }
 
 // Like above, but we have a where clause that can prove what we want
+// FIXME: we require two bounds (`where Self: 'a, Self: 'b`) when we should only require one
 trait TraitLifetimeWhere<'a> where Self: 'a {
     type Bar<'b>;
     //~^ Missing required bounds
diff --git a/src/test/ui/generic-associated-types/self-outlives-lint.stderr b/src/test/ui/generic-associated-types/self-outlives-lint.stderr
index df858c27cd3..bf85780f69f 100644
--- a/src/test/ui/generic-associated-types/self-outlives-lint.stderr
+++ b/src/test/ui/generic-associated-types/self-outlives-lint.stderr
@@ -28,7 +28,7 @@ error: Missing required bounds on Out
 LL |     type Out<'x, 'y>;
    |     ^^^^^^^^^^^^^^^^-
    |                     |
-   |                     help: add the required where clauses: `where U: 'y, T: 'x`
+   |                     help: add the required where clauses: `where T: 'x, U: 'y`
 
 error: Missing required bounds on Out
   --> $DIR/self-outlives-lint.rs:61:5
@@ -55,23 +55,23 @@ LL |     type Out<'x, D>;
    |                    help: add the required where clauses: `where D: 'x`
 
 error: Missing required bounds on Bar
-  --> $DIR/self-outlives-lint.rs:113:5
+  --> $DIR/self-outlives-lint.rs:114:5
    |
 LL |     type Bar<'b>;
    |     ^^^^^^^^^^^^-
    |                 |
-   |                 help: add the required where clauses: `where Self: 'b, Self: 'a`
+   |                 help: add the required where clauses: `where Self: 'a, Self: 'b`
 
 error: Missing required bounds on Bar
-  --> $DIR/self-outlives-lint.rs:120:5
+  --> $DIR/self-outlives-lint.rs:122:5
    |
 LL |     type Bar<'b>;
    |     ^^^^^^^^^^^^-
    |                 |
-   |                 help: add the required where clauses: `where Self: 'b, Self: 'a`
+   |                 help: add the required where clauses: `where Self: 'a, Self: 'b`
 
 error: Missing required bounds on Bar
-  --> $DIR/self-outlives-lint.rs:127:5
+  --> $DIR/self-outlives-lint.rs:129:5
    |
 LL |     type Bar<'b>;
    |     ^^^^^^^^^^^^-
@@ -79,7 +79,7 @@ LL |     type Bar<'b>;
    |                 help: add the required where clauses: `where Self: 'b`
 
 error: Missing required bounds on Iterator
-  --> $DIR/self-outlives-lint.rs:141:5
+  --> $DIR/self-outlives-lint.rs:143:5
    |
 LL |     type Iterator<'a>: Iterator<Item = Self::Item<'a>>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
@@ -87,7 +87,7 @@ LL |     type Iterator<'a>: Iterator<Item = Self::Item<'a>>;
    |                                                       help: add the required where clauses: `where Self: 'a`
 
 error: Missing required bounds on Bar
-  --> $DIR/self-outlives-lint.rs:148:5
+  --> $DIR/self-outlives-lint.rs:150:5
    |
 LL |     type Bar<'a, 'b>;
    |     ^^^^^^^^^^^^^^^^-