diff options
| author | Masaki Hara <ackie.h.gmai@gmail.com> | 2019-02-11 10:34:24 +0900 |
|---|---|---|
| committer | CrLF0710 <crlf0710@gmail.com> | 2019-04-05 02:27:05 +0800 |
| commit | 45c0b28bcb6e383cd9d24d3845ee8accda31c889 (patch) | |
| tree | 4bd485ac20f3d0bbc2921abe2492245324c315d7 /src/test | |
| parent | a38f29272ef4d04f0cc77e4f8d4fa5fac7ed746d (diff) | |
| download | rust-45c0b28bcb6e383cd9d24d3845ee8accda31c889.tar.gz rust-45c0b28bcb6e383cd9d24d3845ee8accda31c889.zip | |
Remove FnBox specialization of impl FnOnce for Box<impl FnOnce>.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/unsized-locals/fnbox-compat.rs | 13 | ||||
| -rw-r--r-- | src/test/ui/unsized-locals/fnbox-compat.stderr | 11 |
2 files changed, 0 insertions, 24 deletions
diff --git a/src/test/ui/unsized-locals/fnbox-compat.rs b/src/test/ui/unsized-locals/fnbox-compat.rs deleted file mode 100644 index c2c385e9fea..00000000000 --- a/src/test/ui/unsized-locals/fnbox-compat.rs +++ /dev/null @@ -1,13 +0,0 @@ -#![feature(fnbox)] - -use std::boxed::FnBox; - -fn call_it<T>(f: Box<dyn FnBox(&i32) -> T>) -> T { - f(&42) - //~^ERROR implementation of `std::ops::FnOnce` is not general enough -} - -fn main() { - let s = "hello".to_owned(); - assert_eq!(&call_it(Box::new(|_| s)) as &str, "hello"); -} diff --git a/src/test/ui/unsized-locals/fnbox-compat.stderr b/src/test/ui/unsized-locals/fnbox-compat.stderr deleted file mode 100644 index c37bfaa47f7..00000000000 --- a/src/test/ui/unsized-locals/fnbox-compat.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error: implementation of `std::ops::FnOnce` is not general enough - --> $DIR/fnbox-compat.rs:6:5 - | -LL | f(&42) - | ^^^^^^ - | - = note: `std::ops::FnOnce<(&'0 i32,)>` would have to be implemented for the type `std::boxed::Box<(dyn for<'r> std::boxed::FnBox<(&'r i32,), Output=T> + 'static)>`, for some specific lifetime `'0` - = note: but `std::ops::FnOnce<(&'1 i32,)>` is actually implemented for the type `std::boxed::Box<(dyn std::boxed::FnBox<(&'1 i32,), Output=T> + '_)>`, for some specific lifetime `'1` - -error: aborting due to previous error - |
