Skip to content

Commit a5bf6d2

Browse files
committed
Rustup to rustc 1.52.0-nightly (83b30a6 2021-02-20)
1 parent 013b3c5 commit a5bf6d2

File tree

4 files changed

+16
-27
lines changed

4 files changed

+16
-27
lines changed

build_sysroot/Cargo.lock

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/arbitrary_self_types_pointers_and_wrappers.rs

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
// Adapted from rustc run-pass test suite
22

3-
#![feature(no_core, arbitrary_self_types, box_syntax)]
3+
#![feature(arbitrary_self_types, unsize, coerce_unsized, dispatch_from_dyn)]
44
#![feature(rustc_attrs)]
55

6-
#![feature(start, lang_items)]
7-
#![no_core]
8-
9-
extern crate mini_core;
10-
11-
use mini_core::*;
12-
13-
macro_rules! assert_eq {
14-
($l:expr, $r: expr) => {
15-
if $l != $r {
16-
panic(stringify!($l != $r));
17-
}
18-
}
19-
}
6+
use std::{
7+
ops::{Deref, CoerceUnsized, DispatchFromDyn},
8+
marker::Unsize,
9+
};
2010

2111
struct Ptr<T: ?Sized>(Box<T>);
2212

@@ -67,16 +57,13 @@ impl Trait for i32 {
6757
}
6858
}
6959

70-
#[start]
71-
fn main(_: isize, _: *const *const u8) -> isize {
72-
let pw = Ptr(box Wrapper(5)) as Ptr<Wrapper<dyn Trait>>;
60+
fn main() {
61+
let pw = Ptr(Box::new(Wrapper(5))) as Ptr<Wrapper<dyn Trait>>;
7362
assert_eq!(pw.ptr_wrapper(), 5);
7463

75-
let wp = Wrapper(Ptr(box 6)) as Wrapper<Ptr<dyn Trait>>;
64+
let wp = Wrapper(Ptr(Box::new(6))) as Wrapper<Ptr<dyn Trait>>;
7665
assert_eq!(wp.wrapper_ptr(), 6);
7766

78-
let wpw = Wrapper(Ptr(box Wrapper(7))) as Wrapper<Ptr<Wrapper<dyn Trait>>>;
67+
let wpw = Wrapper(Ptr(Box::new(Wrapper(7)))) as Wrapper<Ptr<Wrapper<dyn Trait>>>;
7968
assert_eq!(wpw.wrapper_ptr_wrapper(), 7);
80-
81-
0
8269
}

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nightly-2021-02-09
1+
nightly-2021-02-21

scripts/tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ function no_sysroot_tests() {
2727
$MY_RUSTC example/mini_core_hello_world.rs --crate-name mini_core_hello_world --crate-type bin -g --target "$TARGET_TRIPLE"
2828
$RUN_WRAPPER ./target/out/mini_core_hello_world abc bcd
2929
# (echo "break set -n main"; echo "run"; sleep 1; echo "si -c 10"; sleep 1; echo "frame variable") | lldb -- ./target/out/mini_core_hello_world abc bcd
30+
}
3031

32+
function base_sysroot_tests() {
3133
echo "[AOT] arbitrary_self_types_pointers_and_wrappers"
3234
$MY_RUSTC example/arbitrary_self_types_pointers_and_wrappers.rs --crate-name arbitrary_self_types_pointers_and_wrappers --crate-type bin --target "$TARGET_TRIPLE"
3335
$RUN_WRAPPER ./target/out/arbitrary_self_types_pointers_and_wrappers
34-
}
3536

36-
function base_sysroot_tests() {
3737
echo "[AOT] alloc_system"
3838
$MY_RUSTC example/alloc_system.rs --crate-type lib --target "$TARGET_TRIPLE"
3939

0 commit comments

Comments
 (0)