From 3a93bdb92c195cab90103743f11c14c837e84598 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sun, 15 Mar 2015 12:44:37 -0700 Subject: [PATCH] Regression test for #19982 Closes #17165, #19982. --- src/test/compile-fail/issue-19982.rs | 17 +++++++++++++++++ src/test/run-pass/issue-19982.rs | 22 ++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 src/test/compile-fail/issue-19982.rs create mode 100644 src/test/run-pass/issue-19982.rs diff --git a/src/test/compile-fail/issue-19982.rs b/src/test/compile-fail/issue-19982.rs new file mode 100644 index 00000000000..9dbca997341 --- /dev/null +++ b/src/test/compile-fail/issue-19982.rs @@ -0,0 +1,17 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(unboxed_closures)] + +struct Foo; + +impl Fn<(&(),)> for Foo { } //~ ERROR missing lifetime specifier + +fn main() {} diff --git a/src/test/run-pass/issue-19982.rs b/src/test/run-pass/issue-19982.rs new file mode 100644 index 00000000000..3082fc27a7d --- /dev/null +++ b/src/test/run-pass/issue-19982.rs @@ -0,0 +1,22 @@ +// Copyright 2015 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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![feature(core,unboxed_closures)] + +#[allow(dead_code)] +struct Foo; + +impl<'a> Fn<(&'a (),)> for Foo { + type Output = (); + + extern "rust-call" fn call(&self, (_,): (&(),)) {} +} + +fn main() {} -- 2.44.0