Skip to content

Commit 5b72fa4

Browse files
committed
Auto merge of #27309 - eddyb:snapshot-infdef, r=alexcrichton
FreeBSD i386 snapshot is missing, failed tests (possibly spurious). r? @alexcrichton
2 parents 79d5fef + cc09b1a commit 5b72fa4

17 files changed

+34
-35
lines changed

src/liballoc/boxed.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ impl<T: Clone> Clone for Box<T> {
300300
/// let y = x.clone();
301301
/// ```
302302
#[inline]
303-
fn clone(&self) -> Box<T> { box (HEAP) {(**self).clone()} }
303+
fn clone(&self) -> Box<T> { box {(**self).clone()} }
304304
/// Copies `source`'s contents into `self` without creating a new allocation.
305305
///
306306
/// # Examples

src/liballoc/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070
test(no_crate_inject))]
7171
#![no_std]
7272

73-
// SNAP d4432b3
74-
#![allow(unused_features)] // until feature(placement_in_syntax) is in snap
7573
#![feature(allocator)]
7674
#![feature(box_syntax)]
7775
#![feature(coerce_unsized)]

src/libcore/intrinsics.rs

-9
Original file line numberDiff line numberDiff line change
@@ -184,19 +184,11 @@ extern "rust-intrinsic" {
184184
/// elements.
185185
pub fn size_of<T>() -> usize;
186186

187-
#[cfg(not(stage0))]
188187
/// Moves a value to an uninitialized memory location.
189188
///
190189
/// Drop glue is not run on the destination.
191190
pub fn move_val_init<T>(dst: *mut T, src: T);
192191

193-
// SNAP d4432b3
194-
#[cfg(stage0)]
195-
/// Moves a value to an uninitialized memory location.
196-
///
197-
/// Drop glue is not run on the destination.
198-
pub fn move_val_init<T>(dst: &mut T, src: T);
199-
200192
pub fn min_align_of<T>() -> usize;
201193
pub fn pref_align_of<T>() -> usize;
202194

@@ -614,6 +606,5 @@ extern "rust-intrinsic" {
614606
/// Rust's "try catch" construct which invokes the function pointer `f` with
615607
/// the data pointer `data`, returning the exception payload if an exception
616608
/// is thrown (aka the thread panics).
617-
#[cfg(not(stage0))]
618609
pub fn try(f: fn(*mut u8), data: *mut u8) -> *mut u8;
619610
}

src/libstd/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@
203203
test(no_crate_inject, attr(deny(warnings))),
204204
test(attr(allow(dead_code, deprecated, unused_variables, unused_mut))))]
205205

206-
#![cfg_attr(stage0, allow(unused_features))]
207206
#![feature(alloc)]
208207
#![feature(allow_internal_unstable)]
209208
#![feature(associated_consts)]

src/libstd/rt/unwind/gcc.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ pub mod eabi {
115115
}
116116
}
117117

118-
#[cfg_attr(not(stage0), lang = "eh_personality_catch")]
118+
#[lang = "eh_personality_catch"]
119119
#[no_mangle]
120120
pub extern fn rust_eh_personality_catch(
121121
_version: c_int,
@@ -168,7 +168,7 @@ pub mod eabi {
168168
}
169169
}
170170

171-
#[cfg_attr(not(stage0), lang = "eh_personality_catch")]
171+
#[lang = "eh_personality_catch"]
172172
#[no_mangle]
173173
pub extern fn rust_eh_personality_catch(
174174
_version: c_int,
@@ -218,7 +218,7 @@ pub mod eabi {
218218
}
219219
}
220220

221-
#[cfg_attr(not(stage0), lang = "eh_personality_catch")]
221+
#[lang = "eh_personality_catch"]
222222
#[no_mangle]
223223
pub extern fn rust_eh_personality_catch(
224224
state: uw::_Unwind_State,
@@ -307,7 +307,7 @@ pub mod eabi {
307307
}
308308
}
309309

