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 20, 2021
1 parent b3aca47 commit 713044c
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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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 713044c

Please sign in to comment.