-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Rollup of 8 pull requests #132940
Conversation
…for type parameter" suggestions
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
@bors r+ rollup=never p=8 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR:
previous master: 67f21277cd In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (9a9dadd): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis 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.
CyclesResults (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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 786.328s -> 784.791s (-0.20%) |
Successful merges:
thir_body
#132627 (cleanup: Remove outdated comment ofthir_body
)maybe_unwrap_block
when checking for macro calls in a block expr #132653 (Don't usemaybe_unwrap_block
when checking for macro calls in a block expr)alloc_zeroed
example #132929 (Check for null in thealloc_zeroed
example)r? @ghost
@rustbot modify labels: rollup
Create a similar rollup