]> git.lizzy.rs Git - rust.git/blob - tests/ui/traits/suggest-fully-qualified-closure.rs
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / traits / suggest-fully-qualified-closure.rs
1 // check-fail
2 // known-bug: #103705
3 // normalize-stderr-test "\[closure@.*\]" -> "[closure@]"
4 // normalize-stderr-test "\+* ~" -> "+++ ~"
5
6 // The output of this currently suggests writing a closure in the qualified path.
7
8 trait MyTrait<T> {
9    fn lol<F:FnOnce()>(&self, f:F) -> u16;
10 }
11
12 struct Qqq;
13
14 impl MyTrait<u32> for Qqq{
15    fn lol<F:FnOnce()>(&self, _f:F) -> u16 { 5 }
16 }
17 impl MyTrait<u64> for Qqq{
18    fn lol<F:FnOnce()>(&self, _f:F) -> u16 { 6 }
19 }
20
21 fn main() {
22     let q = Qqq;
23     q.lol(||());
24 }