about summary refs log tree commit diff
path: root/tests/ui/wf/ice-wf-missing-span-in-error-130012.rs
blob: e107069d0dfa9296a5332663aefd4d0eb01094d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Regression test for ICE #130012
// Checks that we do not ICE while reporting
// lifetime mistmatch error

trait Fun {
    type Assoc;
}

trait MyTrait: for<'a> Fun<Assoc = &'a ()> {}
//~^ ERROR binding for associated type `Assoc` references lifetime `'a`, which does not appear in the trait input types
//~| ERROR binding for associated type `Assoc` references lifetime `'a`, which does not appear in the trait input types
//~| ERROR binding for associated type `Assoc` references lifetime `'a`, which does not appear in the trait input types

impl<F: for<'b> Fun<Assoc = &'b ()>> MyTrait for F {}
//~^ ERROR binding for associated type `Assoc` references lifetime `'b`, which does not appear in the trait input types
//~| ERROR mismatched types

fn main() {}