diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-04-29 08:04:00 -0600 |
|---|---|---|
| committer | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-04-30 08:53:47 -0600 |
| commit | 3b003233fd8439d36e5b8a1d72f3f3871d5d14c9 (patch) | |
| tree | 4ea0bc0b86c3fa2d8d54e780c0ecd3107aaefa66 /src | |
| parent | 12e76e24cc1466ffb2bd37cc7652a6dd7ba15735 (diff) | |
| download | rust-3b003233fd8439d36e5b8a1d72f3f3871d5d14c9.tar.gz rust-3b003233fd8439d36e5b8a1d72f3f3871d5d14c9.zip | |
Add test for issue #16994.
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/compile-fail/issue-16994.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-16994.rs b/src/test/compile-fail/issue-16994.rs new file mode 100644 index 00000000000..ae4e8ce1df8 --- /dev/null +++ b/src/test/compile-fail/issue-16994.rs @@ -0,0 +1,20 @@ +// Copyright 2017 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(rustc_attrs)] + +fn cb<'a,T>(_x: Box<Fn((&'a i32, &'a (Vec<&'static i32>, bool))) -> T>) -> T { + panic!() +} + +#[rustc_error] +fn main() { //~ ERROR compilation successful + cb(Box::new(|(k, &(ref v, b))| (*k, v.clone(), b))); +} |
