Skip to content

Commit

Permalink
Auto merge of #5531 - montrivo:bugfix/3410-use_self_generic_false_pos…
Browse files Browse the repository at this point in the history
…itive, r=<try>

rework use_self impl based on ty::Ty comparison #3410

`use_self` lint refactoring. As suggested by `@eddyb` , implement the lint based on `ty::Ty` comparison instead of `hir::Path` checks.

This PR introduces negative regressions. The cases were covered in the previous implementation. See the test file.

It fixes #3410, #2843, #3859, #4734 and #4140. Should fix #4143 (example doesn't compile). #4305 false positive seems also fixed but the uitest fails to compile the unmodified test case in `use_self.rs.fixed`. Implements #5078.
Generally the implementation checks are done at mir level and offers higher guarantees against false positives. It is probably fixing other unreported false positives.

changelog: fix use_self generics false positives
  • Loading branch information
bors committed Oct 13, 2020
2 parents 0b77c35 + f4c3d47 commit a12ef13
Show file tree
Hide file tree
Showing 6 changed files with 704 additions and 351 deletions.
Loading

0 comments on commit a12ef13

Please sign in to comment.