310-
#[cfg_attr(not(stage0), lang = "eh_personality_catch")]
310+
#[lang = "eh_personality_catch"]
311311
#[no_mangle]
312312
pub extern fn rust_eh_personality_catch(
313313
exceptionRecord: *mut EXCEPTION_RECORD,

src/libstd/rt/unwind/mod.rs

-6
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ pub unsafe fn try<F: FnOnce()>(f: F) -> Result<(), Box<Any + Send>> {
139139
// `dllexport`, but it's easier to not have conditional `src/rt/rust_try.ll`
140140
// files and instead just have this non-generic shim the compiler can take
141141
// care of exposing correctly.
142-
#[cfg(not(stage0))]
143142
unsafe fn inner_try(f: fn(*mut u8), data: *mut u8)
144143
-> Result<(), Box<Any + Send>> {
145144
let prev = PANICKING.with(|s| s.get());
@@ -152,11 +151,6 @@ pub unsafe fn try<F: FnOnce()>(f: F) -> Result<(), Box<Any + Send>> {
152151
Err(imp::cleanup(ep))
153152
}
154153
}
155-
#[cfg(stage0)]
156-
unsafe fn inner_try(f: fn(*mut u8), data: *mut u8)
157-
-> Result<(), Box<Any + Send>> {
158-
Ok(f(data))
159-
}
160154

161155
fn try_fn<F: FnOnce()>(opt_closure: *mut u8) {
162156
let opt_closure = opt_closure as *mut Option<F>;

src/libsyntax/parse/parser.rs

+7-11
Original file line numberDiff line numberDiff line change
@@ -2637,19 +2637,15 @@ impl<'a> Parser<'a> {
26372637
//
26382638
// ... but for now: check for a place: `box(PLACE) EXPR`.
26392639

2640-
if try!(self.eat(&token::OpenDelim(token::Paren)) ){
2641-
// SNAP d4432b3
2642-
// Enable this warning after snapshot ...
2643-
//
2644-
// let box_span = mk_sp(lo, self.last_span.hi);
2645-
// self.span_warn(
2646-
// box_span,
2647-
// "deprecated syntax; use the `in` keyword now \
2648-
// (e.g. change `box (<expr>) <expr>` to \
2649-
// `in <expr> { <expr> }`)");
2640+
if try!(self.eat(&token::OpenDelim(token::Paren))) {
2641+
let box_span = mk_sp(lo, self.last_span.hi);
2642+
self.span_warn(box_span,
2643+
"deprecated syntax; use the `in` keyword now \
2644+
(e.g. change `box (<expr>) <expr>` to \
2645+
`in <expr> { <expr> }`)");
26502646

26512647
// Continue supporting `box () EXPR` (temporarily)
2652-
if !try!(self.eat(&token::CloseDelim(token::Paren)) ){
2648+
if !try!(self.eat(&token::CloseDelim(token::Paren))) {
26532649
let place = try!(self.parse_expr_nopanic());
26542650
try!(self.expect(&token::CloseDelim(token::Paren)));
26552651
// Give a suggestion to use `box()` when a parenthesised expression is used

src/snapshots.txt

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
S 2015-07-26 a5c12f4
2+
bitrig-x86_64 8734eb41ffbe6ddc1120aa2910db4162ec9cf270
3+
freebsd-x86_64 bc50b0f8d7f6d62f4f5ffa136f5387f5bf6524fd
4+
linux-i386 3459275cdf3896f678e225843fa56f0d9fdbabe8
5+
linux-x86_64 e451e3bd6e5fcef71e41ae6f3da9fb1cf0e13a0c
6+
macos-i386 428944a7984c0988e77909d82ca2ef77d96a1fbd
7+
macos-x86_64 b0515bb7d2892b9a58282fc865fee11a885406d6
8+
winnt-i386 22286e815372c3e03729853af48a2f6d538ed086
9+
winnt-x86_64 f13aa3c02a15f8e794b9e180487bdf04378f8f04
10+
111
S 2015-07-17 d4432b3
212
bitrig-x86_64 af77768e0eb0f4c7ec5a8e36047a08053b54b230
313
freebsd-i386 b049325e5b2efe5f4884f3dafda448c1dac49b4f

src/test/compile-fail/borrowck-lend-flow-if.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn produce<T>() -> T { panic!(); }
2424

2525
fn inc(v: &mut Box<isize>) {
2626
*v = box() (**v + 1);
27+
//~^ WARN deprecated syntax
2728
}
2829

2930
fn pre_freeze_cond() {

src/test/compile-fail/borrowck-lend-flow-loop.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ fn produce<T>() -> T { panic!(); }
2323

2424
fn inc(v: &mut Box<isize>) {
2525
*v = box() (**v + 1);
26+
//~^ WARN deprecated syntax
2627
}
2728

2829
fn loop_overarching_alias_mut() {

src/test/compile-fail/borrowck-lend-flow.rs

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ fn produce<T>() -> T { panic!(); }
2424

2525
fn inc(v: &mut Box<isize>) {
2626
*v = box() (**v + 1);
27+
//~^ WARN deprecated syntax
2728
}
2829

2930
fn pre_freeze() {

src/test/compile-fail/borrowck-loan-in-overloaded-op.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ impl Add for foo {
2323
let foo(box i) = self;
2424
let foo(box j) = f;
2525
foo(box() (i + j))
26+
//~^ WARN deprecated syntax
2627
}
2728
}
2829

src/test/compile-fail/feature-gate-box-expr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ fn main() {
2121
println!("x: {}", x);
2222

2323
let x = box () 'c'; //~ ERROR box expression syntax is experimental
24+
//~^ WARN deprecated syntax
2425
println!("x: {}", x);
2526
}

src/test/compile-fail/feature-gate-placement-expr.rs

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ fn main() {
2020
use std::boxed::HEAP;
2121

2222
let x = box (HEAP) 'c'; //~ ERROR placement-in expression syntax is experimental
23+
//~^ WARN deprecated syntax
2324
println!("x: {}", x);
2425

2526
let x = in HEAP { 'c' }; //~ ERROR placement-in expression syntax is experimental

src/test/compile-fail/issue-14084.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ fn main() {
1515
box ( () ) 0;
1616
//~^ ERROR: the trait `core::ops::Placer<_>` is not implemented
1717
//~| ERROR: the trait `core::ops::Placer<_>` is not implemented
18+
//~| WARN deprecated syntax
1819
}

src/test/compile-fail/moves-based-on-type-tuple.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010

1111
#![feature(box_syntax)]
1212

13-
fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> { box() (x, x) } //~ ERROR use of moved value
13+
fn dup(x: Box<isize>) -> Box<(Box<isize>,Box<isize>)> {
14+
box() (x, x) //~ ERROR use of moved value
15+
//~^ WARN deprecated syntax
16+
}
1417
fn main() {
1518
dup(box 3);
1619
}

src/test/parse-fail/parenthesized-box-expr-message.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ fn main() {
1414
box (1 + 1)
1515
//~^ HELP try using `box ()` instead:
1616
//~| SUGGESTION box () (1 + 1)
17+
//~| WARN deprecated syntax
1718
; //~ ERROR expected expression, found `;`
1819
}

0 commit comments

Comments
 (0)