about summary refs log tree commit diff
path: root/tests/ui/lifetimes/anonymize-unnamed-bound-vars-in-binders.rs
blob: da41e17c4173dc9acaa212c20d272cff82624773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//@ build-pass
// 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();
}