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

Fix TyKind::is_simple_path #103176

Merged
merged 2 commits into from
Oct 19, 2022
Merged

Commits on Oct 18, 2022

  1. Tweak deriving-all-codegen.rs.

    To include some `Option<>` fields of different types in a single enum.
    The test output is currently buggy, but the next commit will fix that.
    nnethercote committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    dfa9d5c View commit details
    Browse the repository at this point in the history
  2. Fix TyKind::is_simple_path.

    PR rust-lang#98758 introduced code to avoid redundant assertions in derived code
    like this:
    ```
    let _: ::core::clone::AssertParamIsClone<u32>;
    let _: ::core::clone::AssertParamIsClone<u32>;
    ```
    But the predicate `is_simple_path` introduced as part of this failed to
    account for generic arguments. Therefore the deriving code erroneously
    considers types like `Option<bool>` and `Option<f32>` to be the same.
    
    This commit fixes `is_simple_path`.
    
    Fixes rust-lang#103157.
    nnethercote committed Oct 18, 2022
    Configuration menu
    Copy the full SHA
    9a23f60 View commit details
    Browse the repository at this point in the history