Skip to content

Commit 3eeeaf7

Browse files
committed
syntax: Replace stable slice::ref_slice with unsafe slice::from_raw_parts
1 parent b41560a commit 3eeeaf7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/libsyntax/parse/parser.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,11 @@ impl<'a> Parser<'a> {
404404
this_token_str)))
405405
}
406406
} else {
407-
self.expect_one_of(slice::ref_slice(t), &[])
407+
// FIXME: Using this because `slice::ref_slice` is unstable.
408+
let slice = unsafe {
409+
slice::from_raw_parts(t, 1)
410+
};
411+
self.expect_one_of(slice, &[])
408412
}
409413
}
410414

0 commit comments

Comments
 (0)