diff options
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/lexer/mod.rs | 4 | ||||
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 | ||||
| -rw-r--r-- | src/libsyntax/parse/token.rs | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/src/libsyntax/parse/lexer/mod.rs b/src/libsyntax/parse/lexer/mod.rs index ac570c88837..0f188fdf18a 100644 --- a/src/libsyntax/parse/lexer/mod.rs +++ b/src/libsyntax/parse/lexer/mod.rs @@ -1203,8 +1203,8 @@ impl<'a> StringReader<'a> { fn read_one_line_comment(&mut self) -> String { let val = self.read_to_eol(); - assert!((val.as_slice()[0] == '/' as u8 && val.as_slice()[1] == '/' as u8) - || (val.as_slice()[0] == '#' as u8 && val.as_slice()[1] == '!' as u8)); + assert!((val.as_bytes()[0] == '/' as u8 && val.as_bytes()[1] == '/' as u8) + || (val.as_bytes()[0] == '#' as u8 && val.as_bytes()[1] == '!' as u8)); return val; } diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 1cb09bb8d89..0fd5a7086b7 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -1448,7 +1448,11 @@ impl<'a> Parser<'a> { } else if self.eat_keyword(keywords::Const) { MutImmutable } else { - // NOTE: after a stage0 snap this should turn into a span_err. + let span = self.last_span; + self.span_err(span, + "bare raw pointers are no longer allowed, you should \ + likely use `*mut T`, but otherwise `*T` is now \ + known as `*const T`"); MutImmutable }; let t = self.parse_ty(true); diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 9549d5b8389..a93e8270d98 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -114,6 +114,7 @@ pub enum Nonterminal { NtPat( Gc<ast::Pat>), NtExpr(Gc<ast::Expr>), NtTy( P<ast::Ty>), + // see IDENT, above, for meaning of bool in NtIdent: NtIdent(Box<ast::Ident>, bool), NtMeta(Gc<ast::MetaItem>), // stuff inside brackets for attributes NtPath(Box<ast::Path>), |
