about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr13
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr22
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_a.stderr6
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_b.stderr6
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr12
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr22
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr22
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr6
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr22
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr13
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr6
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_x.stderr6
-rw-r--r--src/test/ui/hr-subtype/hr-subtype.rs20
-rw-r--r--src/test/ui/lub-glb/old-lub-glb-hr.rs9
-rw-r--r--src/test/ui/lub-glb/old-lub-glb-hr.stderr17
-rw-r--r--src/test/ui/regions-fn-subtyping-return-static-fail.rs9
-rw-r--r--src/test/ui/regions-fn-subtyping-return-static-fail.stderr28
-rw-r--r--src/test/ui/regions/regions-fn-subtyping-return-static.rs5
-rw-r--r--src/test/ui/regions/regions-fn-subtyping-return-static.stderr30
19 files changed, 137 insertions, 137 deletions
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
index 8e2b0b8c600..4069e3b25ad 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_ret_a_vs_bound_a_ret_a.stderr
@@ -1,16 +1,19 @@
-error[E0308]: mismatched types
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in generic type due to conflicting requirements
   --> $DIR/hr-subtype.rs:39:26
    |
 LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
+   |                            ^^^^^^^^^^^
 ...
 LL | / check! { bound_a_b_ret_a_vs_bound_a_ret_a: (for<'a,'b> fn(&'a u32, &'b u32) -> &'a u32,
 LL | |                                             for<'a>    fn(&'a u32, &'a u32) -> &'a u32) }
    | |_________________________________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32>`
-              found type `std::option::Option<for<'a> fn(&'a u32, &'a u32) -> &'a u32>`
+   = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:26), 'b) })...
+   = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:25), 'a) })...
+   = note: ...so that the expression is assignable:
+           expected std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32) -> &'a u32>
+              found std::option::Option<for<'a> fn(&'a u32, &'a u32) -> &'a u32>
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
index dbb50181390..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_b_vs_bound_a.stderr
@@ -1,16 +1,14 @@
-error[E0308]: mismatched types
-  --> $DIR/hr-subtype.rs:39:26
+error: compilation successful
+  --> $DIR/hr-subtype.rs:96:1
    |
-LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
-...
-LL | / check! { bound_a_b_vs_bound_a: (for<'a,'b> fn(&'a u32, &'b u32),
-LL | |                                 for<'a>    fn(&'a u32, &'a u32)) }
-   | |__________________________________________________________________- in this macro invocation
-   |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(&'a u32, &'b u32)>`
-              found type `std::option::Option<for<'a> fn(&'a u32, &'a u32)>`
+LL | / fn main() {
+LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
+LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
+LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
+LL | | }
+   | |_^
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_a.stderr
index 5fcb63e17bf..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_a.stderr
@@ -1,12 +1,12 @@
 error: compilation successful
-  --> $DIR/hr-subtype.rs:100:1
+  --> $DIR/hr-subtype.rs:96:1
    |
 LL | / fn main() {
 LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
 LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
 LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
-LL | | //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
-LL | | //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
 LL | | }
    | |_^
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_b.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_b.stderr
index 5fcb63e17bf..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_b.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_bound_b.stderr
@@ -1,12 +1,12 @@
 error: compilation successful
-  --> $DIR/hr-subtype.rs:100:1
+  --> $DIR/hr-subtype.rs:96:1
    |
 LL | / fn main() {
 LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
 LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
 LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
-LL | | //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
-LL | | //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
 LL | | }
    | |_^
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
index db9892b48a6..1225842665d 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_a_vs_free_x.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/hr-subtype.rs:39:26
    |
 LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
