mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Add a regression test
This commit is contained in:
parent
9f09a5eb8b
commit
f2d2fd38eb
10
src/test/ui/impl-trait/issue-86465.rs
Normal file
10
src/test/ui/impl-trait/issue-86465.rs
Normal 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() {}
|
14
src/test/ui/impl-trait/issue-86465.stderr
Normal file
14
src/test/ui/impl-trait/issue-86465.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user