Skip to content

Commit

Permalink
Auto merge of #66143 - Centril:rollup-qmzuex0, r=Centril
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Nov 6, 2019
2 parents e4931ea + 4f9651b commit e8b190a
Show file tree
Hide file tree
Showing 91 changed files with 479 additions and 381 deletions.
56 changes: 31 additions & 25 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ name = "arena"
version = "0.0.0"
dependencies = [
"rustc_data_structures",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand Down Expand Up @@ -487,7 +487,7 @@ dependencies = [
"regex-syntax",
"semver",
"serde",
"smallvec",
"smallvec 0.6.10",
"toml",
"unicode-normalization",
"url 2.1.0",
Expand Down Expand Up @@ -655,7 +655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0f0ed1a4de2235cabda8558ff5840bffb97fcb64c97827f354a451307df5f72b"
dependencies = [
"crossbeam-utils 0.6.5",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand Down Expand Up @@ -2392,7 +2392,7 @@ dependencies = [
"libc",
"rand 0.6.1",
"rustc_version",
"smallvec",
"smallvec 0.6.10",
"winapi 0.3.6",
]

Expand All @@ -2407,7 +2407,7 @@ dependencies = [
"libc",
"redox_syscall",
"rustc_version",
"smallvec",
"smallvec 0.6.10",
"winapi 0.3.6",
]

Expand Down Expand Up @@ -3135,7 +3135,7 @@ dependencies = [
"rustc_target",
"scoped-tls",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand All @@ -3147,7 +3147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a623fd4805842e9bd0bb6e6dace63efede0ee22de4522a0b03b7c3d15a22f009"
dependencies = [
"rustc-ap-rustc_data_structures",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand Down Expand Up @@ -3176,7 +3176,7 @@ dependencies = [
"rustc-hash",
"rustc-rayon 0.2.0",
"rustc-rayon-core 0.2.0",
"smallvec",
"smallvec 0.6.10",
"stable_deref_trait",
]

Expand Down Expand Up @@ -3204,7 +3204,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "457a5c204ae2fdaa5bdb5b196e58ca59896870d80445fe423063c9453496e3ea"
dependencies = [
"rustc-ap-serialize",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand Down Expand Up @@ -3250,7 +3250,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92679240e86f4583cc05f8dcf6439bdab87bac9e6555718469176de9bd52ba20"
dependencies = [
"indexmap",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand All @@ -3270,7 +3270,7 @@ dependencies = [
"rustc-ap-serialize",
"rustc-ap-syntax_pos",
"scoped-tls",
"smallvec",
"smallvec 0.6.10",
]

[[package]]
Expand Down Expand Up @@ -3393,7 +3393,7 @@ dependencies = [
"crossbeam-utils 0.6.5",
"serde",
"serde_json",
"smallvec",
"smallvec 0.6.10",
"syn 0.15.35",
"url 2.1.0",
"winapi 0.3.6",
Expand All @@ -3404,7 +3404,7 @@ name = "rustc_apfloat"
version = "0.0.0"
dependencies = [
"bitflags",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand Down Expand Up @@ -3484,7 +3484,7 @@ dependencies = [
"rustc-rayon-core 0.3.0",
"rustc_index",
"serialize",
"smallvec",
"smallvec 1.0.0",
"stable_deref_trait",
]

Expand Down Expand Up @@ -3552,7 +3552,7 @@ name = "rustc_index"
version = "0.0.0"
dependencies = [
"serialize",
"smallvec",
"smallvec 1.0.0",
]

[[package]]
Expand All @@ -3579,7 +3579,7 @@ dependencies = [
"rustc_traits",
"rustc_typeck",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_ext",
Expand Down Expand Up @@ -3650,7 +3650,7 @@ dependencies = [
"rustc_index",
"rustc_target",
"serialize",
"smallvec",
"smallvec 1.0.0",
"stable_deref_trait",
"syntax",
"syntax_expand",
Expand All @@ -3675,7 +3675,7 @@ dependencies = [
"rustc_lexer",
"rustc_target",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand Down Expand Up @@ -3746,7 +3746,7 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_metadata",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_pos",
Expand Down Expand Up @@ -3799,7 +3799,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_target",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand All @@ -3826,7 +3826,7 @@ dependencies = [
"rustc_errors",
"rustc_index",
"rustc_target",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand Down Expand Up @@ -4070,7 +4070,7 @@ name = "serialize"
version = "0.0.0"
dependencies = [
"indexmap",
"smallvec",
"smallvec 1.0.0",
]

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

[[package]]
name = "smallvec"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ecf3b85f68e8abaa7555aa5abdb1153079387e60b718283d732f03897fcfc86"

[[package]]
name = "socket2"
version = "0.3.8"
Expand Down Expand Up @@ -4359,7 +4365,7 @@ dependencies = [
"rustc_target",
"scoped-tls",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax_pos",
]

Expand All @@ -4377,7 +4383,7 @@ dependencies = [
"rustc_target",
"scoped-tls",
"serialize",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_pos",
]
Expand All @@ -4391,7 +4397,7 @@ dependencies = [
"rustc_data_structures",
"rustc_errors",
"rustc_target",
"smallvec",
"smallvec 1.0.0",
"syntax",
"syntax_expand",
"syntax_pos",
Expand Down
14 changes: 7 additions & 7 deletions src/ci/docker/dist-various-2/build-wasi-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@

set -ex

# Originally from https://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
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 | \
# Originally from https://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04.tar.xz
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 | \
tar xJf -
export PATH=`pwd`/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH
export PATH=`pwd`/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-14.04/bin:$PATH

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

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

cd ..
rm -rf reference-sysroot-wasi
rm -rf wasi-libc
rm -rf clang+llvm*
2 changes: 1 addition & 1 deletion src/libarena/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ path = "lib.rs"

[dependencies]
rustc_data_structures = { path = "../librustc_data_structures" }
smallvec = { version = "0.6.7", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
32 changes: 15 additions & 17 deletions src/libcore/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,29 @@ macro_rules! panic {
/// For details, see `std::macros`.
#[cfg(not(bootstrap))]
#[macro_export]
#[allow_internal_unstable(core_panic, panic_internals)]
#[allow_internal_unstable(core_panic,
// FIXME(anp, eddyb) `core_intrinsics` is used here to allow calling
// the `caller_location` intrinsic, but once `#[track_caller]` is implemented,
// `panicking::{panic, panic_fmt}` can use that instead of a `Location` argument.
core_intrinsics,
)]
#[stable(feature = "core", since = "1.6.0")]
macro_rules! panic {
() => (
$crate::panic!("explicit panic")
);
($msg:expr) => ({
const LOC: &$crate::panic::Location<'_> = &$crate::panic::Location::internal_constructor(
$crate::file!(),
$crate::line!(),
$crate::column!(),
);
$crate::panicking::panic($msg, LOC)
});
($msg:expr) => (
$crate::panicking::panic($msg, $crate::intrinsics::caller_location())
);
($msg:expr,) => (
$crate::panic!($msg)
);
($fmt:expr, $($arg:tt)+) => ({
const LOC: &$crate::panic::Location<'_> = &$crate::panic::Location::internal_constructor(
$crate::file!(),
$crate::line!(),
$crate::column!(),
);
$crate::panicking::panic_fmt($crate::format_args!($fmt, $($arg)+), LOC)
});
($fmt:expr, $($arg:tt)+) => (
$crate::panicking::panic_fmt(
$crate::format_args!($fmt, $($arg)+),
$crate::intrinsics::caller_location(),
)
);
}

/// Asserts that two expressions are equal to each other (using [`PartialEq`]).
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ parking_lot = "0.9"
byteorder = { version = "1.3" }
chalk-engine = { version = "0.9.0", default-features=false }
rustc_fs_util = { path = "../librustc_fs_util" }
smallvec = { version = "0.6.8", features = ["union", "may_dangle"] }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
measureme = "0.4"
2 changes: 1 addition & 1 deletion src/librustc/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ impl DropArena {
// Move the content to the arena by copying it and then forgetting
// the content of the SmallVec
vec.as_ptr().copy_to_nonoverlapping(start_ptr, len);
mem::forget(vec.drain());
mem::forget(vec.drain(..));

// Record the destructors after doing the allocation as that may panic
// and would cause `object`'s destuctor to run twice if it was recorded before
Expand Down
2 changes: 1 addition & 1 deletion src/librustc/dep_graph/dep_node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ impl<'tcx> DepNodeParams<'tcx> for CrateNum {
}

fn to_debug_str(&self, tcx: TyCtxt<'tcx>) -> String {
tcx.crate_name(*self).as_str().to_string()
tcx.crate_name(*self).to_string()
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3382,7 +3382,7 @@ pub fn is_range_literal(sess: &Session, expr: &hir::Expr) -> bool {
// either in std or core, i.e. has either a `::std::ops::Range` or
// `::core::ops::Range` prefix.
fn is_range_path(path: &Path) -> bool {
let segs: Vec<_> = path.segments.iter().map(|seg| seg.ident.as_str().to_string()).collect();
let segs: Vec<_> = path.segments.iter().map(|seg| seg.ident.to_string()).collect();
let segs: Vec<_> = segs.iter().map(|seg| &**seg).collect();

// "{{root}}" is the equivalent of `::` prefix in `Path`.
Expand Down Expand Up @@ -3423,7 +3423,7 @@ pub fn is_range_literal(sess: &Session, expr: &hir::Expr) -> bool {
ExprKind::Call(ref func, _) => {
if let ExprKind::Path(QPath::TypeRelative(ref ty, ref segment)) = func.kind {
if let TyKind::Path(QPath::Resolved(None, ref path)) = ty.kind {
let new_call = segment.ident.as_str() == "new";
let new_call = segment.ident.name == sym::new;
return is_range_path(&path) && is_lit(sess, &expr.span) && new_call;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/librustc/hir/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ impl<'a> State<'a> {
}
hir::ItemKind::GlobalAsm(ref ga) => {
self.head(visibility_qualified(&item.vis, "global asm"));
self.s.word(ga.asm.as_str().to_string());
self.s.word(ga.asm.to_string());
self.end()
}
hir::ItemKind::TyAlias(ref ty, ref generics) => {
Expand Down Expand Up @@ -1855,7 +1855,7 @@ impl<'a> State<'a> {
self.commasep(Inconsistent, &decl.inputs, |s, ty| {
s.ibox(INDENT_UNIT);
if let Some(arg_name) = arg_names.get(i) {
s.s.word(arg_name.as_str().to_string());
s.s.word(arg_name.to_string());
s.s.word(":");
s.s.space();
} else if let Some(body_id) = body_id {
Expand Down
Loading

0 comments on commit e8b190a

Please sign in to comment.