diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/typeck/issue-84768.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/ui/typeck/issue-84768.rs b/src/test/ui/typeck/issue-84768.rs new file mode 100644 index 000000000..ffa92823b --- /dev/null +++ b/src/test/ui/typeck/issue-84768.rs @@ -0,0 +1,10 @@ +// Regression test for the ICE described in #84768. + +#![feature(fn_traits)] +#![crate_type="lib"] + +fn transform_mut<F>(f: F) where F: for<'b> FnOnce(&'b mut u8) { + <F as FnOnce(&mut u8)>::call_once(f, 1) + //~^ ERROR: associated type bindings are not allowed here [E0229] + //~| ERROR: mismatched types [E0308] +} |