Skip to content

Commit e8b190a

Browse files
committed
Auto merge of #66143 - Centril:rollup-qmzuex0, r=Centril
Rollup of 9 pull requests Successful merges: - #65776 (Rename `LocalInternedString` and more) - #65973 (caller_location: point to macro invocation sites, like file!/line!, and use in core::panic!.) - #66015 (librustc_lexer: Refactor the module) - #66062 (Configure LLVM module PIC level) - #66086 (bump smallvec to 1.0) - #66092 (Use KERN_ARND syscall for random numbers on NetBSD, same as FreeBSD.) - #66103 (Add target thumbv7neon-unknown-linux-musleabihf) - #66133 (Update the bundled `wasi-libc` repository) - #66139 (use American spelling for `pluralize!`) Failed merges: r? @ghost
2 parents e4931ea + 4f9651b commit e8b190a

File tree

91 files changed

+479
-381
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+479
-381
lines changed

Cargo.lock

+31-25
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ name = "arena"
6868
version = "0.0.0"
6969
dependencies = [
7070
"rustc_data_structures",
71-
"smallvec",
71+
"smallvec 1.0.0",
7272
]
7373

7474
[[package]]
@@ -487,7 +487,7 @@ dependencies = [
487487
"regex-syntax",
488488
"semver",
489489
"serde",
490-
"smallvec",
490+
"smallvec 0.6.10",
491491
"toml",
492492
"unicode-normalization",
493493
"url 2.1.0",
@@ -655,7 +655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
655655
checksum = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b"
656656
dependencies = [
657657
"crossbeam-utils 0.6.5",
658-
"smallvec",
658+
"smallvec 0.6.10",
659659
]
660660

661661
[[package]]
@@ -2392,7 +2392,7 @@ dependencies = [
23922392
"libc",
23932393
"rand 0.6.1",
23942394
"rustc_version",
2395-
"smallvec",
2395+
"smallvec 0.6.10",
23962396
"winapi 0.3.6",
23972397
]
23982398

@@ -2407,7 +2407,7 @@ dependencies = [
24072407
"libc",
24082408
"redox_syscall",
24092409
"rustc_version",
2410-
"smallvec",
2410+
"smallvec 0.6.10",
24112411
"winapi 0.3.6",
24122412
]
24132413

@@ -3135,7 +3135,7 @@ dependencies = [
31353135
"rustc_target",
31363136
"scoped-tls",
31373137
"serialize",
3138-
"smallvec",
3138+
"smallvec 1.0.0",
31393139
"syntax",
31403140
"syntax_pos",
31413141
]
@@ -3147,7 +3147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
31473147
checksum = "a623fd4805842e9bd0bb6e6dace63efede0ee22de4522a0b03b7c3d15a22f009"
31483148
dependencies = [
31493149
"rustc-ap-rustc_data_structures",
3150-
"smallvec",
3150+
"smallvec 0.6.10",
31513151
]
31523152

31533153
[[package]]
@@ -3176,7 +3176,7 @@ dependencies = [
31763176
"rustc-hash",
31773177
"rustc-rayon 0.2.0",
31783178
"rustc-rayon-core 0.2.0",
3179-
"smallvec",
3179+
"smallvec 0.6.10",
31803180
"stable_deref_trait",
31813181
]
31823182

@@ -3204,7 +3204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
32043204
checksum = "457a5c204ae2fdaa5bdb5b196e58ca59896870d80445fe423063c9453496e3ea"
32053205
dependencies = [
32063206
"rustc-ap-serialize",
3207-
"smallvec",
3207+
"smallvec 0.6.10",
32083208
]
32093209

32103210
[[package]]
@@ -3250,7 +3250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
32503250
checksum = "92679240e86f4583cc05f8dcf6439bdab87bac9e6555718469176de9bd52ba20"
32513251
dependencies = [
32523252
"indexmap",
3253-
"smallvec",
3253+
"smallvec 0.6.10",
32543254
]
32553255

32563256
[[package]]
@@ -3270,7 +3270,7 @@ dependencies = [
32703270
"rustc-ap-serialize",
32713271
"rustc-ap-syntax_pos",
32723272
"scoped-tls",
3273-
"smallvec",
3273+
"smallvec 0.6.10",
32743274
]
32753275

32763276
[[package]]
@@ -3393,7 +3393,7 @@ dependencies = [
33933393
"crossbeam-utils 0.6.5",
33943394
"serde",
33953395
"serde_json",
3396-
"smallvec",
3396+
"smallvec 0.6.10",
33973397
"syn 0.15.35",
33983398
"url 2.1.0",
33993399
"winapi 0.3.6",
@@ -3404,7 +3404,7 @@ name = "rustc_apfloat"
34043404
version = "0.0.0"
34053405
dependencies = [
34063406
"bitflags",
3407-
"smallvec",
3407+
"smallvec 1.0.0",
34083408
]
34093409

34103410
[[package]]
@@ -3484,7 +3484,7 @@ dependencies = [
34843484
"rustc-rayon-core 0.3.0",
34853485
"rustc_index",
34863486
"serialize",
3487-
"smallvec",
3487+
"smallvec 1.0.0",
34883488
"stable_deref_trait",
34893489
]
34903490

@@ -3552,7 +3552,7 @@ name = "rustc_index"
35523552
version = "0.0.0"
35533553
dependencies = [
35543554
"serialize",
3555-
"smallvec",
3555+
"smallvec 1.0.0",
35563556
]
35573557

35583558
[[package]]
@@ -3579,7 +3579,7 @@ dependencies = [
35793579
"rustc_traits",
35803580
"rustc_typeck",
35813581
"serialize",
3582-
"smallvec",
3582+
"smallvec 1.0.0",
35833583
"syntax",
35843584
"syntax_expand",
35853585
"syntax_ext",
@@ -3650,7 +3650,7 @@ dependencies = [
36503650
"rustc_index",
36513651
"rustc_target",
36523652
"serialize",
3653-
"smallvec",
3653+
"smallvec 1.0.0",
36543654
"stable_deref_trait",
36553655
"syntax",
36563656
"syntax_expand",
@@ -3675,7 +3675,7 @@ dependencies = [
36753675
"rustc_lexer",
36763676
"rustc_target",
36773677
"serialize",
3678-
"smallvec",
3678+
"smallvec 1.0.0",
36793679
"syntax",
36803680
"syntax_pos",
36813681
]
@@ -3746,7 +3746,7 @@ dependencies = [
37463746
"rustc_data_structures",
37473747
"rustc_errors",
37483748
"rustc_metadata",
3749-
"smallvec",
3749+
"smallvec 1.0.0",
37503750
"syntax",
37513751
"syntax_expand",
37523752
"syntax_pos",
@@ -3799,7 +3799,7 @@ dependencies = [
37993799
"rustc",
38003800
"rustc_data_structures",
38013801
"rustc_target",
3802-
"smallvec",
3802+
"smallvec 1.0.0",
38033803
"syntax",
38043804
"syntax_pos",
38053805
]
@@ -3826,7 +3826,7 @@ dependencies = [
38263826
"rustc_errors",
38273827
"rustc_index",
38283828
"rustc_target",
3829-
"smallvec",
3829+
"smallvec 1.0.0",
38303830
"syntax",
38313831
"syntax_pos",
38323832
]
@@ -4070,7 +4070,7 @@ name = "serialize"
40704070
version = "0.0.0"
40714071
dependencies = [
40724072
"indexmap",
4073-
"smallvec",
4073+
"smallvec 1.0.0",
40744074
]
40754075

40764076
[[package]]
@@ -4134,6 +4134,12 @@ version = "0.6.10"
41344134
source = "registry+https://github.com/rust-lang/crates.io-index"
41354135
checksum = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
41364136

4137+
[[package]]
4138+
name = "smallvec"
4139+
version = "1.0.0"
4140+
source = "registry+https://github.com/rust-lang/crates.io-index"
4141+
checksum = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86"
4142+
41374143
[[package]]
41384144
name = "socket2"
41394145
version = "0.3.8"
@@ -4359,7 +4365,7 @@ dependencies = [
43594365
"rustc_target",
43604366
"scoped-tls",
43614367
"serialize",
4362-
"smallvec",
4368+
"smallvec 1.0.0",
43634369
"syntax_pos",
43644370
]
43654371

@@ -4377,7 +4383,7 @@ dependencies = [
43774383
"rustc_target",
43784384
"scoped-tls",
43794385
"serialize",
4380-
"smallvec",
4386+
"smallvec 1.0.0",
43814387
"syntax",
43824388
"syntax_pos",
43834389
]
@@ -4391,7 +4397,7 @@ dependencies = [
43914397
"rustc_data_structures",
43924398
"rustc_errors",
43934399
"rustc_target",
4394-
"smallvec",
4400+
"smallvec 1.0.0",
43954401
"syntax",
43964402
"syntax_expand",
43974403
"syntax_pos",

src/ci/docker/dist-various-2/build-wasi-toolchain.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
set -ex
66

7-
# Originally from https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
8-
curl https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/clang%2Bllvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \
7+
# Originally from https://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
8+
curl https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/clang%2Bllvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz | \
99
tar xJf -
10-
export PATH=`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
10+
export PATH=`pwd`/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
1111

12-
git clone https://github.com/CraneStation/wasi-sysroot
12+
git clone https://github.com/CraneStation/wasi-libc
1313

14-
cd wasi-sysroot
15-
git reset --hard e5f14be38362f1ab83302895a6e74b2ffd0e2302
14+
cd wasi-libc
15+
git reset --hard a94d2d04e7722b323573da2bd04e909a5763d35b
1616
make -j$(nproc) INSTALL_DIR=/wasm32-wasi install
1717

1818
cd ..
19-
rm -rf reference-sysroot-wasi
19+
rm -rf wasi-libc
2020
rm -rf clang+llvm*

src/libarena/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ path = "lib.rs"
1010

1111
[dependencies]
1212
rustc_data_structures = { path = "../librustc_data_structures" }
13-
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
13+
smallvec = { version = "1.0", features = ["union", "may_dangle"] }

src/libcore/macros.rs

+15-17
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,29 @@ macro_rules! panic {
2626
/// For details, see `std::macros`.
2727
#[cfg(not(bootstrap))]
2828
#[macro_export]
29-
#[allow_internal_unstable(core_panic, panic_internals)]
29+
#[allow_internal_unstable(core_panic,
30+
// FIXME(anp, eddyb) `core_intrinsics` is used here to allow calling
31+
// the `caller_location` intrinsic, but once `#[track_caller]` is implemented,
32+
// `panicking::{panic, panic_fmt}` can use that instead of a `Location` argument.
33+
core_intrinsics,
34+
)]
3035
#[stable(feature = "core", since = "1.6.0")]
3136
macro_rules! panic {
3237
() => (
3338
$crate::panic!("explicit panic")
3439
);
35-
($msg:expr) => ({
36-
const LOC: &$crate::panic::Location<'_> = &$crate::panic::Location::internal_constructor(
37-
$crate::file!(),
38-
$crate::line!(),
39-
$crate::column!(),
40-
);
41-
$crate::panicking::panic($msg, LOC)
42-
});
40+
($msg:expr) => (
41+
$crate::panicking::panic($msg, $crate::intrinsics::caller_location())
42+
);
4343
($msg:expr,) => (
4444
$crate::panic!($msg)
4545
);
46-
($fmt:expr, $($arg:tt)+) => ({
47-
const LOC: &$crate::panic::Location<'_> = &$crate::panic::Location::internal_constructor(
48-
$crate::file!(),
49-
$crate::line!(),
50-
$crate::column!(),
51-
);
52-
$crate::panicking::panic_fmt($crate::format_args!($fmt, $($arg)+), LOC)
53-
});
46+
($fmt:expr, $($arg:tt)+) => (
47+
$crate::panicking::panic_fmt(
48+
$crate::format_args!($fmt, $($arg)+),
49+
$crate::intrinsics::caller_location(),
50+
)
51+
);
5452
}
5553

5654
/// Asserts that two expressions are equal to each other (using [`PartialEq`]).

src/librustc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ parking_lot = "0.9"
3939
byteorder = { version = "1.3" }
4040
chalk-engine = { version = "0.9.0", default-features=false }
4141
rustc_fs_util = { path = "../librustc_fs_util" }
42-
smallvec = { version = "0.6.8", features = ["union", "may_dangle"] }
42+
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
4343
measureme = "0.4"

src/librustc/arena.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ impl DropArena {
304304
// Move the content to the arena by copying it and then forgetting
305305
// the content of the SmallVec
306306
vec.as_ptr().copy_to_nonoverlapping(start_ptr, len);
307-
mem::forget(vec.drain());
307+
mem::forget(vec.drain(..));
308308

309309
// Record the destructors after doing the allocation as that may panic
310310
// and would cause `object`'s destuctor to run twice if it was recorded before

src/librustc/dep_graph/dep_node.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ impl<'tcx> DepNodeParams<'tcx> for CrateNum {
525525
}
526526

527527
fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String {
528-
tcx.crate_name(*self).as_str().to_string()
528+
tcx.crate_name(*self).to_string()
529529
}
530530
}
531531

src/librustc/hir/lowering.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3382,7 +3382,7 @@ pub fn is_range_literal(sess: &Session, expr: &hir::Expr) -> bool {
33823382
// either in std or core, i.e. has either a `::std::ops::Range` or
33833383
// `::core::ops::Range` prefix.
33843384
fn is_range_path(path: &Path) -> bool {
3385-
let segs: Vec<_> = path.segments.iter().map(|seg| seg.ident.as_str().to_string()).collect();
3385+
let segs: Vec<_> = path.segments.iter().map(|seg| seg.ident.to_string()).collect();
33863386
let segs: Vec<_> = segs.iter().map(|seg| &**seg).collect();
33873387

33883388
// "{{root}}" is the equivalent of `::` prefix in `Path`.
@@ -3423,7 +3423,7 @@ pub fn is_range_literal(sess: &Session, expr: &hir::Expr) -> bool {
34233423
ExprKind::Call(ref func, _) => {
34243424
if let ExprKind::Path(QPath::TypeRelative(ref ty, ref segment)) = func.kind {
34253425
if let TyKind::Path(QPath::Resolved(None, ref path)) = ty.kind {
3426-
let new_call = segment.ident.as_str() == "new";
3426+
let new_call = segment.ident.name == sym::new;
34273427
return is_range_path(&path) && is_lit(sess, &expr.span) && new_call;
34283428
}
34293429
}

src/librustc/hir/print.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ impl<'a> State<'a> {
564564
}
565565
hir::ItemKind::GlobalAsm(ref ga) => {
566566
self.head(visibility_qualified(&item.vis, "global asm"));
567-
self.s.word(ga.asm.as_str().to_string());
567+
self.s.word(ga.asm.to_string());
568568
self.end()
569569
}
570570
hir::ItemKind::TyAlias(ref ty, ref generics) => {
@@ -1855,7 +1855,7 @@ impl<'a> State<'a> {
18551855
self.commasep(Inconsistent, &decl.inputs, |s, ty| {
18561856
s.ibox(INDENT_UNIT);
18571857
if let Some(arg_name) = arg_names.get(i) {
1858-
s.s.word(arg_name.as_str().to_string());
1858+
s.s.word(arg_name.to_string());
18591859
s.s.word(":");
18601860
s.s.space();
18611861
} else if let Some(body_id) = body_id {

0 commit comments

Comments
 (0)