+   |                            ^^^^^^^^^^^ lifetime mismatch
 ...
 LL | / check! { bound_a_vs_free_x: (for<'a> fn(&'a u32),
 LL | |                              fn(&'x u32)) }
@@ -10,6 +10,16 @@ LL | |                              fn(&'x u32)) }
    |
    = note: expected type `std::option::Option<for<'a> fn(&'a u32)>`
               found type `std::option::Option<fn(&'x u32)>`
+   = note: lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:23), 'a) })...
+note: ...does not necessarily outlive the lifetime 'x as defined on the function body at 48:22
+  --> $DIR/hr-subtype.rs:48:22
+   |
+LL |           fn supertype<'x,'y:'x,'z:'y>() {
+   |                        ^^
+...
+LL | / check! { bound_a_vs_free_x: (for<'a> fn(&'a u32),
+LL | |                              fn(&'x u32)) }
+   | |___________________________________________- in this macro invocation
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
index e9fb73411bd..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_b_vs_bound_co_a.stderr
@@ -1,16 +1,14 @@
-error[E0308]: mismatched types
-  --> $DIR/hr-subtype.rs:39:26
+error: compilation successful
+  --> $DIR/hr-subtype.rs:96:1
    |
-LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
-...
-LL | / check! { bound_co_a_b_vs_bound_co_a: (for<'a,'b> fn(Co<'a>, Co<'b>),
-LL | |                                       for<'a>    fn(Co<'a>, Co<'a>)) }
-   | |______________________________________________________________________- in this macro invocation
-   |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>)>`
-              found type `std::option::Option<for<'a> fn(Co<'a>, Co<'a>)>`
+LL | / fn main() {
+LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
+LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
+LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
+LL | | }
+   | |_^
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
index d0e80faa68e..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_co_b_ret_contra_a.stderr
@@ -1,16 +1,14 @@
-error[E0308]: mismatched types
-  --> $DIR/hr-subtype.rs:39:26
+error: compilation successful
+  --> $DIR/hr-subtype.rs:96:1
    |
-LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
-...
-LL | / check! { bound_co_a_co_b_ret_contra_a: (for<'a,'b> fn(Co<'a>, Co<'b>) -> Contra<'a>,
-LL | |                                         for<'a>    fn(Co<'a>, Co<'a>) -> Contra<'a>) }
-   | |______________________________________________________________________________________- in this macro invocation
-   |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Co<'a>, Co<'b>) -> Contra<'a>>`
-              found type `std::option::Option<for<'a> fn(Co<'a>, Co<'a>) -> Contra<'a>>`
+LL | / fn main() {
+LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
+LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
+LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
+LL | | }
+   | |_^
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr
index 5fcb63e17bf..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_co_a_vs_bound_co_b.stderr
@@ -1,12 +1,12 @@
 error: compilation successful
-  --> $DIR/hr-subtype.rs:100:1
+  --> $DIR/hr-subtype.rs:96:1
    |
 LL | / fn main() {
 LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
 LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
 LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
-LL | | //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
-LL | | //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
 LL | | }
    | |_^
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
index 3605ecf4f86..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_contra_a_contra_b_ret_co_a.stderr
@@ -1,16 +1,14 @@
-error[E0308]: mismatched types
-  --> $DIR/hr-subtype.rs:39:26
+error: compilation successful
+  --> $DIR/hr-subtype.rs:96:1
    |
-LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
-...
-LL | / check! { bound_contra_a_contra_b_ret_co_a: (for<'a,'b> fn(Contra<'a>, Contra<'b>) -> Co<'a>,
-LL | |                                             for<'a>    fn(Contra<'a>, Contra<'a>) -> Co<'a>) }
-   | |______________________________________________________________________________________________- in this macro invocation
-   |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Contra<'a>, Contra<'b>) -> Co<'a>>`
-              found type `std::option::Option<for<'a> fn(Contra<'a>, Contra<'a>) -> Co<'a>>`
+LL | / fn main() {
+LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
+LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
+LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
+LL | | }
+   | |_^
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
index fae6e9b5c89..1a806bd2cb5 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_b_vs_bound_inv_a.stderr
@@ -1,16 +1,19 @@
-error[E0308]: mismatched types
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter 'a in generic type due to conflicting requirements
   --> $DIR/hr-subtype.rs:39:26
    |
 LL |               gimme::<$t1>(None::<$t2>);
-   |                            ^^^^^^^^^^^ expected concrete lifetime, found bound lifetime parameter 'a
+   |                            ^^^^^^^^^^^
 ...
 LL | / check! { bound_inv_a_b_vs_bound_inv_a: (for<'a,'b> fn(Inv<'a>, Inv<'b>),
 LL | |                                         for<'a>    fn(Inv<'a>, Inv<'a>)) }
    | |__________________________________________________________________________- in this macro invocation
    |
-   = note: expected type `std::option::Option<for<'a, 'b> fn(Inv<'a>, Inv<'b>)>`
-              found type `std::option::Option<for<'a> fn(Inv<'a>, Inv<'a>)>`
+   = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:25), 'a) })...
+   = note: ...but the lifetime must also be valid for lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:26), 'b) })...
+   = note: ...so that the expression is assignable:
+           expected std::option::Option<for<'a, 'b> fn(Inv<'a>, Inv<'b>)>
+              found std::option::Option<for<'a> fn(Inv<'a>, Inv<'a>)>
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr
index 5fcb63e17bf..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.bound_inv_a_vs_bound_inv_b.stderr
@@ -1,12 +1,12 @@
 error: compilation successful
-  --> $DIR/hr-subtype.rs:100:1
+  --> $DIR/hr-subtype.rs:96:1
    |
 LL | / fn main() {
 LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
 LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
 LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
-LL | | //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
-LL | | //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
 LL | | }
    | |_^
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_x.stderr b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_x.stderr
index 5fcb63e17bf..25b74d855bb 100644
--- a/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_x.stderr
+++ b/src/test/ui/hr-subtype/hr-subtype.free_x_vs_free_x.stderr
@@ -1,12 +1,12 @@
 error: compilation successful
-  --> $DIR/hr-subtype.rs:100:1
+  --> $DIR/hr-subtype.rs:96:1
    |
 LL | / fn main() {
 LL | | //[bound_a_vs_bound_a]~^ ERROR compilation successful
 LL | | //[bound_a_vs_bound_b]~^^ ERROR compilation successful
 LL | | //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
-LL | | //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
-LL | | //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
+...  |
+LL | | //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
 LL | | }
    | |_^
 
diff --git a/src/test/ui/hr-subtype/hr-subtype.rs b/src/test/ui/hr-subtype/hr-subtype.rs
index 4157953fb90..ad4f39f8405 100644
--- a/src/test/ui/hr-subtype/hr-subtype.rs
+++ b/src/test/ui/hr-subtype/hr-subtype.rs
@@ -31,21 +31,17 @@ macro_rules! check {
         #[cfg($rev)]
         fn subtype<'x,'y:'x,'z:'y>() {
             gimme::<$t2>(None::<$t1>);
-            //[free_inv_x_vs_free_inv_y]~^ ERROR mismatched types
+            //[free_inv_x_vs_free_inv_y]~^ ERROR
         }
 
         #[cfg($rev)]
         fn supertype<'x,'y:'x,'z:'y>() {
             gimme::<$t1>(None::<$t2>);
-            //[bound_a_vs_free_x]~^ ERROR mismatched types
-            //[free_x_vs_free_y]~^^ ERROR mismatched types
-            //[bound_inv_a_b_vs_bound_inv_a]~^^^ ERROR mismatched types
-            //[bound_a_b_ret_a_vs_bound_a_ret_a]~^^^^ ERROR mismatched types
-            //[free_inv_x_vs_free_inv_y]~^^^^^ ERROR mismatched types
-            //[bound_a_b_vs_bound_a]~^^^^^^ ERROR mismatched types
-            //[bound_co_a_b_vs_bound_co_a]~^^^^^^^ ERROR mismatched types
-            //[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^ ERROR mismatched types
-            //[bound_co_a_co_b_ret_contra_a]~^^^^^^^^^ ERROR mismatched types
+            //[bound_a_vs_free_x]~^ ERROR
+            //[free_x_vs_free_y]~^^ ERROR
+            //[bound_inv_a_b_vs_bound_inv_a]~^^^ ERROR
+            //[bound_a_b_ret_a_vs_bound_a_ret_a]~^^^^ ERROR
+            //[free_inv_x_vs_free_inv_y]~^^^^^ ERROR
         }
     }
 }
