diff options
Diffstat (limited to 'src/test/ui/impl-trait/auto-trait-leak-rpass.rs')
| -rw-r--r-- | src/test/ui/impl-trait/auto-trait-leak-rpass.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/test/ui/impl-trait/auto-trait-leak-rpass.rs b/src/test/ui/impl-trait/auto-trait-leak-rpass.rs deleted file mode 100644 index 9976a018b46..00000000000 --- a/src/test/ui/impl-trait/auto-trait-leak-rpass.rs +++ /dev/null @@ -1,21 +0,0 @@ -// run-pass - -// Fast path, main can see the concrete type returned. -fn before() -> impl FnMut(i32) { - let mut p = Box::new(0); - move |x| *p = x -} - -fn send<T: Send>(_: T) {} - -fn main() { - send(before()); - send(after()); -} - -// Deferred path, main has to wait until typeck finishes, -// to check if the return type of after is Send. -fn after() -> impl FnMut(i32) { - let mut p = Box::new(0); - move |x| *p = x -} |
