mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 17:24:06 +00:00
Hooray! 19982 finally works the way people wanted in December 2014 :)
This commit is contained in:
parent
37393576ec
commit
faf68f473f
@ -1,33 +0,0 @@
|
||||
// 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 <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
|
||||
// pretty-expanded FIXME #23616
|
||||
|
||||
#![feature(fn_traits, unboxed_closures)]
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct Foo;
|
||||
|
||||
impl<'a> Fn<(&'a (),)> for Foo {
|
||||
extern "rust-call" fn call(&self, (_,): (&(),)) {}
|
||||
}
|
||||
|
||||
impl<'a> FnMut<(&'a (),)> for Foo {
|
||||
extern "rust-call" fn call_mut(&mut self, (_,): (&(),)) {}
|
||||
}
|
||||
|
||||
impl<'a> FnOnce<(&'a (),)> for Foo {
|
||||
type Output = ();
|
||||
|
||||
extern "rust-call" fn call_once(self, (_,): (&(),)) {}
|
||||
}
|
||||
|
||||
fn main() {}
|
@ -8,10 +8,25 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![feature(unboxed_closures)]
|
||||
// compile-pass
|
||||
|
||||
#![feature(fn_traits, unboxed_closures)]
|
||||
|
||||
#[allow(dead_code)]
|
||||
struct Foo;
|
||||
|
||||
impl Fn<(&(),)> for Foo { } //~ ERROR missing lifetime specifier
|
||||
impl Fn<(&(),)> for Foo {
|
||||
extern "rust-call" fn call(&self, (_,): (&(),)) {}
|
||||
}
|
||||
|
||||
impl FnMut<(&(),)> for Foo {
|
||||
extern "rust-call" fn call_mut(&mut self, (_,): (&(),)) {}
|
||||
}
|
||||
|
||||
impl FnOnce<(&(),)> for Foo {
|
||||
type Output = ();
|
||||
|
||||
extern "rust-call" fn call_once(self, (_,): (&(),)) {}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
@ -1,9 +0,0 @@
|
||||
error[E0106]: missing lifetime specifier
|
||||
--> $DIR/issue-19982.rs:15:10
|
||||
|
|
||||
LL | impl Fn<(&(),)> for Foo { } //~ ERROR missing lifetime specifier
|
||||
| ^ expected lifetime parameter
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0106`.
|
Loading…
Reference in New Issue
Block a user