Alex Crichton [Thu, 21 Dec 2017 15:03:16 +0000 (07:03 -0800)]
rustc: Set release mode cgus to 16 by default
This commit is the next attempt to enable multiple codegen units by default in
release mode, getting some of those sweet, sweet parallelism wins by running
codegen in parallel. Performance should not be lost due to ThinLTO being on by
default as well.
bors [Thu, 21 Dec 2017 10:56:44 +0000 (10:56 +0000)]
Auto merge of #46772 - alexcrichton:thinlto-passes, r=michaelwoerister
rustc: Work around `DICompileUnit` bugs in LLVM
This commit implements a workaround for #46346 which basically just
avoids triggering the situation that LLVM's bug
https://bugs.llvm.org/show_bug.cgi?id=35562 arises. More details can be
found in the code itself but this commit is also intended to ...
bors [Thu, 21 Dec 2017 05:24:45 +0000 (05:24 +0000)]
Auto merge of #46531 - cramertj:no-mo-modrs, r=nikomatsakis
Implement non-mod.rs mod statements
Fixes https://github.com/rust-lang/rust/issues/45385, cc https://github.com/rust-lang/rust/issues/44660
This will fail tidy right now because it doesn't recognize my UI tests as feature-gate tests. However, I'm not sure if compile-fail will work out either because compile-fail usually requires there to be error patterns in the top-level file, which isn't possible with this feature. What's the recommended way to handle this?
bors [Thu, 21 Dec 2017 02:48:17 +0000 (02:48 +0000)]
Auto merge of #46083 - petrochenkov:morepriv, r=nikomatsakis
Type privacy polishing
Various preparations before implementing https://github.com/rust-lang/rfcs/pull/2145 containing final minor breaking changes (mostly for unstable code or code using `allow(private_in_public)`).
(Continuation of https://github.com/rust-lang/rust/pull/42125, https://github.com/rust-lang/rust/pull/44633 and https://github.com/rust-lang/rust/pull/41332.)
bors [Wed, 20 Dec 2017 23:26:20 +0000 (23:26 +0000)]
Auto merge of #46862 - nikomatsakis:nll-master, r=arielb1
NLL feature complete (adds `feature(nll)`)!
This is the final PR for the nll-master branch; it brings over all remaining content.
The contents of the branch include:
- track causal information and use it to report extended errors
- handle `impl Trait` in NLL code
- improve printing of outlives errors
- add `#![feature(nll)]` and some more sample tests
The commits should for the most part build independently.
bors [Wed, 20 Dec 2017 17:34:17 +0000 (17:34 +0000)]
Auto merge of #46583 - scottmcm:fix-static-i128-lower, r=eddyb
Fix -Z lower_128bit_ops handling of statics
Avoids ICEs such as the following:
> error: internal compiler error: src\librustc_metadata\cstore_impl.rs:131:
> get_optimized_mir: missing MIR for `DefId(8/0:40 ~
> compiler_builtins[9532]::int[0]::addsub[0]::rust_i128_addo[0])`
kennytm [Wed, 20 Dec 2017 13:22:03 +0000 (21:22 +0800)]
Rollup merge of #46852 - scottmcm:asm-placecontext, r=arielb1
Split PlaceContext::Store into Store & AsmOutput
Outputs in InlineAsm can be read-write, so splitting it out is useful for things like Store-Store folding, as that's unsound for a Store-AsmOutput.
This PR is intended to make no changes, just be the mechanical split of the enum. Future changes can use the split, like a MIR pass I'm working on and perhaps two-phase borrows (see this FIXME: https://github.com/rust-lang/rust/pull/46852/files#diff-74dcd7740ab2104cd2b9a3b68dd4f208R543)
kennytm [Wed, 20 Dec 2017 13:21:58 +0000 (21:21 +0800)]
Rollup merge of #46828 - vi:hash_for_systemtime_instant, r=dtolnay
Add Hash impl for SystemTime and Instant
Closes #46670.
Not sure how to actually test non-Linux platforms.
`rustc --target=i686-pc-windows-gnu --crate-name std --crate-type rlib src/libstd/lib.rs -o q.rlib` works a bit, but for Redox I'm not sure what to do.
kennytm [Wed, 20 Dec 2017 13:21:57 +0000 (21:21 +0800)]
Rollup merge of #46794 - Sh4rK:distribute-intrinsic-natvis, r=estebank
Distribute intrinsic.natvis with the compiler for windows-msvc.
This adds `intrinsic.natvis` to the `windows-msvc` distributions of Rust, enabling the visualization of `str` and slices in the VS debugger. Two other natvis files are already included, this was probably just an oversight.
I also updated `rust-windbg.cmd` to load this file as well.
kennytm [Wed, 20 Dec 2017 13:21:56 +0000 (21:21 +0800)]
Rollup merge of #46787 - varkor:contrib-6, r=QuietMisdreavus
Add an option to allow rustdoc to list modules by appearance
The `--sort-modules-by-appearance` option will list modules in the
order that they appear in the source, rather than sorting them
alphabetically (as is the default). This resolves #8552.
bors [Wed, 20 Dec 2017 03:58:15 +0000 (03:58 +0000)]
Auto merge of #46733 - nikomatsakis:nll-master-to-rust-master-5, r=arielb1
nll part 5
Next round of changes from the nll-master branch.
Extensions:
- we now propagate ty-region-outlives constraints out of closures and into their creator when necessary
- we fix a few ICEs that can occur by doing liveness analysis (and the resulting normalization) during type-checking
- we handle the implicit region bound that assumes that each type `T` outlives the fn body
- we handle normalization of inputs/outputs in fn signatures
Scott McMurray [Tue, 19 Dec 2017 22:05:14 +0000 (17:05 -0500)]
Split PlaceContext::Store into Store & AsmOutput
Outputs in InlineAsm can be read-write, so splitting it out is useful for things like Store-Store folding, as it cannot be done for a Store-AsmOutput.
This PR is intended to make no changes, just be the mechanical split of the enum. Future changes can use the split, like a MIR pass I'm working on and perhaps two-phase borrows.
Scott McMurray [Fri, 8 Dec 2017 11:00:05 +0000 (03:00 -0800)]
Fix -Z lower_128bit_ops handling of statics
Avoids ICEs such as the following:
error: internal compiler error: src\librustc_metadata\cstore_impl.rs:131:
get_optimized_mir: missing MIR for `DefId(8/0:40 ~
compiler_builtins[9532]::int[0]::addsub[0]::rust_i128_addo[0])`
bors [Tue, 19 Dec 2017 10:50:15 +0000 (10:50 +0000)]
Auto merge of #46749 - SimonSapin:exorcism, r=nikomatsakis
Move PhantomData<T> from Shared<T> to users of both Shared and #[may_dangle]
After discussing https://github.com/rust-lang/rust/issues/27730#issuecomment-316432083 today with @pnkfelix and @Gankro, we concluded that it’s ok for drop checking not to be much smarter than the current `#[may_dangle]` design which requires an explicit unsafe opt-in.
bors [Tue, 19 Dec 2017 07:05:05 +0000 (07:05 +0000)]
Auto merge of #46664 - mikeyhew:raw_pointer_self, r=arielb1
arbitrary_self_types: add support for raw pointer `self` types
This adds support for raw pointer `self` types, under the `arbitrary_self_types` feature flag. Types like `self: *const Self`, `self: *const Rc<Self>`, `self: Rc<*const Self` are all supported. Object safety checks are updated to allow`self: *const Self` and `self: *mut Self`.
This PR does not add support for `*const self` and `*mut self` syntax. That can be added in a later PR once this code is reviewed and merged.
bors [Tue, 19 Dec 2017 01:34:50 +0000 (01:34 +0000)]
Auto merge of #45525 - MaikKlein:collector, r=eddyb
Move collector to librustc_mir::monomorphize
cc https://github.com/rust-lang/rust/issues/44334 and https://github.com/rust-lang/rust/issues/45276
* I moved the collector to rustc_mir
* I renamed `TransItem` to `MonoItem`. _(I still need to fix up comments and variable names)_
* I got rid of `common.rs` and `monomorphize.rs` from `librustc_trans_utils`. I moved most of the functionality into `TyCtxt`. I realized that the `librustc_trans_utils::common.rs` was just copy pasted from `librustc_trans::common.rs`.
Should I also get rid of the `librustc_trans::common.rs` in this PR? Most of the functionality seems a bit useless, I decided to put some of it into `TyCtxt` but maybe that is not the correct action here.
Should I also get rid of `librustc_trans_utils` completely here? Or should I do it in a separate PR?