]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/auto-trait-leakage2.rs
unboxed-closures and type-alias-impl-trait nll revisions
[rust.git] / src / test / ui / type-alias-impl-trait / auto-trait-leakage2.rs
1 #![feature(type_alias_impl_trait)]
2 #![allow(dead_code)]
3
4 mod m {
5     use std::rc::Rc;
6
7     type Foo = impl std::fmt::Debug;
8
9     pub fn foo() -> Foo {
10         Rc::new(22_u32)
11     }
12 }
13
14 fn is_send<T: Send>(_: T) {}
15
16 fn main() {
17     is_send(m::foo());
18     //~^ ERROR: `Rc<u32>` cannot be sent between threads safely [E0277]
19 }