rust/tests/ui/issues/issue-28828.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
234 B
Rust
Raw Normal View History

// run-pass
pub trait Foo {
type Out;
}
impl Foo for () {
type Out = bool;
}
fn main() {
type Bool = <() as Foo>::Out;
let x: Bool = true;
assert!(x);
let y: Option<Bool> = None;
assert_eq!(y, None);
}