Skip to content

HRTB WF ambiguity #17

Open
Open
@compiler-errors

Description

@compiler-errors
Owner
pub struct Bar
where
    for<'a> &'a mut Self:;

fn main() {}

Errors out in ambiguity:

error[E0282]: type annotations needed
 --> <source>:5:13
  |
5 |     for<'a> &'a mut Self:;
  |             ^^^^^^^^^^^^ cannot infer type for mutable reference `&'a mut Bar`
  |
note: required by a bound in `Bar`

This happens when checking that Bar is WF... so what's going on there?!

Activity

lcnr

lcnr commented on Mar 30, 2023

@lcnr

that's an issue with the current coinduction handling for hrtb: https://hackmd.io/0GCBKGYCQ9a8zz_FvCWQLw#coinduction-makes-me-sad

have that as "deduplicate universes in query responses" under "initial implementation finished" in the tracking issue rust-lang/rust#107374

lcnr

lcnr commented on Mar 30, 2023

@lcnr

opened it as rust-lang/trait-system-refactor-initiative#209. should change the test to have revisions and be known-bug with the new solver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @compiler-errors@lcnr

        Issue actions

          HRTB WF ambiguity · Issue #17 · compiler-errors/next-solver-hir-issues