diff options
Diffstat (limited to 'src/test/ui/mismatched_types/fn-variance-1.rs')
-rw-r--r-- | src/test/ui/mismatched_types/fn-variance-1.rs | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/test/ui/mismatched_types/fn-variance-1.rs b/src/test/ui/mismatched_types/fn-variance-1.rs deleted file mode 100644 index b8a6c9a9b..000000000 --- a/src/test/ui/mismatched_types/fn-variance-1.rs +++ /dev/null @@ -1,17 +0,0 @@ -fn takes_imm(x: &isize) { } - -fn takes_mut(x: &mut isize) { } - -fn apply<T, F>(t: T, f: F) where F: FnOnce(T) { - f(t) -} - -fn main() { - apply(&3, takes_imm); - apply(&3, takes_mut); - //~^ ERROR type mismatch - - apply(&mut 3, takes_mut); - apply(&mut 3, takes_imm); - //~^ ERROR type mismatch -} |