Skip to content
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 #108904

Closed
wants to merge 25 commits into from

Conversation

GuillaumeGomez
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

Amanieu and others added 25 commits January 27, 2023 08:15
The `asm!` and `global_asm!` macros require their operands to appear
strictly in the following order:
- Template strings
- Positional operands
- Named operands
- Explicit register operands
- `clobber_abi`
- `options`

This is overly strict and can be inconvienent when building complex
`asm!` statements with macros. This PR relaxes the ordering requirements
as follows:
- Template strings must still come before all other operands.
- Positional operands must still come before named and explicit register
operands.
- Named and explicit register operands can be freely mixed.
- `options` and `clobber_abi` can appear in any position.
This approach didn't seem to work well.
+ Add some information to the README.md
After removing the `map_in_place` method, which isn't much use because
modifying every element in a collection such as a `Vec` can be done
trivially with iteration.
Relax ordering rules for `asm!` operands

The `asm!` and `global_asm!` macros require their operands to appear strictly in the following order:
- Template strings
- Positional operands
- Named operands
- Explicit register operands
- `clobber_abi`
- `options`

This is overly strict and can be inconvienent when building complex `asm!` statements with macros. This PR relaxes the ordering requirements as follows:
- Template strings must still come before all other operands.
- Positional operands must still come before named and explicit register operands.
- Named and explicit register operands can be freely mixed.
- `options` and `clobber_abi` can appear in any position after the template strings.

r? `@joshtriplett`
rust-lang#107307 Implementing "<test_binary> --list --format json" for use by IDE test explorers / runners

PR 1 of 2 - wiring up just the new information + implement the command line changes i.e. --format json + tests

upcoming:
PR 2 of 2 - clean up "#[cfg(not(bootstrap))]" from PR 1

As per the discussions on
- MCP: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implementing.20.22.3Ctest_binary.3E.20--list.20--form.E2.80.A6.20compiler-team.23592/near/328747548
- preRFC: https://internals.rust-lang.org/t/pre-rfc-implementing-test-binary-list-format-json-for-use-by-ide-test-explorers-runners/18308
- FYI on Discord: https://discord.com/channels/442252698964721669/459149169546887178/1075581549409484820
…oot-var, r=lcnr

Canonicalize root var when making response from new solver

During trait solving, if we equate two inference variables `?0` and `?1` but don't equate them with any rigid types, then `InferCtxt::probe_ty_var` will return `Err` for both of these. The canonicalizer code will then canonicalize the variables independently(!), and the response will not reflect the fact that these two variables have been made equal.

This hinders inference and I also don't think it's sound? I haven't thought too much about it past that, so let's talk about it.

r? `@lcnr`
StableMIR: Proof-of-concept implementation + test

