mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
23 lines
322 B
Rust
23 lines
322 B
Rust
// check-pass
|
|
// revisions: current next
|
|
//[next] compile-flags: -Znext-solver
|
|
|
|
|
|
fn main() {
|
|
let vec: Vec<Box<dyn Trait>> = Vec::new();
|
|
|
|
for i in vec {
|
|
i.fn_2();
|
|
}
|
|
}
|
|
|
|
trait OtherTrait {}
|
|
|
|
trait Trait {
|
|
fn fn_1(&self) -> impl OtherTrait
|
|
where
|
|
Self: Sized;
|
|
|
|
fn fn_2(&self) -> bool;
|
|
}
|