From 45c0b28bcb6e383cd9d24d3845ee8accda31c889 Mon Sep 17 00:00:00 2001 From: Masaki Hara Date: Mon, 11 Feb 2019 10:34:24 +0900 Subject: Remove FnBox specialization of impl FnOnce for Box. --- src/test/ui/unsized-locals/fnbox-compat.rs | 13 ------------- src/test/ui/unsized-locals/fnbox-compat.stderr | 11 ----------- 2 files changed, 24 deletions(-) delete mode 100644 src/test/ui/unsized-locals/fnbox-compat.rs delete mode 100644 src/test/ui/unsized-locals/fnbox-compat.stderr (limited to 'src/test') 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(f: Box 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 - -- cgit 1.4.1-3-g733a5