Files
rust/compiler/rustc_resolve
Jonathan Brouwer bca8bb11d6 Rollup merge of #160900 - CoCo-Japan-pan:fix-160873, r=jhpratt,Urgau
Ensure that restriction paths are ancestors

fix: rust-lang/rust#160873

This PR moves the check that `impl` and `mut` restriction paths resolve to ancestor modules from `rustc_resolve` to `rustc_ast_lowering`. This ensures that `RestrictionKind::Restricted` in HIR always refers to an ancestor module.
If a restriction path resolves to a non-ancestor, we emit an error and recover by lowering the restriction as `RestrictionKind::Unrestricted`.

Tracking Issue: rust-lang/rust#105077

r? @Urgau
cc @jhpratt
2026-08-12 12:06:14 +02:00
..
2026-07-27 10:33:18 +02:00