Skip to content

Rollup of 9 pull requests #66143

New issue

Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “No Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? No Sign in to your account

Merged
merged 34 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c17f89d
caller_location: point to macro invocation sites, like file!/line!.
eddyb Oct 30, 2019
49f9626
caller_location: use in core::panic!.
eddyb Oct 30, 2019
1b154a3
Rename `LocalInternedString` as `SymbolStr`.
nnethercote Oct 21, 2019
2f7d7c2
Remove an erroneous comment.
nnethercote Oct 21, 2019
e6d541a
Add some explanatory comments.
nnethercote Oct 22, 2019
9cf59b5
Remove some unnecessary renamings of constants.
nnethercote Oct 21, 2019
5bc7084
Convert `x.as_str().to_string()` to `x.to_string()` where possible.
nnethercote Oct 21, 2019
b9cef69
Simplify various `Symbol` use points.
nnethercote Oct 22, 2019
d0db290
Remove the `AsRef` impl for `SymbolStr`.
nnethercote Oct 22, 2019
0825b35
librustc_lexer: Add methods "first" and "second" to the "Cursor"
popzxc Nov 3, 2019
72767a8
librustc_lexer: Introduce "eat_while" and "eat_identifier" methods
popzxc Nov 3, 2019
e0c45f7
librustc_lexer: Make "eat_float_exponent" return bool instead of result
popzxc Nov 3, 2019
649a524
librustc_lexer: Simplify "single_quoted_string" method
popzxc Nov 3, 2019
d6f722d
librustc_lexer: Simplify "double_quoted_string" method
popzxc Nov 3, 2019
6e350bd
librustc_lexer: Simplify "raw_double_quoted_string" method
popzxc Nov 3, 2019
1943079
Configure LLVM module PIC level
smaeul Nov 3, 2019
ecd2673
librustc_lexer: Simplify "lifetime_or_char" method
popzxc Nov 3, 2019
e8b8d2a
librustc_lexer: Reorder imports in lib.rs
popzxc Nov 3, 2019
31735b0
librustc_lexer: Make nth_char method private
popzxc Nov 3, 2019
90b8d34
bump smallvec to 1.0
RalfJung Nov 4, 2019
23d2211
Use KERN_ARND syscall for random numbers on NetBSD, same as FreeBSD.
alarixnia Nov 4, 2019
b4f92ea
Use any() in code shared between FreeBSD and NetBSD
alarixnia Nov 4, 2019
d01ebbb
Add target thumbv7neon-unknown-linux-musleabihf
smaeul Nov 5, 2019
73df5c5
Update the bundled `wasi-libc` repository
alexcrichton Nov 5, 2019
ad550b8
use American spelling for `pluralize!`
euclio Nov 5, 2019
a0b4b4d
Rollup merge of #65776 - nnethercote:rename-LocalInternedString-and-m…
Centril Nov 6, 2019
24af0c9
Rollup merge of #65973 - eddyb:caller-location-panic, r=petrochenkov
Centril Nov 6, 2019
81550a0
Rollup merge of #66015 - popzxc:refactor-librustc_parser, r=matklad
Centril Nov 6, 2019
98cbe17
Rollup merge of #66062 - smaeul:patch/pic-level, r=estebank
Centril Nov 6, 2019
167b8fe
Rollup merge of #66086 - RalfJung:smallvec, r=nagisa
Centril Nov 6, 2019
828a3ee
Rollup merge of #66092 - niacat:master, r=nagisa
Centril Nov 6, 2019
40558c3
Rollup merge of #66103 - smaeul:patch/thumb-musl, r=nagisa
Centril Nov 6, 2019
7f7218f
Rollup merge of #66133 - alexcrichton:update-wasi-libc, r=Mark-Simula…
Centril Nov 6, 2019
4f9651b
Rollup merge of #66139 - euclio:pluralize, r=nagisa
Centril Nov 6, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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