]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/never_reveal_concrete_type.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / never_reveal_concrete_type.rs
CommitLineData
6a06907d
XL
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
94b46f34 5
8faf50e0 6fn main() {}
94b46f34 7
8faf50e0 8// don't reveal the concrete type
416331ca 9type NoReveal = impl std::fmt::Debug;
94b46f34 10
8faf50e0
XL
11fn define_no_reveal() -> NoReveal {
12 ""
94b46f34 13}
0531ce1d 14
8faf50e0
XL
15fn no_reveal(x: NoReveal) {
16 let _: &'static str = x; //~ mismatched types
17 let _ = x as &'static str; //~ non-primitive cast
18}