Skip to content

Rollup of 18 pull requests #55171

New issue

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

By clicking “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? Sign in to your account

Merged
merged 56 commits into from
Oct 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
1a605a6
fix std::thread::sleep typo
Sep 28, 2018
049ccbb
update wording for std::thread::sleep
Sep 28, 2018
b63517a
update wording for thread::sleep
Oct 1, 2018
8efd9dd
codegen_llvm/misc: whitespace & formatting improvements
ljedrz Oct 9, 2018
e90e8aa
codegen_llvm/misc: remove explicit returns
ljedrz Oct 9, 2018
b07a2d0
codegen_llvm/misc: improve common patterns
ljedrz Oct 9, 2018
fa81576
codegen_llvm/misc: convert string literals with to_owned
ljedrz Oct 9, 2018
ac66b04
Run both lldb and gdb tests
tromey Oct 3, 2018
7a0fa95
improve docs on thread::sleep
Oct 11, 2018
b57366a
Improve verify_llvm_ir config option
nikic Oct 13, 2018
91f5778
doc std::fmt: the Python inspiration is already mentioned in precedin…
tshepang Oct 13, 2018
86d5a33
rustdoc: Use dyn keyword when rendering dynamic traits
ollie27 Oct 14, 2018
d4e2dca
Detect if access to localStorage is forbidden by the user's browser
thanatos Oct 15, 2018
481ad0e
regression test for issue #54597
pnkfelix Oct 15, 2018
80feed3
Deduplicate vtables within a single evaluation
oli-obk Oct 12, 2018
8ac7fa4
Synchronize get_vtable with the `codegen_llvm` one
oli-obk Oct 12, 2018
ef3ece7
Uplift some comments to doc comments
oli-obk Oct 12, 2018
c95ee9e
Add comments to remind everyone to keep the `get_vtable` impls in sync
oli-obk Oct 12, 2018
70dd9ca
Add test for #34229
estebank Oct 15, 2018
8362aa2
Extract localStorage tests out into a helper method; use in getCurren…
thanatos Oct 16, 2018
8e10ea6
[Rustc Book] Explain --cfg's arguments
Havvy Oct 16, 2018
8c186af
[Rustc Book] Quotes around value in --cfg example
Havvy Oct 16, 2018
b1d3111
Use forward compatible `FxHashMap` initialization
oli-obk Oct 16, 2018
24b74b2
end return statements and void expressions with a semicolon
ljedrz Oct 16, 2018
f40932f
Fix LLVMRustInlineAsmVerify return type mismatch
varkor Oct 16, 2018
1dd92c4
Remove HybridBitSet::dummy
ljedrz Oct 16, 2018
cbe98ec
Move usableLocalStorage() above functions that make use of it
thanatos Oct 17, 2018
c31819b
layout should not affect CTFE checks (outside of validation)
RalfJung Oct 17, 2018
350f9a2
resolve: Do not skip extern prelude during speculative resolution
petrochenkov Oct 15, 2018
3ba62dd
mir/borrowck: simplify common patterns
ljedrz Oct 16, 2018
684c4e8
mir/borrowck: a few string tweaks
ljedrz Oct 16, 2018
cd03f5d
mir/borrowck: deduplicate assignments and returns
ljedrz Oct 16, 2018
f53d2b2
mir/borrowck: remove redundant returns
ljedrz Oct 16, 2018
5620f6d
mir/borrowck: remove a redundant clone
ljedrz Oct 16, 2018
e62ce98
nll: improve allocations
ljedrz Oct 17, 2018
2bda0c1
nll: improve format operations
ljedrz Oct 17, 2018
ffecbc5
nll: improve common patterns
ljedrz Oct 17, 2018
c55e1e6
[librustdoc] Disable spellcheck for search field
akxcv Oct 17, 2018
e4ac447
Rollup merge of #54646 - vn971:fix_std_thread_sleep, r=frewsxcv
kennytm Oct 18, 2018
fd616f0
Rollup merge of #54933 - ljedrz:cleanup_codegen_llvm/misc, r=varkor
kennytm Oct 18, 2018
43ac030
Rollup merge of #54964 - tromey:run-both-gdb-and-lldb-tests, r=nikoma…
kennytm Oct 18, 2018
9ee49bb
Rollup merge of #55016 - oli-obk:vtables💥_vtables_everywhere, r=RalfJung
kennytm Oct 18, 2018
617faa9
Rollup merge of #55031 - nikic:verify_llvm_ir, r=Mark-Simulacrum
kennytm Oct 18, 2018
7538c62
Rollup merge of #55050 - tshepang:repetition, r=steveklabnik
kennytm Oct 18, 2018
ed68f1a
Rollup merge of #55077 - ollie27:rustdoc_dyn_trait, r=QuietMisdreavus
kennytm Oct 18, 2018
955016c
Rollup merge of #55080 - thanatos:fix-localstorage-crash, r=Guillaume…
kennytm Oct 18, 2018
bea91dc
Rollup merge of #55090 - pnkfelix:issue-54597-regression-test, r=este…
kennytm Oct 18, 2018
8988403
Rollup merge of #55102 - petrochenkov:trextra, r=nikomatsakis
kennytm Oct 18, 2018
2571c1c
Rollup merge of #55104 - estebank:addtest, r=alexcrichton
kennytm Oct 18, 2018
f8fa3da
Rollup merge of #55122 - ljedrz:cleanup_mir_borrowck, r=Mark-Simulacrum
kennytm Oct 18, 2018
eda6e06
Rollup merge of #55127 - ljedrz:simplify_hybridbitset, r=matthewjasper
kennytm Oct 18, 2018
6f6878c
Rollup merge of #55128 - varkor:LLVMRustInlineAsmVerify-return-bool, …
kennytm Oct 18, 2018
89b7ccf
Rollup merge of #55142 - RalfJung:miri-uninhabited-enum, r=oli-obk
kennytm Oct 18, 2018
919f434
Rollup merge of #55151 - ljedrz:cleanup_nll, r=estebank
kennytm Oct 18, 2018
7d21252
Rollup merge of #55161 - akxcv:rustdoc/disable-spellcheck, r=QuietMis…
kennytm Oct 18, 2018
1c09006
Rollup merge of #55111 - Havvy:rustc-book-cfg-examples, r=GuillaumeGomez
kennytm Oct 18, 2018
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
4 changes: 0 additions & 4 deletions src/bootstrap/bin/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,6 @@ fn main() {
cmd.arg("--cfg").arg("parallel_queries");
}

