]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / 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() {}