Commit c631490
authored
Rollup merge of rust-lang#153752 - TKanX:bugfix/delegation-non-fn-ice, r=petrochenkov
fix(delegation): Filter Out Module Segments in Generic Args Inheritance
### Summary:
> rust-lang#153421 (merged not so long ago) fixed those issues by adding check that child segment resolves only to `Fn` or `AssocFn`, they should not produce ICEs on `main` now.
@aerooneqq
~~Fixes ICE when delegating to a module or crate root inside a trait impl.~~
~~Filters `DefKind::Mod` in `get_segment`, returning `None` for such segments so compilation fails gracefully with the pre-existing _E0423_ error from the resolver.~~
> > So this PR superseded by rust-lang#153421? Should I close this?
>
> Adding tests for the fixed issues is still good. @rustbot author
@petrochenkov
Adds regression tests for rust-lang#153743 and rust-lang#153744.
rust-lang#153421 already fixed the root cause; this PR adds test coverage.
Closes rust-lang#153743
Closes rust-lang#153744
r? @dingxiangfei2009
cc @matthiaskrgr2 files changed
Lines changed: 35 additions & 0 deletions
File tree
- tests/ui/delegation
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments