about summary refs log tree commit diff
path: root/tests/ui/traits/suggest-fully-qualified-closure.rs
blob: 3d28a4e6bf59cbddd2b5afaf910cbe04c8f6e291 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ check-fail
//@ known-bug: #103705

// The output of this currently suggests writing a closure in the qualified path.

trait MyTrait<T> {
   fn lol<F:FnOnce()>(&self, f:F) -> u16;
}

struct Qqq;

impl MyTrait<u32> for Qqq{
   fn lol<F:FnOnce()>(&self, _f:F) -> u16 { 5 }
}
impl MyTrait<u64> for Qqq{
   fn lol<F:FnOnce()>(&self, _f:F) -> u16 { 6 }
}

fn main() {
    let q = Qqq;
    q.lol(||());
}