mirror of
https://github.com/rust-lang/rust
synced 2024-09-06 01:11:17 +00:00
38 lines
612 B
Rust
38 lines
612 B
Rust
//@ revisions: current next
|
|
//@ ignore-compare-mode-next-solver (explicit revisions)
|
|
//@[next] compile-flags: -Znext-solver
|
|
//@ check-pass
|
|
|
|
#![feature(type_alias_impl_trait)]
|
|
#![allow(dead_code)]
|
|
|
|
mod foo {
|
|
pub trait MyTrait {}
|
|
|
|
impl MyTrait for bool {}
|
|
|
|
pub type Foo = impl MyTrait;
|
|
|
|
pub fn make_foo() -> Foo {
|
|
true
|
|
}
|
|
}
|
|
|
|
use foo::*;
|
|
|
|
struct Blah {
|
|
my_foo: Foo,
|
|
my_u8: u8,
|
|
}
|
|
|
|
impl Blah {
|
|
fn new() -> Blah {
|
|
Blah { my_foo: make_foo(), my_u8: 12 }
|
|
}
|
|
fn into_inner(self) -> (Foo, u8, Foo) {
|
|
(self.my_foo, self.my_u8, make_foo())
|
|
}
|
|
}
|
|
|
|
fn main() {}
|