Test where the old infrastructure failed to detect the (applicable) impl of `FnMut` for

some reason.
This commit is contained in:
Niko Matsakis 2014-10-17 09:12:10 -04:00
parent df714cfda7
commit 7f8ca53669
1 changed files with 3 additions and 1 deletions

View File

@ -8,8 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![feature(overloaded_calls)]
fn f<'r>(p: &'r mut fn(p: &mut ())) {
p(()) //~ ERROR expected function, found `&'r mut fn(&mut ())`
p(()) //~ ERROR mismatched types: expected `&mut ()`, found `()`
}
fn main() {}