Register new snapshots
This change starts denying `*T` in the parser. All code using `*T` should ensure that the FFI call does indeed take `const T*` on the other side before renaming the type to `*const T`. Otherwise, all code can rename `*T` to `*const T`. [breaking-change]
This commit is contained in:
parent
7da94c1a00
commit
2823be08b7
9 changed files with 13 additions and 19 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue