-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Rollup of 25 pull requests #79056
Closed
Closed
Rollup of 25 pull requests #79056
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
As discussed in PR #78267, for example: * #78267 (comment) * #78267 (comment)
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
Including llvm-as adds the ability to include assembly language fragments that can be inlined using LTO.
Per Mark's recommendation at: #78963 (comment)
This bumps the minimal tested llvm version to 9. This should enable supporting newer LLVM features (and CPU extensions).
apparently llvm-8-tools already had llvm-8-dev as a dependency which was removed in llvm-9-tools, so we need to explicitly pull llvm-9-dev to make a build
This commit grepped for LLVM_VERSION_GE, LLVM_VERSION_LT, get_major_version and min-llvm-version and statically evaluated every expression possible (and sensible) assuming that the LLVM version is >=9 now
…ersion The function was only used in LLVM 8 compatibility code and was found and flagged by dead code detection and now removed.
as requested in the review and argued that this is only consistent with later LLVM upgrades
If the LLVM was externally provided, then we don't currently copy artifacts into the sysroot. This is not necessarily the right choice (in particular, it will require the LLVM dylib to be in the linker's load path at runtime), but the common use case for external LLVMs is distribution provided LLVMs, and in that case they're usually in the standard search path (e.g., /usr/lib) and copying them here is going to cause problems as we may end up with the wrong files and isn't what distributions want. This behavior may be revisited in the future though.
This looks like it was forgotten to get updated in #74482 and wasm with threads isn't built on CI so we didn't catch this by accident.
The inliner looks if a sanitizer is enabled before considering `no_sanitize` attribute as possible source of incompatibility. The MIR inlining could happen in a crate with sanitizer disabled, but code generation in a crate with sanitizer enabled, thus the attribute would be incorrectly ignored. To avoid the issue never inline functions with different `no_sanitize` attributes.
The information about cold attribute is lost during inlining, Avoid the issue by never inlining cold functions.
The callee body is already transformed; the condition is always false.
During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization.
test: add `()=()=()=...` to weird-exprs.rs Idea from #71156 (comment) 😄 Builds on nightly since #78748 has been merged.
Add a test for r# identifiers I'm not entirely sure I properly ran the test locally (I think so though), waiting for CI to confirm. :) `````@rustbot````` modify labels: T-rustdoc r? `````@jyn514`````
…andry Added some unit tests as requested As discussed in PR #78267, for example: * #78267 (comment) * #78267 (comment) r? `````@tmandry````` FYI: `````@wesleywiser````` This is pretty much self contained, but depending on feedback and timing, I may have a chance to add a few more unit tests requested against `counters.rs`. I'm looking at those now.
Include llvm-as in llvm-tools-preview component Including `llvm-as` adds the ability to include assembly language fragments that can be inlined using LTO while making sure the correct version of LLVM is always used.
Normalize function type during validation During inlining, the callee body is normalized and has types revealed, but some of locals corresponding to the arguments might come from the caller body which is not. As a result the caller body does not pass validation without additional normalization. Closes #78442.
Fix rustc_ast_pretty print_qpath resulting in invalid macro input related #76874 (third case) ### Issue: The input for a procedural macro is incorrect, for the rust code: ```rust mod m { pub trait Tr { type Ts: super::Tu; } } trait Tu { fn dummy() { } } #[may_proc_macro] fn foo() { <T as m::Tr>::Ts::dummy(); } ``` the macro will get the input: ```rust fn foo() { <T as m::Tr>::dummy(); } ``` Thus `Ts` has disappeared. ### Fix: This is due to invalid pretty print of qpath. This PR fix it.
Avoid installing external LLVM dylibs If the LLVM was externally provided, then we don't currently copy artifacts into the sysroot. This is not necessarily the right choice (in particular, it will require the LLVM dylib to be in the linker's load path at runtime), but the common use case for external LLVMs is distribution provided LLVMs, and in that case they're usually in the standard search path (e.g., /usr/lib) and copying them here is going to cause problems as we may end up with the wrong files and isn't what distributions want. This behavior may be revisited in the future though. Fixes #78932.
Fix an intrinsic invocation on threaded wasm This looks like it was forgotten to get updated in #74482 and wasm with threads isn't built on CI so we didn't catch this by accident.
Add column number support to Backtrace Backtrace frames might include column numbers. Print them if they are included.
rustc_expand: Mark inner `#![test]` attributes as soft-unstable Custom inner attributes are feature gated (#54726) except for attributes having name `test` literally, which are not gated for historical reasons. `#![test]` is an inner proc macro attribute, so it has all the issues described in #54726 too. This PR gates it with the `soft_unstable` lint.
Add `--color` support to bootstrap When running under external utilities which wrap x.py, it can be convenient to force color support on.
cleanup: Remove `ParseSess::injected_crate_name` Its only remaining use is in pretty-printing where the necessary information can be easily re-computed.
Make `_` an expression, to discard values in destructuring assignments This is the third and final step towards implementing destructuring assignment (RFC: rust-lang/rfcs#2909, tracking issue: #71126). This PR is the third and final part of #71156, which was split up to allow for easier review. With this PR, an underscore `_` is parsed as an expression but is allowed *only* on the left-hand side of a destructuring assignment. There it simply discards a value, similarly to the wildcard `_` in patterns. For instance, ```rust (a, _) = (1, 2) ``` will simply assign 1 to `a` and discard the 2. Note that for consistency, ``` _ = foo ``` is also allowed and equivalent to just `foo`. Thanks to ``@varkor`` who helped with the implementation, particularly around pre-expansion gating. r? ``@petrochenkov``
astconv: extract closures into a separate trait Am currently looking into completely removing `check_generic_arg_count` and `create_substs_for_generic_args` was somewhat difficult to understand for me so I moved these closures into a trait. This should not have changed the behavior of any of these methods
Implement BTreeMap::retain and BTreeSet::retain Adds new methods `BTreeMap::retain` and `BTreeSet::retain`. These are implemented on top of `drain_filter` (#70530). The API of these methods is identical to `HashMap::retain` and `HashSet::retain`, which were implemented in #39560 and stabilized in #36648. The docs and tests are also copied from HashMap/HashSet. The new methods are unstable, behind the `btree_retain` feature gate, with tracking issue #79025. See also rust-lang/rfcs#1338.
…ievink Validate that locals have a corresponding `LocalDecl` Fixes #73356.
rustc_resolve: Make `macro_rules` scope chain compression lazy As suggested in #78826 (comment).
Move Steal to rustc_data_structures.
Rename clean::{ItemEnum -> ItemKind}, clean::Item::{inner -> kind} r? ``@petrochenkov`` cc ``@GuillaumeGomez`` Follow-up to #77820 (comment).
📌 Commit 84ae1e4 has been approved by |
bors
added
the
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
label
Nov 14, 2020
⌛ Testing commit 84ae1e4 with merge 8edc4a18d18002471df2f3de93925235eff0c722... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
rollup
A PR which is a rollup
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Successful merges:
unwrap
withsignatures
option enabled #78352 (Do not callunwrap
withsignatures
option enabled)()=()=()=...
to weird-exprs.rs #78948 (test: add()=()=()=...
to weird-exprs.rs)#![test]
attributes as soft-unstable #79003 (rustc_expand: Mark inner#![test]
attributes as soft-unstable)--color
support to bootstrap #79004 (Add--color
support to bootstrap)ParseSess::injected_crate_name
#79005 (cleanup: RemoveParseSess::injected_crate_name
)_
an expression, to discard values in destructuring assignments #79016 (Make_
an expression, to discard values in destructuring assignments)LocalDecl
#79031 (Validate that locals have a correspondingLocalDecl
)macro_rules
scope chain compression lazy #79034 (rustc_resolve: Makemacro_rules
scope chain compression lazy)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup