Skip to content

Commit

Permalink
Add a regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jul 22, 2021
1 parent 9f09a5e commit f2d2fd3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/ui/impl-trait/issue-86465.rs
@@ -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() {}
14 changes: 14 additions & 0 deletions src/test/ui/impl-trait/issue-86465.stderr
@@ -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

0 comments on commit f2d2fd3

Please sign in to comment.