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

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    15a71b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d6e847 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. Update mdbook to 0.4.42

    ehuss committed Nov 8, 2024
    Configuration menu
    Copy the full SHA
    544b9f9 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2024

  1. Configuration menu
    Copy the full SHA
    b2d1874 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae3c68d View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2024

  1. Provide placeholder generic arguments for traits in "no method found …

    …for type parameter" suggestions
    dianne committed Nov 11, 2024
    Configuration menu
    Copy the full SHA
    02add7d View commit details
    Browse the repository at this point in the history

Commits on Nov 12, 2024

  1. Check for null in the alloc_zeroed example

    We should demonstrate good behavior, just like rust-lang#99198 did for `alloc`.
    cuviper committed Nov 12, 2024
    Configuration menu
    Copy the full SHA
    2ddb91a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8473e3f View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#132487 - dianne:include-trait-args-in-sugge…

    …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
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    9098e03 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#132627 - adwinwhite:thir_body_cleanup, r=co…

    …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.
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    2ad4a35 View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#132653 - BoxyUwU:const_arg_stmt_mac_call, r…

    …=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`
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    b7dc481 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#132793 - ehuss:update-mdbook, r=Mark-Simula…

    …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.
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    52bb9fa View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#132847 - RalfJung:addr-dont-expose, r=Mark-…

    …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.
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    953064f View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#132869 - lolbinarycat:library-fix-too_long_…

    …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.
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    0555bb2 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#132929 - cuviper:check-alloc_zeroed, r=tgro…

    …ss35
    
    Check for null in the `alloc_zeroed` example
    
    We should demonstrate good behavior, just like rust-lang#99198 did for `alloc`.
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    119b939 View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#132933 - compiler-errors:never-lint-arg-bug…

    …, 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
    matthiaskrgr authored Nov 12, 2024
    Configuration menu
    Copy the full SHA
    506f52c View commit details
    Browse the repository at this point in the history