Skip to content

Rollup of 6 pull requests #110148

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 35 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

NotStirred and others added 30 commits March 26, 2023 16:01
It's now split between two errors, one to remove the invalid derive macro
and one suggesting adding a new non-derive macro
Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
…onCauseFailureCode (was FailureCodeDiagnostics)
…so removes `DiagArg`, as it's no longer necessary)
Start messages with lowercase
… literals"

Reverts PR rust-lang#108031
Fixes (doesnt close until beta backported) rust-lang#109746

This reverts commit e3f9db5.
This reverts commit 98b82ae.
This reverts commit 380fa26.
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
…avidtwco

Migrating rustc_infer to session diagnostics (part 5)

`@rustbot` label +A-translation
cc rust-lang#100717
…avidtwco

Add suggestion to remove `derive()` if invoked macro is non-derive

Adds to the existing `expected derive macro, found {}` error message:
```
help: remove the surrounding "derive()":
  --> $DIR/macro-path-prelude-fail-4.rs:1:3
   |
LL | #[derive(inline)]
   |   ^^^^^^^      ^
```

This suggestion will either fix the issue, in the case that the macro was valid, or provide a better error message if not

Not ready for merge yet, as the highlighted span is only valid for trivial formatting. Is there a nice way to get the parent span of the macro path within `smart_resolve_macro_path`?

Closes rust-lang#109589
rustc_middle: Document which exactly `DefId`s don't have `DefKind`s

I don't currently have time to investigate when and how to create these missing HIR nodes, but if someone else could do that it would be great.
Add support for RISC-V relax target feature

This adds `relax` as an allowed RISC-V target feature. The relax feature in LLVM enables [linker relaxation](https://www.sifive.com/blog/all-aboard-part-3-linker-relaxation-in-riscv-toolchain), an optimization specific to RISC-V that allows global variable accesses to be resolved by the linker by using the global pointer (`gp`) register (rather than constructing the addresses from scratch for each access). Enabling `relax` will cause LLVM to emit relocations in the object file that support this. The feature can be enabled in rustc with `-C target-feature=+relax`.

Currently this feature is disabled by default, but maybe it should be enabled by default since it is an easy performance improvement (but requires the `gp` register to be set up properly). GCC/Clang enable this feature by default (for both hosted/bare-metal targets), and include the `-mno-relax` flag to disable it (see [here](https://github.com/llvm/llvm-project/blob/466d554dcab39c3d42fe0c5b588b795e0e4b9d0d/clang/lib/Driver/ToolChains/Arch/RISCV.cpp#L145) for the code that enables it in Clang). I think it would make sense to enable by default, at least for all hosted targets since the `gp` register should be automatically set up by the runtime. For bare-metal targets, `gp` must be set up manually, so it is probably best to leave off by default to avoid breaking existing applications that do not set up `gp`. Leaving it disabled by default for all targets is also reasonable though.

Let me know your thoughts. Thanks!

Fixes rust-lang#109426.
…avidtwco

Revert "Don't recover lifetimes/labels containing emojis as character literals"

Reverts PR rust-lang#108031 per rust-lang#109754 (comment)

Fixes (doesnt close until beta backported) rust-lang#109746

This reverts commit e3f9db5.
This reverts commit 98b82ae.
This reverts commit 380fa26.
…-errors

Add regression test for rust-lang#104916

Closes rust-lang#104916
I haven't tested if it still passes with debug assertions enabled so it'd be better to wait for CI to be green.
r? compiler-errors
@rustbot rustbot added 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. rollup A PR which is a rollup labels Apr 10, 2023
@Dylan-DPC
Copy link
Member Author

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 10, 2023

📌 Commit ab8b0ad has been approved by Dylan-DPC

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 Apr 10, 2023
@bors
Copy link
Collaborator

bors commented Apr 10, 2023

⌛ Testing commit ab8b0ad with merge a12d8d5d93be331e66c3c976486d1fdaab1e4c74...

@bors
Copy link
Collaborator

bors commented Apr 10, 2023

☀️ Test successful - checks-actions
Approved by: Dylan-DPC
Pushing a12d8d5d93be331e66c3c976486d1fdaab1e4c74 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 10, 2023
@bors
Copy link
Collaborator

bors commented Apr 10, 2023

👀 Test was successful, but fast-forwarding failed: 422 Update is not a fast forward

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a12d8d5d93be331e66c3c976486d1fdaab1e4c74): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.3% [0.3%, 0.3%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.3% [0.3%, 0.3%] 1

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
0.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
2.5% [2.5%, 2.5%] 1
Improvements ✅
(primary)
-0.9% [-1.7%, -0.4%] 3
Improvements ✅
(secondary)
-4.1% [-6.9%, -1.2%] 2
All ❌✅ (primary) -0.4% [-1.7%, 0.9%] 4

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.5% [-0.5%, -0.5%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.5% [-0.5%, -0.5%] 1

@Dylan-DPC Dylan-DPC deleted the rollup-7ni9q5v branch April 13, 2023 12:20
@bors
Copy link
Collaborator

bors commented Apr 13, 2023

☔ The latest upstream changes (presumably #110275) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 13, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.