Skip to content

Commit f2d2fd3

Browse files
committed
Add a regression test
1 parent 9f09a5e commit f2d2fd3

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/test/ui/impl-trait/issue-86465.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#![feature(min_type_alias_impl_trait)]
2+
3+
type X<'a, 'b> = impl std::fmt::Debug;
4+
5+
fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
6+
//~^ ERROR concrete type differs from previous defining opaque type use
7+
(a, a)
8+
}
9+
10+
fn main() {}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: concrete type differs from previous defining opaque type use
2+
--> $DIR/issue-86465.rs:5:1
3+
|
4+
LL | fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&'a u32`, got `&'b u32`
6+
|
7+
note: previous use here
8+
--> $DIR/issue-86465.rs:5:1
9+
|
10+
LL | fn f<'t, 'u>(a: &'t u32, b: &'u u32) -> (X<'t, 'u>, X<'u, 't>) {
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to previous error
14+

0 commit comments

Comments
 (0)