Add a regression test for #117310
This commit is contained in:
parent
c3b05c6e5b
commit
37dbe40a7e
@ -0,0 +1,28 @@
|
||||
//@ check-pass
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
trait Trait {}
|
||||
impl<A, B> Trait for (A, B, u8) where A: Deref, B: Deref<Target = A::Target>, {}
|
||||
impl<A, B> Trait for (A, B, i8) {}
|
||||
|
||||
type TaitSized = impl Sized;
|
||||
fn def_tait1() -> TaitSized {}
|
||||
|
||||
type TaitCopy = impl Copy;
|
||||
fn def_tait2() -> TaitCopy {}
|
||||
|
||||
fn impl_trait<T: Trait> () {}
|
||||
|
||||
fn test() {
|
||||
impl_trait::<(&TaitSized, &TaitCopy, _)>();
|
||||
impl_trait::<(&TaitCopy, &TaitSized, _)>();
|
||||
|
||||
impl_trait::<(&TaitCopy, &String, _)>();
|
||||
impl_trait::<(&TaitSized, &String, _)>();
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user