diff options
| author | bors <bors@rust-lang.org> | 2018-10-14 01:53:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-10-14 01:53:28 +0000 |
| commit | 2bab4bf486aca3c3ba105e9931f56f6ddf445c3d (patch) | |
| tree | 343cd5c861eda6b9ee397656ada7f81442e496af | |
| parent | 9788a7bb2a5dfecf12d8cb6befcf30fb3d243aaa (diff) | |
| parent | 0e268d9e898f76c16fd82d13ef47eca521374789 (diff) | |
| download | rust-2bab4bf486aca3c3ba105e9931f56f6ddf445c3d.tar.gz rust-2bab4bf486aca3c3ba105e9931f56f6ddf445c3d.zip | |
Auto merge of #55018 - euclio:issue-24421, r=alexcrichton
add test for #24421 Fixes #24421. Also removes a README which points to a non-existent directory.
| -rw-r--r-- | src/test/ui/closure-expected-type/README.md | 1 | ||||
| -rw-r--r-- | src/test/ui/closure-expected-type/issue-24421.rs | 20 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/test/ui/closure-expected-type/README.md b/src/test/ui/closure-expected-type/README.md deleted file mode 100644 index 9995b00a9a7..00000000000 --- a/src/test/ui/closure-expected-type/README.md +++ /dev/null @@ -1 +0,0 @@ -See `src/test/run-pass/closure-expected-type`. diff --git a/src/test/ui/closure-expected-type/issue-24421.rs b/src/test/ui/closure-expected-type/issue-24421.rs new file mode 100644 index 00000000000..b3c50a74a32 --- /dev/null +++ b/src/test/ui/closure-expected-type/issue-24421.rs @@ -0,0 +1,20 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// compile-pass + +fn test<F: Fn(&u64, &u64)>(f: F) {} + +fn main() { + test(|x, y | {}); + test(|x:&u64, y:&u64| {}); + test(|x:&u64, y | {}); + test(|x, y:&u64| {}); +} |
