]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs
Auto merge of #82980 - tmiasko:import-cold-multiplier, r=michaelwoerister
[rust.git] / src / test / ui / type-alias-impl-trait / never_reveal_concrete_type.rs
1 // revisions: min_tait full_tait
2 #![feature(min_type_alias_impl_trait)]
3 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
4 //[full_tait]~^ WARN incomplete
5
6 fn main() {}
7
8 // don't reveal the concrete type
9 type NoReveal = impl std::fmt::Debug;
10
11 fn define_no_reveal() -> NoReveal {
12     ""
13 }
14
15 fn no_reveal(x: NoReveal) {
16     let _: &'static str = x; //~ mismatched types
17     let _ = x as &'static str; //~ non-primitive cast
18 }