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 5 pull requests #118602

Merged
merged 10 commits into from
Dec 4, 2023
Merged

Rollup of 5 pull requests #118602

merged 10 commits into from
Dec 4, 2023

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Dec 4, 2023

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 10 commits December 3, 2023 08:11
`DefPathData::(ClosureExpr,ImplTrait)` are renamed to match `DefKind::(Closure,OpaqueTy)`.

`DefPathData::ImplTraitAssocTy` is replaced with `DefPathData::TypeNS(kw::Empty)` because both correspond to `DefKind::AssocTy`.
It's possible that introducing `(DefKind,DefPathData)::AssocOpaqueTy` could be a better solution, but that would be a much more invasive change.

Const generic parameters introduced for effects are moved from `DefPathData::TypeNS` to `DefPathData::ValueNS`, because constants are values.

`DefPathData` is no longer passed to `create_def` functions to avoid redundancy.
Now using a window of 3 instead 2 because it removes any
confusion about exactly how consecutive windows overlap
…` format strings

This commit restricts what symbols can be used in a format string for
any option of the `diagnostic::on_unimplemented` attribute. We
previously allowed all the ad-hoc options supported by the internal
`#[rustc_on_unimplemented]` attribute. For the stable attribute we only
want to support generic parameter names and `{Self}` as parameters.  For
any other parameter an warning is emitted and the parameter is replaced
by the literal parameter string, so for example `{integer}` turns into
`{integer}`. This follows the general design of attributes in the
`#[diagnostic]` attribute namespace, that any syntax "error" is treated
as warning and subsequently ignored.
…mented, r=compiler-errors

Restrict what symbols can be used in `#[diagnostic::on_unimplemented]` format strings

This commit restricts what symbols can be used in a format string for any option of the `diagnostic::on_unimplemented` attribute. We previously allowed all the ad-hoc options supported by the internal `#[rustc_on_unimplemented]` attribute. For the stable attribute we only want to support generic parameter names and `{Self}` as parameters.  For any other parameter an warning is emitted and the parameter is replaced by the literal parameter string, so for example `{integer}` turns into `{integer}`. This follows the general design of attributes in the `#[diagnostic]` attribute namespace, that any syntax "error" is treated as warning and subsequently ignored.

r? `@compiler-errors`
…TaKO8Ki

codegen, miri: fix computing the offset of an unsized field in a packed struct

`#[repr(packed)]`  strikes again.

Fixes rust-lang#118537
Fixes rust-lang/miri#3200

`@bjorn3` I assume cranelift needs the same fix.
…iler-errors

more targeted errors when extern types end up in places they should not

Cc rust-lang#115709 -- this does not fix that bug but it makes the panics less obscure and makes it more clear that this is a deeper issue than just a little codegen oversight. (In rust-lang#116115 we decided we'd stick to causing ICEs here for now, rather than nicer errors. We can't currently show any errors pre-mono and probably we don't want post-mono checks when this gets stabilized anyway.)
rustc: Harmonize `DefKind` and `DefPathData`

Follow up to rust-lang#118188.

`DefPathData::(ClosureExpr,ImplTrait)` are renamed to match `DefKind::(Closure,OpaqueTy)`.

`DefPathData::ImplTraitAssocTy` is replaced with `DefPathData::TypeNS(kw::Empty)` because both correspond to `DefKind::AssocTy`.
It's possible that introducing `(DefKind,DefPathData)::AssocOpaqueTy` instead could be a better solution, but that would be a much more invasive change.

Const generic parameters introduced for effects are moved from `DefPathData::TypeNS` to `DefPathData::ValueNS`, because constants are values.

`DefPathData` is no longer passed to `create_def` functions to avoid redundancy.
…mple, r=thomcc

Improve example in `slice::windows()` doc

Fixes rust-lang#118571

Now using a window of 3 instead 2 because it removes any confusion about exactly how consecutive windows overlap
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Dec 4, 2023
@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Dec 4, 2023

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Dec 4, 2023

📌 Commit f1397e6 has been approved by TaKO8Ki

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 4, 2023

🌲 The tree is currently closed for pull requests below priority 10. This pull request will be tested once the tree is reopened.

@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 Dec 4, 2023
@bors
Copy link
Contributor

bors commented Dec 4, 2023

⌛ Testing commit f1397e6 with merge e281163...

@bors
Copy link
Contributor

bors commented Dec 4, 2023

☀️ Test successful - checks-actions
Approved by: TaKO8Ki
Pushing e281163 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 4, 2023
@bors bors merged commit e281163 into rust-lang:master Dec 4, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Dec 4, 2023
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#118495 Restrict what symbols can be used in `#[diagnostic::on_unim… ba6b8d5d091ea2761df6f1f1c06b5493a22d40ec (link)
#118540 codegen, miri: fix computing the offset of an unsized field… 325ce11f69da9109f1e959324eb82292f02e8859 (link)
#118551 more targeted errors when extern types end up in places the… a0edba08750f6c641fd8db77b9dbadedd1a0d948 (link)
#118573 rustc: Harmonize DefKind and DefPathData eb15ba95f724d20e7d2840eece39221cff3da1a9 (link)
#118586 Improve example in slice::windows() doc 5cb80d171f88b34bf6bbe11e2f150864c743f77b (link)

previous master: 0a83e43f28

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 (e281163): comparison URL.

Overall result: ❌✅ regressions and improvements - 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.4% [0.2%, 0.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.3% [-0.3%, -0.3%] 1
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)
- - 0
Regressions ❌
(secondary)
2.2% [1.4%, 2.9%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.9% [-2.9%, -2.9%] 1
All ❌✅ (primary) - - 0

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)
2.1% [2.1%, 2.1%] 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: 673.138s -> 674.521s (0.21%)
Artifact size: 314.10 MiB -> 314.16 MiB (0.02%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants