Skip to content

Commit 2823be0

Browse files
committed
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]
1 parent 7da94c1 commit 2823be0

File tree

9 files changed

+13
-19
lines changed

9 files changed

+13
-19
lines changed

src/liballoc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070

7171
#![no_std]
7272
#![feature(lang_items, phase, unsafe_destructor)]
73-
#![allow(unknown_features)] // NOTE: remove after a stage0 snap
7473

7574
#[phase(plugin, link)]
7675
extern crate core;

src/libcore/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@
5858
#![feature(globs, intrinsics, lang_items, macro_rules, managed_boxes, phase)]
5959
#![feature(simd, unsafe_destructor)]
6060
#![deny(missing_doc)]
61-
#![allow(unknown_features)] // NOTE: remove after stage0 snapshot
6261

6362
#[cfg(test)] extern crate realcore = "core";
6463
#[cfg(test)] extern crate libc;

src/libcore/ops.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -570,12 +570,6 @@ pub trait Shl<RHS,Result> {
570570

571571
macro_rules! shl_impl(
572572
($($t:ty)*) => ($(
573-
#[cfg(stage0)]
574-
impl Shl<$t, $t> for $t {
575-
#[inline]
576-
fn shl(&self, other: &$t) -> $t { (*self) << (*other) }
577-
}
578-
#[cfg(not(stage0), not(test))]
579573
impl Shl<$t, $t> for $t {
580574
#[inline]
581575
fn shl(&self, other: &$t) -> $t {
@@ -619,12 +613,6 @@ pub trait Shr<RHS,Result> {
619613

620614
macro_rules! shr_impl(
621615
($($t:ty)*) => ($(
622-
#[cfg(stage0, not(test))]
623-
impl Shr<$t, $t> for $t {
624-
#[inline]
625-
fn shr(&self, other: &$t) -> $t { (*self) >> (*other) }
626-
}
627-
#[cfg(not(stage0), not(test))]
628616
impl Shr<$t, $t> for $t {
629617
#[inline]
630618
fn shr(&self, other: &$t) -> $t { (*self) >> (*other as uint) }

src/libnative/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555

5656
#![deny(unused_result, unused_must_use)]
5757
#![allow(non_camel_case_types, deprecated)]
58-
#![allow(unknown_features)] // NOTE: remove after a stage0 snap
5958
#![feature(default_type_params, lang_items)]
6059

6160
// NB this crate explicitly does *not* allow glob imports, please seriously

src/librlibc/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
html_favicon_url = "http://www.rust-lang.org/favicon.ico",
2828
html_root_url = "http://doc.rust-lang.org/")]
2929
#![feature(intrinsics)]
30-
#![allow(unknown_features)] // NOTE: remove after stage0 snapshot
3130

3231
#![no_std]
3332
#![experimental]

src/librustrt/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#![feature(macro_rules, phase, globs, thread_local, managed_boxes, asm)]
2020
#![feature(linkage, lang_items, unsafe_destructor)]
21-
#![allow(unknown_features)] // NOTE: remove after stage0 snapshot
2221
#![no_std]
2322
#![experimental]
2423

src/libstd/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@
111111
#![no_std]
112112

113113
#![allow(deprecated)]
114-
#![allow(unknown_features)] // NOTE: remove after stage0 snapshot
115114
#![deny(missing_doc)]
116115

117116
// When testing libstd, bring in libuv as the I/O backend so tests can print

src/libsyntax/parse/parser.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1448,7 +1448,11 @@ impl<'a> Parser<'a> {
14481448
} else if self.eat_keyword(keywords::Const) {
14491449
MutImmutable
14501450
} else {
1451-
// NOTE: after a stage0 snap this should turn into a span_err.
1451+
let span = self.last_span;
1452+
self.span_err(span,
1453+
"bare raw pointers are no longer allowed, you should \
1454+
likely use `*mut T`, but otherwise `*T` is now \
1455+
known as `*const T`");
14521456
MutImmutable
14531457
};
14541458
let t = self.parse_ty(true);

src/snapshots.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
S 2014-06-25 bab614f
2+
freebsd-x86_64 14cb361c8fdefa2534bb6776a04815c08680ecd6
3+
linux-i386 8fec4845626c557431a4aa7bfb2b5cfc65ad9eda
4+
linux-x86_64 2304534c8e2431a5da2086164dd3a3e019b87ecd
5+
macos-i386 d9e348cc1f9021f0f8e8907880fded80afb5db5b
6+
macos-x86_64 aa790195d1f8191dce2f990ec4323bcc69566288
7+
winnt-i386 19b67f8a583516553a4fe62e453eecc5c17aff8e
8+
19
S 2014-06-21 db9af1d
210
freebsd-x86_64 ef2bd0fc0b0efa2bd6f5c1eaa60a2ec8df533254
311
linux-i386 84339ea0f796ae468ef86797ef4587274bec19ea

0 commit comments

Comments
 (0)