]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/auto-trait-leakage3.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[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     //~| ERROR: cycle detected when computing type of `m::Foo::{opaque#0}` [E0391]
10
11     pub fn foo() -> Foo {
12         22_u32
13     }
14
15     pub fn bar() {
16         is_send(foo());
17     }
18
19     fn is_send<T: Send>(_: T) {}
20 }
21
22 fn main() {}