diff options
| author | bors <bors@rust-lang.org> | 2016-08-07 01:31:43 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-07 01:31:43 -0700 |
| commit | 42903d9a8f0f471f5e0eb453e49fe44a65a746c5 (patch) | |
| tree | 92b566a48f2c7882bf95e9dc1e6e16fa857dedd4 /src | |
| parent | 877dfeb572e330026fc4b4114f16a411c44dc328 (diff) | |
| parent | 7fd7af91992035a25cf7acc004df06c026fac631 (diff) | |
| download | rust-42903d9a8f0f471f5e0eb453e49fe44a65a746c5.tar.gz rust-42903d9a8f0f471f5e0eb453e49fe44a65a746c5.zip | |
Auto merge of #35432 - frewsxcv:20847, r=alexcrichton
Add regression test for #20847. https://github.com/rust-lang/rust/issues/20847
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/run-pass/issue-20847.rs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/test/run-pass/issue-20847.rs b/src/test/run-pass/issue-20847.rs new file mode 100644 index 00000000000..d2c33560545 --- /dev/null +++ b/src/test/run-pass/issue-20847.rs @@ -0,0 +1,21 @@ +// Copyright 2016 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. + +#![feature(fn_traits)] + +use std::ops::Fn; + +fn say(x: u32, y: u32) { + println!("{} {}", x, y); +} + +fn main() { + Fn::call(&say, (1, 2)); +} |
