-
Notifications
You must be signed in to change notification settings - Fork 0
using impl candidates shadowed by where-bound overflows by using impl with only super trait bounds #76
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Labels
Comments
NOTE TO SELF: shadowing impl candidates if there's a trait candidate in teh param env causes issues with inlining/adding additional bounds to the environment |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
Feb 9, 2024
hide impls if trait bound is proven from env AVERT YOUR EYES `@compiler-errors` fixes rust-lang/trait-system-refactor-initiative#76 and rust-lang/trait-system-refactor-initiative#12 (comment) this is kinda ugly and I hate it, but I wasn't able to think of a cleaner approach for now. I am also unsure whether we have to refine this filtering later on, so by making the change pretty minimal it should be easier to improve going forward. r? `@BoxyUwU`
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this issue
Feb 9, 2024
Rollup merge of rust-lang#120836 - lcnr:param-env-hide-impl, r=BoxyUwU hide impls if trait bound is proven from env AVERT YOUR EYES `@compiler-errors` fixes rust-lang/trait-system-refactor-initiative#76 and rust-lang/trait-system-refactor-initiative#12 (comment) this is kinda ugly and I hate it, but I wasn't able to think of a cleaner approach for now. I am also unsure whether we have to refine this filtering later on, so by making the change pretty minimal it should be easier to improve going forward. r? `@BoxyUwU`
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this issue
Feb 10, 2024
hide impls if trait bound is proven from env AVERT YOUR EYES `@compiler-errors` fixes rust-lang/trait-system-refactor-initiative#76 and rust-lang/trait-system-refactor-initiative#12 (comment) this is kinda ugly and I hate it, but I wasn't able to think of a cleaner approach for now. I am also unsure whether we have to refine this filtering later on, so by making the change pretty minimal it should be easier to improve going forward. r? `@BoxyUwU`
test from #83 pub fn choice<I>(iter: I) -> Option<I::Item>
where
I: IntoIterator,
I::IntoIter: Iterator,
{
todo!()
} |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
https://rust.godbolt.org/z/8fzsP4MbE
normalizing
<T as Trait>::TraitAssoc
in the elaborated environment[T: Trait, T: Super, <T as Super>::SuperAssoc = <T as Trait>::TraitAssoc]
has a single impl candidate, which uses the environment to normalize<T as Trait>::TraitAssoc
to itself :3The text was updated successfully, but these errors were encountered: