Skip to content

ignored regions constraints when normalizing user-provided types  #101350

Closed

Description

@aliemjay

This compiles after full NLL (>= 1.63) but it shouldn't:

trait Trait {
    type Ty;
}

impl Trait for &'static () {
    type Ty = ();
}

fn extend<'a>() {
    None::<<&'a () as Trait>::Ty>;
}

HIR typeck unconditionally normalizes user-provided types modulo regions, so it's not NLL's fault this time :)

@rustbot label regression-from-stable-to-stable T-compiler T-types C-bug

Activity

  1. added
    regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    T-typesRelevant to the types team, which will review and decide on the PR/issue.
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    C-bugCategory: This is a bug.
    on Sep 2, 2022
  2. apiraino commented on Sep 6, 2022

    @apiraino
    Contributor

    bisection results seems to point to #95565 (quite big pack of changes) cc @jackh726

    searched nightlies: from nightly-2022-05-01 to nightly-2022-09-05
    regressed nightly: nightly-2022-06-08
    searched commits: from 50b0025 to 5435ed6
    regressed commit: bb55bd4

    bisected with cargo-bisect-rustc v0.6.0

    Host triple: x86_64-unknown-linux-gnu
    Reproduce with:

    cargo bisect-rustc ./script.sh --start 2022-05-01 --preserve 
  3. jackh726 commented on Sep 15, 2022

    @jackh726
    Member

    Going to nominate this for types team. This seems pretty rough, as it's a pretty simple repro. It would be nice to have someone look at this. Not sure if its implied bounds related or something else.

  4. lcnr commented on Sep 15, 2022

    @lcnr
    Contributor

    @rustbot claim

    issue with user type annotations, going to take a look and try to fix this

  5. apiraino commented on Oct 5, 2022

    @apiraino
    Contributor

    WG-prioritization assigning priority (Zulip discussion).

    @rustbot label -I-prioritize +P-high

  6. added
    P-highHigh priority
    and removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Oct 5, 2022
  7. jackh726 commented on Oct 7, 2022

    @jackh726
    Member

    This is moving, unnominating.

  8. added
    S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
    and removed
    I-types-nominatedNominated for discussion during a types team meeting.
    on Oct 7, 2022
  9. aliemjay commented on Oct 9, 2022

    @aliemjay
    ContributorAuthor

    I'll have time after 2 days to finish the fix. @rustbot claim

  10. assigned and unassigned on Oct 9, 2022
  11. lcnr commented on Oct 21, 2022

    @lcnr
    Contributor

    fixing this should also close #54940.

  12. added a commit that references this issue on Nov 14, 2022
  13. added
    S-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.
    and removed
    S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issue
    on Nov 14, 2022
  14. added a commit that references this issue on Jan 9, 2023
    af58fc8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

C-bugCategory: This is a bug.P-highHigh priorityS-bug-has-testStatus: This bug is tracked inside the repo by a `known-bug` test.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-typesRelevant to the types team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions