Skip to content

Commit 1fd85b1

Browse files
committed
fixed compile-fail test
1 parent e0eb1ba commit 1fd85b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/test/compile-fail/rfc1623.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ fn non_elidable<'a, 'b>(a: &'a u8, b: &'b u8) -> &'a u8 { a }
1414

1515
// the boundaries of elision
1616
static NON_ELIDABLE_FN : &fn(&u8, &u8) -> &u8 =
17-
//^ERROR: missing lifetime specifier
17+
//~^ ERROR: missing lifetime specifier
1818
&(non_elidable as fn(&u8, &u8) -> &u8);
1919

2020
type Baz<'a> = fn(&'a [u8]) -> Option<u8>;
@@ -25,7 +25,8 @@ static STATIC_BAZ : &Baz<'static> = &(baz as Baz);
2525
const CONST_BAZ : &Baz<'static> = &(baz as Baz);
2626

2727
fn main() {
28-
let y = [1u8, 2, 3];
28+
let x = &[1u8, 2, 3];
29+
let y = x;
2930

3031
//surprisingly this appears to work, so lifetime < `'static` is valid
3132
assert_eq!(Some(1), STATIC_BAZ(y));

0 commit comments

Comments
 (0)