| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Backport rustdoc ICE fixes to beta
backport of #47959
|
|
fixes #47639
|
|
Backport 47738 to beta
Backport of #47738 to beta branch.
|
|
|
|
|
|
|
|
|
|
[beta] Turn back on "fat" LTO by default
This commit reverts a small portion of the switch to ThinLTO by default which
changed the meaning of `-C lto` from "put the whole crate graph into one codegen
unit" to "perform ThinLTO over the whole crate graph". This backport has no
corresponding commit on master as #47521 is making the same change but in a
slightly different manner. This commit is intended to be a surgical change with
low impact on beta.
Closes #47409
|
|
This is only applicable when neither of --emit=llvm-ir or --emit=llvm-bc are not
requested.
In case either of these outputs are wanted, but the benefits of such context are
desired as well, -Zfewer_names option provides the same functionality regardless
of the outputs requested.
|
|
This commit reverts a small portion of the switch to ThinLTO by default which
changed the meaning of `-C lto` from "put the whole crate graph into one codegen
unit" to "perform ThinLTO over the whole crate graph". This backport has no
corresponding commit on master as #47521 is making the same change but in a
slightly different manner. This commit is intended to be a surgical change with
low impact on beta.
Closes #47409
|
|
|
|
Upgrade `log` to `0.4` in multiple crates.
|
|
|
|
|
|
Update `rand` crate to `0.3.19`.
Update `log` crate to `0.3.9` and `0.4.1`.
Update `parking_lot_core` crate to `0.2.9`.
Upgrade all flate2 dependencies to `1.0.1`.
- Update `rust-installer` submodule.
|
|
So it's not mistaken for dead code.
|
|
Pass correct span when lowering grouped imports
Solves incorrect diagnostics for unused or deprecated imports. Closes #46576.
Deprecated imports had an existing test which asserted the incorrect span.
That test has been corrected as part of this commit.
|
|
Do not expand a derive invocation when derive is not allowed
Closes #46655.
The first commit is what actually closes #46655. The second one is just a refactoring I have done while waiting on a test.
|
|
|
|
Implements RFC 1937: `?` in `main`
This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.
Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help!
The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
|
|
|
|
Solves incorrect diagnostics for unused or deprecated imports. Closes #46576.
Deprecated imports had an existing test which asserted the incorrect span.
That test has been corrected as part of this commit.
|
|
"incompatible arm" diagnostic span tweak
Use span label instead of span note for single line spans in
"incompatible arm" diagnostic.
|
|
|
|
This is the first part of the RFC 1937 that supports new
`Termination` trait in the rust `main` function.
|
|
Make internal docs build properly.
`'1` isn't a valid lifetime and resulted in a syntax error.
|
|
|
|
Update check::cast::pointer_kind logic to new rustc
Make the match exhaustive, adding handling for anonymous types and
tuple coercions on the way.
Also, exit early when type errors are detected, to avoid error cascades
and the like.
Fixes #33690.
Fixes #46365.
Fixes #46880.
|
|
Use span label instead of span note for single line spans in
"incompatible arm" diagnostic.
|
|
Convert warning about `*const _` to a future-compat lint
#46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change.
fixes #46837
tracking issue for the future-compatibility lint: #46906
r? @arielb1
|
|
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.
Closes #45320
|
|
fix debuginfo scoping of let-statements
r? @eddyb
|
|
Only mark unions as uninhabited if all of their fields are uninhabited
Fixes #46845.
|
|
These can happen if prior errors disable defaulting.
Fixes #43825.
|
|
Prevent unwinding past FFI boundaries
Second attempt to write a patch to solve this.
r? @nikomatsakis
~~So, my biggest issue with this patch is the way the patch determines *what* functions should have an abort landing pad (in `construct_fn`). I would ideally have this code match [src/librustc_trans/callee.rs::get_fn](https://github.com/rust-lang/rust/blob/master/src/librustc_trans/callee.rs#L107-L115) but couldn't find an id that returns true for `is_foreign_item`. Also tried `tcx.has_attr("unwind")` with no luck.~~ FIXED
Other issues:
* llvm.trap is an SIGILL on amd64. Ideally we could use panic-abort's version of aborting which is nicer but we don't want to depend on that library...
* ~~Mir inlining is a stub currently.~~ FIXED (no-op)
Also, when reviewing please take into account that I'm new to the code and only partially know what I'm doing... and that I've mostly made made matches on `TerminatorKind::Abort` match either `TerminatorKind::Resume` or `TerminatorKind::Unreachable` based on what looked best.
|
|
|
|
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.
Closes #45320
|
|
incr.comp.: Cache check_match and use ensure() for coherence-related queries.
Some minor optimizations.
r? @nikomatsakis
|
|
Closure type error ui tweak
Do not point at the same span on all notes/help messages, and instead
show them without a span.
|
|
incr.comp.: Use an array instead of a hashmap for storing result hashes.
Doing so should result in some of the core tracking components being faster.
r? @nikomatsakis
|
|
Work towards thread safety in rustc
This PR is split out from https://github.com/rust-lang/rust/pull/45912. It contains changes which do not require the `sync` module.
|
|
|
|
Do not emit type errors on recovered blocks
When a parse error occurs on a block, the parser will recover and create
a block with the statements collected until that point. Now a flag
stating that a recovery has been performed in this block is propagated
so that the type checker knows that the type of the block (which will be
identified as `()`) shouldn't be checked against the expectation to
reduce the amount of irrelevant diagnostic errors shown to the user.
Fix #44579.
|
|
Rollup of 14 pull requests
- Successful merges: #46636, #46780, #46784, #46809, #46814, #46820, #46839, #46847, #46858, #46878, #46884, #46890, #46898, #46918
- Failed merges:
|
|
When a parse error occurs on a block, the parser will recover and create
a block with the statements collected until that point. Now a flag
stating that a recovery has been performed in this block is propagated
so that the type checker knows that the type of the block (which will be
identified as `()`) shouldn't be checked against the expectation to
reduce the amount of irrelevant diagnostic errors shown to the user.
|
|
incr.comp.: Precompute small hash for filenames to save some work.
For each span we hash the filename of the file it points to. Since filenames can be quite long, especially with absolute paths, this PR pre-computes a hash of the filename and we then only hash the hash.
r? @nikomatsakis
|
|
Prevent rustc overwriting input files
If rustc is invoked on a file that would be overwritten by the
compilation, the compilation now fails, to avoid accidental loss. This
resolves #13019. Kudos to @estebank, whose patch I finished off.
|
|
rustc: do not raise the alignment of optimized enums to the niche's alignment.
This is the improved fix for #46769 that does not increase the size of any types (see also #46808).
|
|
Fix ICE when calling non-functions within closures
The visitor for walking function bodies did not previously properly
handle error-cases for function calls. These are now ignored,
preventing the panic. This fixes #46771.
|