This PR is part of the [project Stable MIR](https://github.com/rust-lang/project-stable-mir). The PR deletes old re-exports from rustc_smir and introduces a proof-of-concept implementation for APIs to retrieve crate information.

The implementation follows the [design described here](https://hackmd.io/XhnYHKKuR6-LChhobvlT-g?view), but instead of using separate crates for the implementation, it uses separate modules inside `rustc_smir`.

The API introduced at this point should be seen just as an example on how we are planning to structure the communication between tools and the compiler.

I have not explored yet what should be the right granularity, the best starting point for users, neither the best way to implement it.

r? `````@oli-obk`````
Simplify `sort_by` calls

small cleanup
Tweak E0740

Also drive-by suppress E0740 if it's an unresolved type.
…, r=BoxyUwU

Suppress copy impl error when post-normalized type references errors

Suppress spurious errors from the `Copy` impl validity check when fields have bad types *post*-normalization, instead of just pre-normalization.

----

The const-generics test regressed recently due to rust-lang#107965, cc ````@BoxyUwU.````
 * I think it's because `[_; 0u32]: Copy` now fails to hold because a nested obligation `ConstArgHasType(0u32, usize)` fails.
 * It's interesting that `[const_error]` shows up in the type only after normalization, though, but I'm pretty sure that it's due to the evaluate call that happens when normalizing unevaluated consts.
…-impl-message, r=WaffleLapkin

Tweak illegal `Copy` impl message

The phrase "may not" can both mean "is not able to" and "possibly does not". Disambiguate this by just using "cannot".
`@Lokathor` expressed being annoyed by this [here](https://twitter.com/Lokathor/status/1633200313544089602?s=20).

Also drive-by fix for this extremely noisy message: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6a37275bc810f7846bfe191845b7d11d.

r? diagnostics
Rename `MapInPlace` as `FlatMapInPlace`.

After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration.

r? `@lqd`
fix: evaluate with wrong obligation stack

fix rust-lang#108897
r? `@lcnr`
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 8, 2023
@rustbot rustbot added WG-trait-system-refactor The Rustc Trait System Refactor Initiative rollup A PR which is a rollup labels Mar 8, 2023
@GuillaumeGomez
Copy link
Member Author

@bors r+ rollup=never p=10

@bors
Copy link
Contributor

bors commented Mar 8, 2023

📌 Commit 4b60218 has been approved by GuillaumeGomez

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2023
@bors
Copy link
Contributor

bors commented Mar 8, 2023

⌛ Testing commit 4b60218 with merge 01b005a2fc9962a98ec6b2d557107716cd3d9298...

@bors
Copy link
Contributor

bors commented Mar 8, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 8, 2023
@GuillaumeGomez
Copy link
Member Author

Seems to be a spurious failure.

@bors retry

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2023
@bors
Copy link
Contributor

bors commented Mar 8, 2023

⌛ Testing commit 4b60218 with merge d52b8151cdf22e4eeca13c54bec30e4444c7fa41...

@bors
Copy link
Contributor

bors commented Mar 8, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 8, 2023
@matthiaskrgr
Copy link
Member

note: #108148 failed for me locally, not sure if CI actually got that far

@parthopdas
Copy link
Contributor

parthopdas commented Mar 8, 2023

@matthiaskrgr fyi #108148 fails for me locally as well since the auto normalization does not get triggered. on ci however it is fine. i am the author of that PR - thanks for pulling it into the rollup.

here is the checks-action failure fyi
image

@matthiaskrgr
Copy link
Member

Well, if tests only pass on CI and not locally, thats equally pointless imo :/

@GuillaumeGomez
Copy link
Member Author

Yep, let's close this.

@GuillaumeGomez GuillaumeGomez deleted the rollup-q1kw3sy branch March 8, 2023 21:43
@rust-log-analyzer
Copy link
Collaborator

The job i686-mingw-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2607/3021] Linking CXX static library lib\libLLVMWebAssemblyUtils.a
[2608/3021] Linking CXX static library lib\libLLVMInterpreter.a
[2609/3021] Building CXX object tools/dsymutil/CMakeFiles/dsymutil.dir/dsymutil.cpp.obj
[2610/3021] Linking CXX static library lib\libLLVMMSP430CodeGen.a
FAILED: lib/libLLVMMSP430CodeGen.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMMSP430CodeGen.a && D:\a\rust\rust\mingw32\bin\ar.exe qc lib\libLLVMMSP430CodeGen.a  lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430BranchSelector.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430ISelDAGToDAG.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430ISelLowering.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430InstrInfo.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430FrameLowering.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430MachineFunctionInfo.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430RegisterInfo.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430Subtarget.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430TargetMachine.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430AsmPrinter.cpp.obj lib/Target/MSP430/CMakeFiles/LLVMMSP430CodeGen.dir/MSP430MCInstLower.cpp.obj && D:\a\rust\rust\mingw32\bin\ranlib.exe lib\libLLVMMSP430CodeGen.a && cd ."
D:\a\rust\rust\mingw32\bin\ranlib.exe: could not create temporary file whilst writing archive: no more archived files
[2611/3021] Linking CXX static library lib\libLLVMGlobalISel.a
[2612/3021] Linking CXX static library lib\libLLVMBPFCodeGen.a
[2613/3021] Building CXX object tools/dsymutil/CMakeFiles/dsymutil.dir/CFBundle.cpp.obj
[2614/3021] Linking CXX static library lib\libLLVMNVPTXCodeGen.a
[2614/3021] Linking CXX static library lib\libLLVMNVPTXCodeGen.a
[2615/3021] Linking CXX static library lib\libLLVMHexagonCodeGen.a
[2616/3021] Linking CXX executable bin\llvm-profdata.exe
[2617/3021] Linking CXX static library lib\libLLVMPasses.a
ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1


build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-1cd66030c949c28d\cmake-0.1.48\src\lib.rs:975:5
 finished in 292.424 seconds
Build completed unsuccessfully in 0:06:33
Build completed unsuccessfully in 0:06:33
make: *** [Makefile:80: ci-mingw-subset-2] Error 1

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-mingw-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[2616/3025] Linking CXX static library lib\libLLVMMIRParser.a
[2617/3025] Building CXX object tools/lli/CMakeFiles/lli.dir/ExecutionUtils.cpp.obj
[2618/3025] Linking CXX static library lib\libLLVMInterpreter.a
FAILED: lib/libLLVMInterpreter.a 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E rm -f lib\libLLVMInterpreter.a && D:\a\rust\rust\mingw64\bin\ar.exe qc lib\libLLVMInterpreter.a  lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Execution.cpp.obj lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/ExternalFunctions.cpp.obj lib/ExecutionEngine/Interpreter/CMakeFiles/LLVMInterpreter.dir/Interpreter.cpp.obj && D:\a\rust\rust\mingw64\bin\ranlib.exe lib\libLLVMInterpreter.a && cd ."
D:\a\rust\rust\mingw64\bin\ranlib.exe: could not create temporary file whilst writing archive: no more archived files
[2619/3025] Linking CXX static library lib\libLLVMDWARFLinker.a
[2620/3025] Linking CXX static library lib\libLLVMWebAssemblyUtils.a
[2621/3025] Building CXX object tools/lli/ChildTarget/CMakeFiles/lli-child-target.dir/ChildTarget.cpp.obj
[2622/3025] Linking CXX static library lib\libLLVMSelectionDAG.a
[2622/3025] Linking CXX static library lib\libLLVMSelectionDAG.a
[2623/3025] Building CXX object tools/llvm-as/CMakeFiles/llvm-as.dir/llvm-as.cpp.obj
[2624/3025] Linking CXX executable bin\llvm-profdata.exe
[2625/3025] Linking CXX static library lib\libLLVMPasses.a
ninja: build stopped: subcommand failed.
command did not execute successfully, got: exit code: 1


build script failed, must exit now', C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\cmake-0.1.48\src\lib.rs:975:5
 finished in 219.823 seconds
Build completed unsuccessfully in 0:04:52
Build completed unsuccessfully in 0:04:52
make: *** [Makefile:80: ci-mingw-subset-2] Error 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet