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 6 pull requests #98767

Merged
merged 25 commits into from
Jul 1, 2022
Merged

Rollup of 6 pull requests #98767

merged 25 commits into from
Jul 1, 2022

Commits on Jun 27, 2022

  1. Make ThinBox<T> covariant in T

    Just like `Box<T>`, we want `ThinBox<T>` to be covariant in `T`, but the
    projection in `WithHeader<<T as Pointee>::Metadata>` was making it
    invariant. This is now hidden as `WithOpaqueHeader`, which we type-cast
    whenever the real `WithHeader<H>` type is needed.
    cuviper committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    e67e165 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Configuration menu
    Copy the full SHA
    7dc0489 View commit details
    Browse the repository at this point in the history

Commits on Jun 30, 2022

  1. add blanket impl suggestion to the local traits

    Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
    vincenzopalazzo committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    81abfe3 View commit details
    Browse the repository at this point in the history
  2. ui test: add test of blanklet implementation

    Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
    vincenzopalazzo committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    86c1a73 View commit details
    Browse the repository at this point in the history
  3. ui: improve suggestion test by addig the help message

    Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
    vincenzopalazzo committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    835b7a5 View commit details
    Browse the repository at this point in the history
  4. Use split_{first,last} in cs_fold1.

    It makes the code a little nicer to read.
    nnethercote committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    72a1621 View commit details
    Browse the repository at this point in the history
  5. Remove unnecessary fields from EnumNonMatchingCollapsed.

    The `&[ast::Variant]` field isn't used.
    
    The `Vec<Ident>` field is only used for its length, but that's always
    the same as the length of the `&[Ident]` and so isn't necessary.
    nnethercote committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    7a4fdcb View commit details
    Browse the repository at this point in the history
  6. Remove Substructure::method_ident.

    It's unused.
    nnethercote committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    d13fa0d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    625122a View commit details
    Browse the repository at this point in the history
  8. Remove {Method,Trait}Def::is_unsafe.

    They are always `false`.
    nnethercote committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    1254fe9 View commit details
    Browse the repository at this point in the history
  9. Remove Substructure::self_args.

    It's unused.
    nnethercote committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    89f6917 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    57d5689 View commit details
    Browse the repository at this point in the history
  11. Remove some commented-out code.

    This was accidentally left behind in a previous commit.
    nnethercote committed Jun 30, 2022
    Configuration menu
    Copy the full SHA
    623ebbe View commit details
    Browse the repository at this point in the history

Commits on Jul 1, 2022

  1. expand_deriving_clone tweaks.

    Improve a comment, and panic on an impossible code path.
    nnethercote committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    78ec19f View commit details
    Browse the repository at this point in the history
  2. Simplify pointer handling.

    The existing derive code allows for various possibilities that aren't
    needed in practice, which complicates the code. There are only a few
    auto-derived traits and new ones are unlikely, so this commit simplifies
    things.
    
    - `PtrTy` has been eliminated. The `Raw` variant was never used, and the
      lifetime for the `Borrowed` variant was always `None`. That left just
      the mutability field, which has been inlined as necessary.
    - `MethodDef::explicit_self` was a confusing `Option<Option<PtrTy>>`.
      Indicating either `&self` or nothing. It's now a `bool`.
    - `borrowed_self` is renamed as `self_ref`.
    - `Ty::Ptr` is renamed to `Ty::Ref`.
    nnethercote committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    b942466 View commit details
    Browse the repository at this point in the history
  3. Remove lifetime support in deriving code.

    It's unused.
    nnethercote committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    18fef6b View commit details
    Browse the repository at this point in the history
  4. Rename Ty::Literal as Ty::Path.

    Because a `Literal` is a type of expression, and is simply the wrong
    name for this.
    nnethercote committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    00307a5 View commit details
    Browse the repository at this point in the history
  5. Change Ty::Tuple to Ty::Unit.

    Because that's all that is needed in practice.
    nnethercote committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    85e8d94 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f791ac6 View commit details
    Browse the repository at this point in the history
  7. Rollup merge of rust-lang#97488 - vincenzopalazzo:macros/blanket_sugg…

    …, r=compiler-errors
    
    Suggest blanket impl to the local traits
    
    This PR will add additional suggestion regarding the blanket implementation when it is possible, by generation a new help message + suggestion.
    
    Closes rust-lang#96076
    
    Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
    Dylan-DPC committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    e2ed8d7 View commit details
    Browse the repository at this point in the history
  8. Rollup merge of rust-lang#98585 - cuviper:covariant-thinbox, r=thomcc

    Make `ThinBox<T>` covariant in `T`
    
    Just like `Box<T>`, we want `ThinBox<T>` to be covariant in `T`, but the
    projection in `WithHeader<<T as Pointee>::Metadata>` was making it
    invariant. This is now hidden as `WithOpaqueHeader`, which we type-cast
    whenever the real `WithHeader<H>` type is needed.
    
    Fixes the problem noted in <rust-lang#92791 (comment)>.
    Dylan-DPC committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    9dd3288 View commit details
    Browse the repository at this point in the history
  9. Rollup merge of rust-lang#98644 - matthiaskrgr:drp_loc_span_err__2021…

    …_inc_clos_cap, r=lcnr
    
    fix ICE with -Wrust-2021-incompatible-closure-captures
    
    Fixes rust-lang#93117
    Fixes rust-lang#96258
    Dylan-DPC committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    90b296d View commit details
    Browse the repository at this point in the history
  10. Rollup merge of rust-lang#98739 - euclio:useless-comment-plural, r=Dy…

    …lan-DPC
    
    fix grammar in useless doc comment lint
    Dylan-DPC committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    528202f View commit details
    Browse the repository at this point in the history
  11. Rollup merge of rust-lang#98741 - nnethercote:deriving-cleanups, r=Ma…

    …rk-Simulacrum
    
    Many small deriving cleanups
    
    These commits remove lots of little unnecessary things, and clarifies other things.
    
    r? `@Mark-Simulacrum`
    Dylan-DPC committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    c0cf363 View commit details
    Browse the repository at this point in the history
  12. Rollup merge of rust-lang#98756 - TaKO8Ki:use-const-instead-of-functi…

    …on, r=Dylan-DPC
    
    Use const instead of function and make it private
    Dylan-DPC committed Jul 1, 2022
    Configuration menu
    Copy the full SHA
    6404620 View commit details
    Browse the repository at this point in the history