Add auto trait leakage TAIT test
This commit is contained in:
parent
7b0e554ee2
commit
5ac46d7bd8
1 changed files with 18 additions and 0 deletions
18
src/test/ui/type-alias-impl-trait/auto-trait-leakage.rs
Normal file
18
src/test/ui/type-alias-impl-trait/auto-trait-leakage.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// check-pass
|
||||
|
||||
#![feature(type_alias_impl_trait)]
|
||||
#![allow(dead_code)]
|
||||
|
||||
mod m {
|
||||
type Foo = impl std::fmt::Debug;
|
||||
|
||||
pub fn foo() -> Foo {
|
||||
22_u32
|
||||
}
|
||||
}
|
||||
|
||||
fn is_send<T: Send>(_: T) {}
|
||||
|
||||
fn main() {
|
||||
is_send(m::foo());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue