Skip to content

Rollup of 7 pull requests #123991

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

Merged
merged 20 commits into from
Apr 16, 2024
Merged

Rollup of 7 pull requests #123991

merged 20 commits into from
Apr 16, 2024

Conversation

fmease
Copy link
Member

@fmease fmease commented Apr 15, 2024

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

fmease and others added 20 commits April 4, 2024 19:44
…, r=lcnr

Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`

It's annoying to have to import `TypeVariableOriginKind` just to fill it with `MiscVariable` for almost every use. Every other usage other than `TypeParameterDefinition` wasn't even used -- I can see how it may have been useful once for debugging, but I do quite a lot of typeck debugging and I've never really needed it.

So let's just remove it, and keep around the only useful thing which is the `DefId` of the param for `var_for_def`.

This is based on rust-lang#123006, which removed the special use of `TypeVariableOriginKind::OpaqueInference`, which I'm pretty sure I was the one that added.

r? lcnr or re-roll to types
…nethercote

Cleanup: Rename `ModSep` to `PathSep`

`::` is usually referred to as the *path separator* (citation needed).

The existing name `ModSep` for *module separator* is a bit misleading since it in fact separates the segments of arbitrary path segments, not only ones resolving to modules. Let me just give a shout-out to associated items (`T::Assoc`, `<Ty as Trait>::function`) and enum variants (`Option::None`).

Motivation: Reduce friction for new contributors, prevent potential confusion.

cc `@petrochenkov`
r? nnethercote or compiler
…tebank

Don't even parse an intrinsic unless the feature gate is enabled

Don't return true in `tcx.is_intrinsic` if the function is defined locally and `#![feature(intrinsics)]` is not enabled. This is a slightly more general fix than rust-lang#123526, since rust-lang#123587 shows that we have simplifying assumptions about intrinsics elsewhere in the compiler.

This will make the code ICE again if the user **enables** `#[feature(intrinsics)]`, but I kind of feel like if we want to fix that, we should make the `INTERNAL_FEATURES` lint `Deny` again. Perhaps we could do that on non-nightly compilers. Or we should just stop compilation altogether if they have `#![feature]` enabled on a non-nightly compiler.

As for the UX of *real* cases of hitting these ICEs, I believe pretty strongly that if a compiler/stdlib dev is modifying internal intrinsics (intentionally, like when making a change to rustc) we have no guarantee to make the ICE better looking for them. Honestly, *not* spitting out a stack trace is probably a disservice to the people who hit those ICEs in that case.

r? `@Nilstrieb` `@estebank`
Fix pretty HIR for anon consts in diagnostics

This removes the `NoAnn` printer which skips over nested bodies altogether, which is confusing, and requires users of `{ty|qpath|pat}_to_string` to pass in `&tcx` which now impleemnts `hir_pretty::PpAnn`.

There's one case where this "regresses" by actually printing out the body of the anon const -- we could suppress that, but I don't expect people to actually get anon consts like that unless they're fuzzing, tbh.

r? estebank
crashes: readme: add reminder to add Fixes #abcde to prs to automatically close issues.
…anitizers, r=compiler-errors

sanitizers: Add rustc_sanitizers to triagebot.toml
…-id, r=oli-obk

Just use `type_dependent_def_id` to figure out what the method is for an expr

The calls to `lookup_method_for_diagnostic` are overkill.

r? oli-obk
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Apr 15, 2024
@fmease
Copy link
Member Author

fmease commented Apr 15, 2024

@bors r+ rollup=never p=5

@bors
Copy link
Collaborator

bors commented Apr 15, 2024

📌 Commit daa2ebc has been approved by fmease

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 15, 2024
@bors
Copy link
Collaborator

bors commented Apr 16, 2024

⌛ Testing commit daa2ebc with merge 63f70b3...

@bors
Copy link
Collaborator

bors commented Apr 16, 2024

☀️ Test successful - checks-actions
Approved by: fmease
Pushing 63f70b3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 16, 2024
@bors bors merged commit 63f70b3 into rust-lang:master Apr 16, 2024
@rustbot rustbot added this to the 1.79.0 milestone Apr 16, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#123016 Remove TypeVariableOriginKind and `ConstVariableOriginKin… 3799ec0054b923cb58176f56d72da639d2a002f2 (link)
#123462 Cleanup: Rename ModSep to PathSep d582ea3d81ef3aa964d267853dcb85cdbd667dcd (link)
#123603 Don't even parse an intrinsic unless the feature gate is en… 1a7b16b37540e407bd980c1f2cb0feffcb5ad271 (link)
#123926 Fix pretty HIR for anon consts in diagnostics 56352ad60202625a93950a24ecebc3a0a24361f5 (link)
#123973 crashes: readme: add reminder to add Fixes #abcde to prs to… 83f6f2fb05b82f26e93985caafdd7b9a01ed8226 (link)
#123984 sanitizers: Add rustc_sanitizers to triagebot.toml fba9b490bf426849a25cd3ef23aae3f2c87ab71a (link)
#123989 Just use type_dependent_def_id to figure out what the met… faf388d6099075dc9061ad5b5c727961f68f9d63 (link)

previous master: ccfcd950b3

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (63f70b3): 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
Regressions ❌
(secondary)
0.6% [0.2%, 1.0%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

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)
3.1% [3.1%, 3.1%] 1
Regressions ❌
(secondary)
4.7% [4.1%, 5.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.6%, -2.0%] 2
All ❌✅ (primary) 3.1% [3.1%, 3.1%] 1

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.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 678.255s -> 678.471s (0.03%)
Artifact size: 316.00 MiB -> 316.03 MiB (0.01%)

@fmease fmease deleted the rollup-96xcgnm branch April 16, 2024 07:21
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself merged-by-bors This PR was explicitly merged by bors. 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants