-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 24 pull requests #79057
Rollup of 24 pull requests #79057
Conversation
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.
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.
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 a0a619f has been approved by |
⌛ Testing commit a0a619f with merge ef693203c1f302124561824414654e92f111a1e9... |
💔 Test failed - checks-actions |
The reference doesn't pass tests anymore, but there's no further output... |
Locally I just get
when running |
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