We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents a985bc5 + bf519da commit 16445c5Copy full SHA for 16445c5
src/test/compile-fail/issue-4335.rs
@@ -1,4 +1,4 @@
1
-// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2
// file at the top-level directory of this distribution and at
3
// http://rust-lang.org/COPYRIGHT.
4
//
@@ -8,10 +8,9 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-// xfail-test
12
fn id<T>(t: T) -> T { t }
13
14
-fn f<T>(v: &'r T) -> &'r fn()->T { id::<&'r fn()->T>(|| *v) } //~ ERROR ???
+fn f<'r, T>(v: &'r T) -> &'r fn()->T { id::<&'r fn()->T>(|| *v) } //~ ERROR cannot infer an appropriate lifetime due to conflicting requirements
15
16
fn main() {
17
let v = &5;
0 commit comments