-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
bounds on trait impls are used in implied bounds #109628
Labels
A-implied-bounds
Area: Implied bounds / inferred outlives-bounds
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler 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
aliemjay
added
C-bug
Category: This is a bug.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
A-implied-bounds
Area: Implied bounds / inferred outlives-bounds
labels
Mar 26, 2023
aliemjay
added a commit
to aliemjay/rust
that referenced
this issue
Mar 26, 2023
Noratrieb
added
the
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
label
Apr 5, 2023
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Nov 17, 2023
…, r=lcnr ignore implied bounds with placeholders given the following code: ```rust trait Trait { type Ty<'a> where Self: 'a; } impl<T> Trait for T { type Ty<'a> = () where Self: 'a; } struct Foo<T: Trait>(T) where for<'x> T::Ty<'x>: Sized; ``` when computing the implied bounds from `Foo<X>` we incorrectly get the bound `X: !x` from the normalization of ` for<'x> <X as Trait>::Ty::<'x>: Sized`. This is a a known bug! we shouldn't use the constraints that arise from normalization as implied bounds. See rust-lang#109628. Ignore these bounds for now. This should prevent later ICEs. Fixes rust-lang#112250 Fixes rust-lang#107409
Just for reference: This is a stable-to-stable regression, first passing in 1.29.0. 🤷♀️ on adding the label |
This was referenced Jan 11, 2024
this still applies to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-implied-bounds
Area: Implied bounds / inferred outlives-bounds
C-bug
Category: This is a bug.
T-compiler
Relevant to the compiler 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.
The following compiles although it shouldn't:
fn_test
should fail with an error requiring an explicitT: 'static
bound.This is a compiler bug for the following reasons:
Box<T>: Trait
) includes only the where-clauses of the trait itself, not the trait impl.U::Assoc: Sized
is also a breaking change.U::Assoc: Sized
make any meaningful difference?The text was updated successfully, but these errors were encountered: