2024-02-16 14:02:50 -06:00
|
|
|
//@ build-pass
|
2023-09-13 22:49:41 -05:00
|
|
|
// issue: #115807
|
|
|
|
|
|
|
|
trait Chip: for<'a> TraitWithLifetime<'a> + SomeMarker {
|
|
|
|
fn compute(&self);
|
|
|
|
}
|
|
|
|
|
|
|
|
trait SomeMarker {}
|
|
|
|
|
|
|
|
trait TraitWithLifetime<'a>: SomeMarker {}
|
|
|
|
|
|
|
|
trait Machine {
|
|
|
|
fn run();
|
|
|
|
}
|
|
|
|
|
|
|
|
struct BasicMachine;
|
|
|
|
|
|
|
|
impl Machine for BasicMachine {
|
|
|
|
fn run() {
|
|
|
|
let chips: [&dyn Chip; 0] = [];
|
|
|
|
let _ = chips.map(|chip| chip.compute());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
BasicMachine::run();
|
|
|
|
}
|