Traits and associated types are not properly resolved in trait clauses

8b557a0
Opened by Anthony Ramine at 2022-06-24 13:32:20

https://play.rust-lang.org/?gist=408db89ed821df7b75a2769ae92d3e9b&version=nightly

  1. @nikomatsakis Can this get mentored? Is this blocked on Chalk? Can I help with it? Can we get any kind of ETA?

    Anthony Ramine at 2018-03-06 14:50:10

  2. Looks like another duplicate of #24159.

    Rolf Karp at 2018-03-11 12:34:11

  3. @nox left a comment on #24159

    Niko Matsakis at 2018-03-13 16:37:47

  4. We now suggest adding the appropriate bound:

    error[E0277]: the trait bound `P: F<()>` is not satisfied
      --> src/main.rs:17:1
       |
    17 | / impl<P> M for A<P> where
    18 | |     N<P>: M,
    19 | |     //P: F<()>,
    20 | |     P: F<N<S>>, // This should work just as fine as the commented bound just above
       | |                - help: consider further restricting type parameter `P`: `, P: F<()>`
    21 | | {}
       | |__^ the trait `F<()>` is not implemented for `P`
    
    error[E0277]: the trait bound `P: F<()>` is not satisfied
      --> src/main.rs:17:9
       |
    17 | impl<P> M for A<P> where
       |         ^ the trait `F<()>` is not implemented for `P`
    ...
    20 |     P: F<N<S>>, // This should work just as fine as the commented bound just above
       |                - help: consider further restricting type parameter `P`: `, P: F<()>`
       |
       = note: required because of the requirements on the impl of `M` for `A<P>`
    

    Esteban Kuber at 2019-11-05 01:12:51

  5. Triage: no change.

    Esteban Kuber at 2021-02-02 17:43:04