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 8 pull requests #132940

Merged
merged 16 commits into from
Nov 12, 2024
Merged

Rollup of 8 pull requests #132940

merged 16 commits into from
Nov 12, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

adwinwhite and others added 16 commits November 5, 2024 12:41
We should demonstrate good behavior, just like rust-lang#99198 did for `alloc`.
…stion, r=fmease

Provide placeholder generics for traits in "no method found for type parameter" suggestions

In the diagnostics for the error ``no method named `method` found for type parameter `T` in the current scope [E0599]``, the compiler will suggest adding bounds on `T` for traits that define a method named `method`. However, these suggestions didn't include any generic arguments, so applying them would result in a `missing generics for trait` or `missing lifetime specifier` error. This PR adds placeholder arguments to the suggestion in such cases. Specifically, I tried to base the placeholders off of what's done in suggestions for when generics are missing or too few are provided:
- The placeholder for a parameter without a default is the name of the parameter.
- Placeholders are not provided for parameters with defaults.

Placeholder arguments are enclosed in `/*` and `*/`, and the applicability of the suggestion is downgraded to `Applicability::HasPlaceholders` if any placeholders are provided.

Fixes rust-lang#132407
…mpiler-errors

cleanup: Remove outdated comment of `thir_body`

When typeck fails, `thir_body` returns `ErrorGuaranteed` rather than empty body.

No other code follows this outdated description except `check_unsafety`, which is also cleaned up in this PR.
…=compiler-errors

Don't use `maybe_unwrap_block` when checking for macro calls in a block expr

Fixes rust-lang#131915

Using `maybe_unwrap_block` to determine if we are looking at a `{ mac_call!{} }` will fail sometimes as `mac_call!{}` could be a `StmtKind::MacCall` not a `StmtKind::Expr`. This caused the def collector to think that `{ mac_call!{} }` was a non-trivial const argument and create a definition for it even though it should not.

r? `@compiler-errors`  cc `@camelid`
…crum

Update mdbook to 0.4.42

This updates mdbook to 0.4.42
Changelog: https://github.com/rust-lang/mdBook/blob/master/CHANGELOG.md#mdbook-0441

There were some significant changes that I would like to get early testing on.

This also updates rust-by-example which was required due to an update to the theme file.
…Simulacrum

elem_offset / subslice_range: use addr() instead of 'as usize'

There's no reason to use ptr-to-int casts with their subtle semantics here.
…first_doc_paragraph, r=tgross35

split up the first paragraph of doc comments for better summaries

used `./x clippy -Aclippy::all '-Wclippy::too_long_first_doc_paragraph' library/core library/alloc` to find these issues.
…ss35

Check for null in the `alloc_zeroed` example

We should demonstrate good behavior, just like rust-lang#99198 did for `alloc`.
…, r=WaffleLapkin

Make sure that we suggest turbofishing the right type arg for never suggestion

I had a bug where rust would suggest the wrong arg to turbofish `()` if there were any early-bound lifetimes...

r? WaffleLapkin
@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 Nov 12, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Contributor

bors commented Nov 12, 2024

📌 Commit 506f52c has been approved by matthiaskrgr

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 Nov 12, 2024
@bors
Copy link
Contributor

bors commented Nov 12, 2024

⌛ Testing commit 506f52c with merge 9a9dadd...

@bors
Copy link
Contributor

bors commented Nov 12, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing 9a9dadd to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 12, 2024
@bors bors merged commit 9a9dadd into rust-lang:master Nov 12, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 12, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#132487 Provide placeholder generics for traits in "no method found… 9b9d84fa6220506509bd2d5b5de3c9dc2662fbb4 (link)
#132627 cleanup: Remove outdated comment of thir_body 2a897487bb3cc0fae79fa12e80d9b8db867d287f (link)
#132653 Don't use maybe_unwrap_block when checking for macro call… fa59efa513a676816061a93b5e40f9a82e7d59c4 (link)
#132793 Update mdbook to 0.4.42 ba31a7da89800910044f3b68f74c6820d20c6300 (link)
#132847 elem_offset / subslice_range: use addr() instead of 'as usi… 12eec90c033fbbf635f5a83ffacea4aa7fcef072 (link)
#132869 split up the first paragraph of doc comments for better sum… 8a27abdf72054737bdca41dd6bfece8ede67f246 (link)
#132929 Check for null in the alloc_zeroed example 86010b7a3eb9250e1d113822b1d9d5e025be39c5 (link)
#132933 Make sure that we suggest turbofishing the right type arg f… 32fc09f29111f3ed3914fa3a38ed7e6e0a02b653 (link)

previous master: 67f21277cd

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

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results (secondary -4.4%)

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
Improvements ✅
(secondary)
-4.4% [-5.9%, -2.9%] 2
All ❌✅ (primary) - - 0

Cycles

Results (primary 1.1%, secondary 4.1%)

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)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
4.1% [4.1%, 4.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.1% [1.1%, 1.1%] 1

Binary size

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

Bootstrap: 786.328s -> 784.791s (-0.20%)
Artifact size: 335.41 MiB -> 335.41 MiB (-0.00%)

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.