if env::var_os("RUSTC_VERIFY_LLVM_IR").is_some() {
cmd.arg("-Z").arg("verify-llvm-ir");
}

if env::var_os("RUSTC_DENY_WARNINGS").is_some() && env::var_os("RUSTC_EXTERNAL_TOOL").is_none()
{
cmd.arg("-Dwarnings");
Expand Down
4 changes: 0 additions & 4 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1000,10 +1000,6 @@ impl<'a> Builder<'a> {
cargo.env("RUSTC_BACKTRACE_ON_ICE", "1");
}

if self.config.rust_verify_llvm_ir {
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
}

cargo.env("RUSTC_VERBOSE", self.verbosity.to_string());

// in std, we want to avoid denying warnings for stage 0 as that makes cfg's painful.
Expand Down
3 changes: 3 additions & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,9 @@ pub fn rustc_cargo_env(builder: &Builder, cargo: &mut Command) {
if builder.config.rustc_parallel_queries {
cargo.env("RUSTC_PARALLEL_QUERIES", "1");
}
if builder.config.rust_verify_llvm_ir {
cargo.env("RUSTC_VERIFY_LLVM_IR", "1");
}
}

#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
Expand Down
20 changes: 6 additions & 14 deletions src/bootstrap/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -812,8 +812,7 @@ default_test!(Incremental {

default_test!(Debuginfo {
path: "src/test/debuginfo",
// What this runs varies depending on the native platform being apple
mode: "debuginfo-XXX",
mode: "debuginfo",
suite: "debuginfo"
});

Expand Down Expand Up @@ -950,18 +949,11 @@ impl Step for Compiletest {
return;
}

if mode == "debuginfo-XXX" {
return if builder.config.build.contains("apple") {
builder.ensure(Compiletest {
mode: "debuginfo-lldb",
..self
});
} else {
builder.ensure(Compiletest {
mode: "debuginfo-gdb",
..self
});
};
if mode == "debuginfo" {
return builder.ensure(Compiletest {
mode: "debuginfo-both",
..self
});
}

builder.ensure(dist::DebuggerScripts {
Expand Down
3 changes: 3 additions & 0 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ if [ "$DEPLOY$DEPLOY_ALT" != "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-llvm-assertions"
elif [ "$DEPLOY_ALT" != "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
fi
else
# We almost always want debug assertions enabled, but sometimes this takes too
Expand All @@ -74,6 +75,8 @@ else
if [ "$NO_LLVM_ASSERTIONS" = "" ]; then
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-llvm-assertions"
fi

RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
fi

if [ "$RUST_RELEASE_CHANNEL" = "nightly" ] || [ "$DIST_REQUIRE_ALL_TOOLS" = "" ]; then
Expand Down
5 changes: 5 additions & 0 deletions src/doc/rustc/src/command-line-arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ This flag will print out help information for `rustc`.

This flag can turn on or off various `#[cfg]` settings.

The value can either be a single identifier or two identifiers separated by `=`.

For examples, `--cfg 'verbose'` or `--cfg 'feature="serde"'`. These correspond
to `#[cfg(verbose)]` and `#[cfg(feature = "serde")]` respectively.

## `-L`: add a directory to the library search path

When looking for external crates, a directory passed to this flag will be searched.
Expand Down
3 changes: 1 addition & 2 deletions src/liballoc/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,7 @@
//!
//! Each argument being formatted can be transformed by a number of formatting
//! parameters (corresponding to `format_spec` in the syntax above). These
//! parameters affect the string representation of what's being formatted. This
//! syntax draws heavily from Python's, so it may seem a bit familiar.
//! parameters affect the string representation of what's being formatted.
//!
//! ## Fill/Alignment
//!
Expand Down
7 changes: 7 additions & 0 deletions src/librustc/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,15 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use std::env;

fn main() {
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rerun-if-env-changed=CFG_LIBDIR_RELATIVE");
println!("cargo:rerun-if-env-changed=CFG_COMPILER_HOST_TRIPLE");
println!("cargo:rerun-if-env-changed=RUSTC_VERIFY_LLVM_IR");

if env::var_os("RUSTC_VERIFY_LLVM_IR").is_some() {
println!("cargo:rustc-cfg=always_verify_llvm_ir");
}
}
1 change: 1 addition & 0 deletions src/librustc/session/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,7 @@ impl Session {
}
pub fn verify_llvm_ir(&self) -> bool {
self.opts.debugging_opts.verify_llvm_ir
|| cfg!(always_verify_llvm_ir)
}
pub fn borrowck_stats(&self) -> bool {
self.opts.debugging_opts.borrowck_stats
Expand Down
16 changes: 8 additions & 8 deletions src/librustc/ty/query/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,16 @@ define_queries! { <'tcx>
-> Lrc<specialization_graph::Graph>,
[] fn is_object_safe: ObjectSafety(DefId) -> bool,

// Get the ParameterEnvironment for a given item; this environment
// will be in "user-facing" mode, meaning that it is suitabe for
// type-checking etc, and it does not normalize specializable
// associated types. This is almost always what you want,
// unless you are doing MIR optimizations, in which case you
// might want to use `reveal_all()` method to change modes.
/// Get the ParameterEnvironment for a given item; this environment
/// will be in "user-facing" mode, meaning that it is suitabe for
/// type-checking etc, and it does not normalize specializable
/// associated types. This is almost always what you want,
/// unless you are doing MIR optimizations, in which case you
/// might want to use `reveal_all()` method to change modes.
[] fn param_env: ParamEnv(DefId) -> ty::ParamEnv<'tcx>,

// Trait selection queries. These are best used by invoking `ty.moves_by_default()`,
// `ty.is_copy()`, etc, since that will prune the environment where possible.
/// Trait selection queries. These are best used by invoking `ty.moves_by_default()`,
/// `ty.is_copy()`, etc, since that will prune the environment where possible.
[] fn is_copy_raw: is_copy_dep_node(ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool,
[] fn is_sized_raw: is_sized_dep_node(ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool,
[] fn is_freeze_raw: is_freeze_dep_node(ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool,
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ impl Builder<'a, 'll, 'tcx> {
// Ask LLVM to verify that the constraints are well-formed.
let constraints_ok = llvm::LLVMRustInlineAsmVerify(fty, cons);
debug!("Constraint verification result: {:?}", constraints_ok);
if constraints_ok == llvm::True {
if constraints_ok {
let v = llvm::LLVMRustInlineAsm(
fty, asm, cons, volatile, alignstack, dia);
Some(self.call(v, inputs, None))
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_codegen_llvm/debuginfo/create_scope_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pub struct MirDebugScope<'ll> {

impl MirDebugScope<'ll> {
pub fn is_valid(&self) -> bool {
!self.scope_metadata.is_none()
self.scope_metadata.is_some()
}
}

Expand Down
Loading