]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/auto-trait-leakage3.rs
Merge commit '39683d8eb7a32a74bea96ecbf1e87675d3338506' into sync_cg_gcc-2022-03-26
[rust.git] / src / test / ui / type-alias-impl-trait / auto-trait-leakage3.rs
1 #![feature(type_alias_impl_trait)]
2 #![allow(dead_code)]
3
4 // FIXME This should compile, but it currently doesn't
5
6 mod m {
7     type Foo = impl std::fmt::Debug;
8     //~^ ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391]
9
10     pub fn foo() -> Foo {
11         22_u32
12     }
13
14     pub fn bar() {
15         is_send(foo());
16     }
17
18     fn is_send<T: Send>(_: T) {}
19 }
20
21 fn main() {}