@@ -103,4 +99,8 @@ fn main() {
 //[bound_inv_a_vs_bound_inv_b]~^^^ ERROR compilation successful
 //[bound_co_a_vs_bound_co_b]~^^^^ ERROR compilation successful
 //[free_x_vs_free_x]~^^^^^ ERROR compilation successful
+//[bound_a_b_vs_bound_a]~^^^^^^ ERROR compilation successful
+//[bound_co_a_co_b_ret_contra_a]~^^^^^^^ ERROR compilation successful
+//[bound_co_a_b_vs_bound_co_a]~^^^^^^^^ ERROR compilation successful
+//[bound_contra_a_contra_b_ret_co_a]~^^^^^^^^^ ERROR compilation successful
 }
diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.rs b/src/test/ui/lub-glb/old-lub-glb-hr.rs
index 04990546776..324dc86bd92 100644
--- a/src/test/ui/lub-glb/old-lub-glb-hr.rs
+++ b/src/test/ui/lub-glb/old-lub-glb-hr.rs
@@ -1,11 +1,16 @@
 // Test that we give a note when the old LUB/GLB algorithm would have
-// succeeded but the new code (which is stricter) gives an error.
+// succeeded but the new code (which requires equality) gives an
+// error. However, now that we handle subtyping correctly, we no
+// longer get an error, because we recognize these two types as
+// equivalent!
+//
+// compile-pass
 
 fn foo(
     x: fn(&u8, &u8),
     y: for<'a> fn(&'a u8, &'a u8),
 ) {
-    let z = match 22 { //~ ERROR incompatible types
+    let z = match 22 {
         0 => x,
         _ => y,
     };
diff --git a/src/test/ui/lub-glb/old-lub-glb-hr.stderr b/src/test/ui/lub-glb/old-lub-glb-hr.stderr
deleted file mode 100644
index 9c397a8fd2c..00000000000
--- a/src/test/ui/lub-glb/old-lub-glb-hr.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0308]: match arms have incompatible types
-  --> $DIR/old-lub-glb-hr.rs:8:13
-   |
-LL |       let z = match 22 { //~ ERROR incompatible types
-   |  _____________^
-LL | |         0 => x,
-LL | |         _ => y,
-   | |              - match arm with an incompatible type
-LL | |     };
-   | |_____^ expected bound lifetime parameter, found concrete lifetime
-   |
-   = note: expected type `for<'r, 's> fn(&'r u8, &'s u8)`
-              found type `for<'a> fn(&'a u8, &'a u8)`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/regions-fn-subtyping-return-static-fail.rs b/src/test/ui/regions-fn-subtyping-return-static-fail.rs
index a8fe562656e..242119cc201 100644
--- a/src/test/ui/regions-fn-subtyping-return-static-fail.rs
+++ b/src/test/ui/regions-fn-subtyping-return-static-fail.rs
@@ -37,8 +37,7 @@ fn baz(x: &S) -> &S {
 fn supply_F() {
     want_F(foo);
 
-    // FIXME(#33684) -- this should be a subtype, but current alg. rejects it incorrectly
-    want_F(bar); //~ ERROR E0308
+    want_F(bar);
 
     want_F(baz);
 }
@@ -46,11 +45,7 @@ fn supply_F() {
 fn supply_G() {
     want_G(foo);
     want_G(bar);
-    want_G(baz);
-    //~^ ERROR mismatched types
-    //~| expected type `for<'cx> fn(&'cx S) -> &'static S`
-    //~| found type `for<'r> fn(&'r S) -> &'r S {baz}`
-    //~| expected concrete lifetime, found bound lifetime parameter 'cx
+    want_G(baz); //~ ERROR
 }
 
 pub fn main() {
diff --git a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr
index 0bf6e0514d2..c9ccb9b6ded 100644
--- a/src/test/ui/regions-fn-subtyping-return-static-fail.stderr
+++ b/src/test/ui/regions-fn-subtyping-return-static-fail.stderr
@@ -1,21 +1,15 @@
-error[E0308]: mismatched types
-  --> $DIR/regions-fn-subtyping-return-static-fail.rs:41:12
+error[E0495]: cannot infer an appropriate lifetime for lifetime parameter in generic type due to conflicting requirements
+  --> $DIR/regions-fn-subtyping-return-static-fail.rs:48:12
    |
-LL |     want_F(bar); //~ ERROR E0308
-   |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
+LL |     want_G(baz); //~ ERROR
+   |            ^^^
    |
-   = note: expected type `for<'cx> fn(&'cx S) -> &'cx S`
-              found type `for<'a> fn(&'a S) -> &S {bar::<'_>}`
+   = note: first, the lifetime cannot outlive lifetime RePlaceholder(Placeholder { universe: U3, name: BrNamed(crate0:DefIndex(1:11), 'cx) })...
+   = note: ...but the lifetime must also be valid for the static lifetime...
+   = note: ...so that the expression is assignable:
+           expected for<'cx> fn(&'cx S) -> &'static S
+              found for<'r> fn(&'r S) -> &'r S
 
-error[E0308]: mismatched types
-  --> $DIR/regions-fn-subtyping-return-static-fail.rs:49:12
-   |
-LL |     want_G(baz);
-   |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
-   |
-   = note: expected type `for<'cx> fn(&'cx S) -> &'static S`
-              found type `for<'r> fn(&'r S) -> &'r S {baz}`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0495`.
diff --git a/src/test/ui/regions/regions-fn-subtyping-return-static.rs b/src/test/ui/regions/regions-fn-subtyping-return-static.rs
index fa5f6a334b0..4d6d342f571 100644
--- a/src/test/ui/regions/regions-fn-subtyping-return-static.rs
+++ b/src/test/ui/regions/regions-fn-subtyping-return-static.rs
@@ -5,6 +5,8 @@
 // *ANY* lifetime and returns a reference with the 'static lifetime.
 // This can safely be considered to be an instance of `F` because all
 // lifetimes are sublifetimes of 'static.
+//
+// compile-pass
 
 #![allow(dead_code)]
 #![allow(unused_variables)]
@@ -37,8 +39,7 @@ fn baz(x: &S) -> &S {
 fn supply_F() {
     want_F(foo);
 
-    // FIXME(#33684) -- this should be a subtype, but current alg. rejects it incorrectly
-    want_F(bar); //~ ERROR E0308
+    want_F(bar);
 
     want_F(baz);
 }
diff --git a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr
index 30646fe7965..61eaf9fcf10 100644
--- a/src/test/ui/regions/regions-fn-subtyping-return-static.stderr
+++ b/src/test/ui/regions/regions-fn-subtyping-return-static.stderr
@@ -1,12 +1,26 @@
-error[E0308]: mismatched types
-  --> $DIR/regions-fn-subtyping-return-static.rs:41:12
+warning: function `want_F` should have a snake case name such as `want_f`
+  --> $DIR/regions-fn-subtyping-return-static.rs:18:1
    |
-LL |     want_F(bar); //~ ERROR E0308
-   |            ^^^ expected concrete lifetime, found bound lifetime parameter 'cx
+LL | fn want_F(f: F) { }
+   | ^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected type `for<'cx> fn(&'cx S) -> &'cx S`
-              found type `for<'a> fn(&'a S) -> &S {bar::<'_>}`
+   = note: #[warn(non_snake_case)] on by default
 
-error: aborting due to previous error
+warning: function `want_G` should have a snake case name such as `want_g`
+  --> $DIR/regions-fn-subtyping-return-static.rs:22:1
+   |
+LL | fn want_G(f: G) { }
+   | ^^^^^^^^^^^^^^^^^^^
+
+warning: function `supply_F` should have a snake case name such as `supply_f`
+  --> $DIR/regions-fn-subtyping-return-static.rs:39:1
+   |
+LL | / fn supply_F() {
+LL | |     want_F(foo);
+LL | |
+LL | |     want_F(bar);
+LL | |
+LL | |     want_F(baz);
+LL | | }
+   | |_^
 
-For more information about this error, try `rustc --explain E0308`.