diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-25 12:00:27 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-25 12:47:56 -0700 |
| commit | 2823be08b7d1b9106cbbd454437384c093c5a5fa (patch) | |
| tree | 2971066c674ce2d6b1e962431166bed03922f0e6 /src/libsyntax | |
| parent | 7da94c1a00104e25901b6b571bca1b03990d4467 (diff) | |
| download | rust-2823be08b7d1b9106cbbd454437384c093c5a5fa.tar.gz rust-2823be08b7d1b9106cbbd454437384c093c5a5fa.zip | |
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]
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 6 |
1 files changed, 5 insertions, 1 deletions
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); |
