Skip to content

HRTB WF ambiguity #17

Open
Open
@compiler-errors

Description

@compiler-errors
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?!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions