Add a regression test

This commit is contained in:
Oli Scherer 2021-07-20 15:16:41 +00:00
parent 9f09a5eb8b
commit f2d2fd38eb
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,10 @@
#![feature(min_type_alias_impl_trait)]
type X<'a, 'b> = impl std::fmt::Debug;
fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
//~^ ERROR concrete type differs from previous defining opaque type use
(a, a)
}
fn main() {}

View File

@ -0,0 +1,14 @@
error: concrete type differs from previous defining opaque type use
--> $DIR/issue-86465.rs:5:1
|
LL | fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&'a u32`, got `&'b u32`
|
note: previous use here
--> $DIR/issue-86465.rs:5:1
|
LL | fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error