-
Notifications
You must be signed in to change notification settings - Fork 13k
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 10 pull requests #59487
Rollup of 10 pull requests #59487
Conversation
This commit fixes what is believed to be a preexisting bug in the linker flavor inference and additionally adds a new features. Previously if the linker didn't end in `exe` the entire file name was compared to infer the linker's flavor. This commit fixes the code to instead unconditionally inspect `file_stem()` which is the relevant part we're looking at to figure out what the linker flavor is. Additionally this commit now also adds recognition of `clang` and clang wrappers that end in `-clang` (which look like gcc wrappers). This should allow clang-specific wrappers to get correctly inferred to the `Gcc` linker flavor rather than the default linker flavor configured for a target.
This commit adds support code for using `clang` directly to link the wasm32-unknown-unknown target. Currently the target is only really configured to link with LLD directly, but this ensures that `clang` can be configured as well. While not immediately useful in the near term it's likely that more wasm32 targets will pop up over time with Clang's new native support for WebAssembly in the 8.0.0 release. Getting support into rustc early should make it easier to experiment with these targets and try out various changes here and there.
Rename `VaList::copy` to `VaList::with_copy`.
This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
Not all suggestions come from lints
Fix according to oli-obk (rust-lang#58717 (comment))
Add FromStr impl for NonZero types This is a WIP implementation because I do have some questions regarding the solution. Somebody should ping the lang team on this I guess. Please see the annotations on the code for more details. Closes rust-lang#58604
Combine input and eval_always query types Hardcoding `Krate` as a dependency of `eval_always` queries doesn't really make sense if we want to use the query system before HIR lowering / hashing. Without that hardcoding they become pretty much identical to `input` queries, so I combined them to a single type. This will regress the `clean` incremental scenario, but that isn't terribly common. r? @michaelwoerister
…ers, r=oli-obk Type dependent defs wrappers First of all, forgive me if something would seem lame to you or I offend some rule (although I tried to read through docs), this is my first PR. Issue: rust-lang#59094 This PR adds 3 helper methods to `TypeckTables`: * `opt_type_dependent_def` * `opt_type_dependent_def_id` * `type_dependent_def_id` I didn't add `type_dependent_def` as was proposed in the issue simply because it wasn't used anywhere in the code. Only non-option wrapped`type_dependent_defs()[]` accesses were found in clippy which always called `def_id()` on result. Speaking of clippy, should I open separate PR in its own repo, given it's used as submodule here? Sry it took me so long, as I said I'm new here and I had tough week :).
…haelwoerister rustc: Update linker flavor inference from filename This commit fixes what is believed to be a preexisting bug in the linker flavor inference and additionally adds a new features. Previously if the linker didn't end in `exe` the entire file name was compared to infer the linker's flavor. This commit fixes the code to instead unconditionally inspect `file_stem()` which is the relevant part we're looking at to figure out what the linker flavor is. Additionally this commit now also adds recognition of `clang` and clang wrappers that end in `-clang` (which look like gcc wrappers). This should allow clang-specific wrappers to get correctly inferred to the `Gcc` linker flavor rather than the default linker flavor configured for a target.
rustc: Allow using `clang` for wasm32 targets This commit adds support code for using `clang` directly to link the wasm32-unknown-unknown target. Currently the target is only really configured to link with LLD directly, but this ensures that `clang` can be configured as well. While not immediately useful in the near term it's likely that more wasm32 targets will pop up over time with Clang's new native support for WebAssembly in the 8.0.0 release. Getting support into rustc early should make it easier to experiment with these targets and try out various changes here and there.
…hortlist, r=nagisa rust-lang#59361 Moved rustc edition opt to short list Addresses rust-lang#59361, in case that issue is accepted.
…joshtriplett ffi: rename VaList::copy to VaList::with_copy Rename `VaList::copy` to `VaList::with_copy` r? @joshtriplett
Add a way to track Rustfix UI test coverage This came out of the first Rustfix WG meeting. One of the goals is to enable Rustfix tests for all UI tests that trigger lints with `MachineApplicable` suggestions. In order to do that we first want to create a tracking issue that lists all files with missing `// run-rustfix` headers. This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`. From that file we can create the tracking issue and at some point also enforce the `// run-rustfix` flag on UI tests with `MachineApplicable` lints.
…=oli-obk compiletest: make path normalization smarter Fixes rust-lang#59109.
…chenkov When moving out of a for loop head, suggest borrowing it in nll mode Follow up to rust-lang#59195 for NLL.
@bors r+ p=10 |
📌 Commit 0f26958 has been approved by |
⌛ Testing commit 0f26958 with merge 0ee4c7099100ceaffd9a2d5c53a7225e2c9bcaf1... |
💥 Test timed out |
@bors retry |
⌛ Testing commit 0f26958 with merge 5a3753a073ed48ba2eae350aa1882f456f29eaef... |
💔 Test failed - checks-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
@bors retry |
Rollup of 10 pull requests Successful merges: - #58717 (Add FromStr impl for NonZero types) - #59091 (Combine input and eval_always query types) - #59216 (Type dependent defs wrappers) - #59318 (rustc: Update linker flavor inference from filename) - #59320 (rustc: Allow using `clang` for wasm32 targets) - #59363 (#59361 Moved rustc edition opt to short list) - #59371 (ffi: rename VaList::copy to VaList::with_copy) - #59398 (Add a way to track Rustfix UI test coverage) - #59408 (compiletest: make path normalization smarter) - #59429 (When moving out of a for loop head, suggest borrowing it in nll mode) Failed merges: r? @ghost
☀️ Test successful - checks-travis, status-appveyor |
Successful merges:
clang
for wasm32 targets #59320 (rustc: Allow usingclang
for wasm32 targets)Failed merges:
r? @ghost