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

Commits on Dec 3, 2023

  1. Configuration menu
    Copy the full SHA
    5a20bac View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ef15a81 View commit details
    Browse the repository at this point in the history
  3. rustc: Harmonize DefKind and DefPathData

    `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.
    petrochenkov committed Dec 3, 2023
    Configuration menu
    Copy the full SHA
    17e799c View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2023

  1. Improve example in slice::windows() doc

    Now using a window of 3 instead 2 because it removes any
    confusion about exactly how consecutive windows overlap
    gurry committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    423481b View commit details
    Browse the repository at this point in the history
  2. 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.
    weiznich committed Dec 4, 2023
    Configuration menu
    Copy the full SHA
    1a1cd6e View commit details
    Browse the repository at this point in the history
  3. Rollup merge of rust-lang#118495 - weiznich:more_tests_for_on_unimple…

    …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 authored Dec 4, 2023
    Configuration menu
    Copy the full SHA
    da30882 View commit details
    Browse the repository at this point in the history
  4. Rollup merge of rust-lang#118540 - RalfJung:unsized-packed-offset, r=…

    …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.
    TaKO8Ki authored Dec 4, 2023
    Configuration menu
    Copy the full SHA
    87625db View commit details
    Browse the repository at this point in the history
  5. Rollup merge of rust-lang#118551 - RalfJung:extern-types-bugs, r=comp…

    …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.)
    TaKO8Ki authored Dec 4, 2023
    Configuration menu
    Copy the full SHA
    da2fb81 View commit details
    Browse the repository at this point in the history
  6. Rollup merge of rust-lang#118573 - petrochenkov:pathdatakind, r=TaKO8Ki

    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.
    TaKO8Ki authored Dec 4, 2023
    Configuration menu
    Copy the full SHA
    30a4215 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#118586 - gurry:118571-improve-slice-doc-exa…

    …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
    TaKO8Ki authored Dec 4, 2023
    Configuration menu
    Copy the full SHA
    f1397e6 View commit details
    Browse the repository at this point in the history