]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs
Auto merge of #84039 - jyn514:uplift-atomic-ordering, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / never_reveal_concrete_type.rs
1 #![feature(type_alias_impl_trait)]
2
3 fn main() {}
4
5 // don't reveal the concrete type
6 type NoReveal = impl std::fmt::Debug;
7
8 fn define_no_reveal() -> NoReveal {
9     ""
10 }
11
12 fn no_reveal(x: NoReveal) {
13     let _: &'static str = x; //~ mismatched types
14     let _ = x as &'static str; //~ non-primitive cast
15 }