You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Where-clauses on associated types are not checked for well-formedness #165177
Expected: E0277 (String: Copy is not satisfied, required by NC). The same clause on a method in the same trait gives exactly that
error[E0277]: the trait bound `String: Copy` is not satisfied
4 | fn a() where NC<String>: Sized;
| ^^^^^ the trait `Copy` is not implemented for `String`
Actual: compiles, under both solvers, on nightly-2026-10-29 and on stable 1.99.0.
Not the case for assoc fns but it's also the case for assoc consts (under GCI).
Contrary to assoc tys & assoc consts, for assoc fns we do call check_where_clauses in check_fn_or_method in check_associated_item. That's the oversight.
I wonder if the assoc ty case is a regression 🤔 a lot of refactorings happened in that area in the last two years moving things from HIR to middle::ty checks... doesn't look like it. Well, I've only checked 1.65 which is the version that stably intro'ed GATs.
Activity
ManasDasri commentedon Oct 30, 2026
@rustbot claim
fmease commentedon Oct 30, 2026
fmease commentedon Oct 30, 2026
theemathas commentedon Oct 30, 2026
fmease commentedon Oct 30, 2026
fmease commentedon Oct 30, 2026
Not the case for assoc fns but it's also the case for assoc consts (under GCI).
Contrary to assoc tys & assoc consts, for assoc fns we do call
check_where_clausesincheck_fn_or_methodincheck_associated_item. That's the oversight.I wonder if the assoc ty case is a regression 🤔 a lot of refactorings happened in that area in the last two years moving things from HIR to middle::ty checks...doesn't look like it. Well, I've only checked 1.65 which is the version that stably intro'ed GATs.fmease commentedon Oct 30, 2026
@ManasDasri, ah, sorry I forgot that you used to be assigned. Ping me in your future PR so I can perf it & issue a crater run :)
Rollup merge of rust-lang#165184 - fmease:gci-wf-assoc-const-wc, r=kh…
Rollup merge of rust-lang#165184 - fmease:gci-wf-assoc-const-wc, r=kh…
Unrolled build for #165184 in rollup 165243