Skip to content

Commit 8f939db

Browse files
committed
Auto merge of #2815 - saethlin:rustup, r=oli-obk
rustup
2 parents f115296 + 4f5fe49 commit 8f939db

14 files changed

+24
-75
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ff4b772f805ec1e1c1bd7e189ab8d5a4e3a6ef13
1+
1716932743a7b3705cbf0c34db0c4e070ed1930d

tests/fail/function_pointers/execute_memory.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
// Validation makes this fail in the wrong place
22
//@compile-flags: -Zmiri-disable-validation
33

4-
#![feature(box_syntax)]
5-
64
fn main() {
7-
let x = box 42;
5+
let x = Box::new(42);
86
unsafe {
97
let f = std::mem::transmute::<Box<i32>, fn()>(x);
108
f() //~ ERROR: function pointer but it does not point to a function

tests/pass/drop_empty_slice.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
#![feature(box_syntax)]
2-
31
fn main() {
42
// With the nested Vec, this is calling Offset(Unique::empty(), 0) on drop.
53
let args: Vec<Vec<i32>> = Vec::new();
6-
let _val = box args;
4+
let _val = Box::new(args);
75
}

tests/pass/dst-struct.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(box_syntax)]
2-
31
struct Fat<T: ?Sized> {
42
f1: isize,
53
f2: &'static str,
@@ -109,14 +107,14 @@ pub fn main() {
109107
assert_eq!((*f2)[1], 2);
110108

111109
// Nested Box.
112-
let f1: Box<Fat<[isize; 3]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
110+
let f1: Box<Fat<[isize; 3]>> = Box::new(Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] });
113111
foo(&*f1);
114112
let f2: Box<Fat<[isize]>> = f1;
115113
foo(&*f2);
116114

117115
let f3: Box<Fat<[isize]>> =
118116
Box::<Fat<[_; 3]>>::new(Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] });
119117
foo(&*f3);
120-
let f4: Box<Fat<[isize]>> = box Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] };
118+
let f4: Box<Fat<[isize]>> = Box::new(Fat { f1: 5, f2: "some str", ptr: [1, 2, 3] });
121119
foo(&*f4);
122120
}

tests/pass/heap.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
#![feature(box_syntax)]
2-
31
fn make_box() -> Box<(i16, i16)> {
42
Box::new((1, 2))
53
}
64

7-
fn make_box_syntax() -> Box<(i16, i16)> {
8-
box (1, 2)
9-
}
10-
115
fn allocate_reallocate() {
126
let mut s = String::new();
137

@@ -29,6 +23,5 @@ fn allocate_reallocate() {
2923

3024
fn main() {
3125
assert_eq!(*make_box(), (1, 2));
32-
assert_eq!(*make_box_syntax(), (1, 2));
3326
allocate_reallocate();
3427
}

tests/pass/intrinsics-integer.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org)
103

114
#![feature(core_intrinsics)]
125
use std::intrinsics::*;

tests/pass/intrinsics-math.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org)
103

114
macro_rules! assert_approx_eq {
125
($a:expr, $b:expr) => {{

tests/pass/issues/issue-30530.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
1-
// Copyright 2012-2016 The Rust Project Developers. See the COPYRIGHT
2-
// file at the top-level directory of this distribution and at
3-
// http://rust-lang.org/COPYRIGHT.
4-
//
5-
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
// option. This file may not be copied, modified, or distributed
9-
// except according to those terms.
1+
// SPDX-License-Identifier: MIT OR Apache-2.0
2+
// SPDX-FileCopyrightText: The Rust Project Developers (see https://thanks.rust-lang.org)
103

114
// Regression test for Issue #30530: alloca's created for storing
125
// intermediate scratch values during brace-less match arms need to be

tests/pass/issues/issue-3794.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(box_syntax)]
2-
31
trait T {
42
fn print(&self);
53
}
@@ -25,7 +23,7 @@ fn print_s(s: &S) {
2523
}
2624

2725
pub fn main() {
28-
let s: Box<S> = box S { s: 5 };
26+
let s: Box<S> = Box::new(S { s: 5 });
2927
print_s(&*s);
3028
let t: Box<dyn T> = s as Box<dyn T>;
3129
print_t(&*t);

tests/pass/move-arg-2-unique.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
#![feature(box_syntax)]
2-
31
fn test(foo: Box<Vec<isize>>) {
42
assert_eq!((*foo)[0], 10);
53
}
64

75
pub fn main() {
8-
let x = box vec![10];
6+
let x = Box::new(vec![10]);
97
// Test forgetting a local by move-in
108
test(x);
119
}

0 commit comments

Comments
 (0)