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

Traits and associated types are not properly resolved in trait clauses #48674

Open
nox opened this issue Mar 2, 2018 · 5 comments
Open

Traits and associated types are not properly resolved in trait clauses #48674

nox opened this issue Mar 2, 2018 · 5 comments
Labels
A-associated-items Area: Associated items (types, constants & functions) A-trait-system Area: Trait system C-bug Category: This is a bug. S-types-deferred Status: Identified as a valid potential future enhancement that is not currently being worked on T-lang Relevant to the language team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.

Comments

@nox
Copy link
Contributor

nox commented Mar 2, 2018

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

@kennytm kennytm added A-trait-system Area: Trait system T-lang Relevant to the language team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Mar 2, 2018
@Centril Centril added the WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804 label Mar 3, 2018
@nox
Copy link
Contributor Author

nox commented Mar 6, 2018

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

@rkarp
Copy link
Contributor

rkarp commented Mar 11, 2018

Looks like another duplicate of #24159.

@nikomatsakis
Copy link
Contributor

@nox left a comment on #24159

@estebank
Copy link
Contributor

estebank commented Nov 5, 2019

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>`

@estebank
Copy link
Contributor

estebank commented Feb 2, 2021

Triage: no change.

@jackh726 jackh726 added T-types Relevant to the types team, which will review and decide on the PR/issue. S-types-deferred Status: Identified as a valid potential future enhancement that is not currently being worked on A-associated-items Area: Associated items (types, constants & functions) and removed WG-traits Working group: Traits, https://internals.rust-lang.org/t/announcing-traits-working-group/6804 labels Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-associated-items Area: Associated items (types, constants & functions) A-trait-system Area: Trait system C-bug Category: This is a bug. S-types-deferred Status: Identified as a valid potential future enhancement that is not currently being worked on T-lang Relevant to the language team, which will review and decide on the PR/issue. T-types Relevant to the types team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants