Skip to content

Commit

Permalink
Rollup merge of rust-lang#51034 - oli-obk:lowering, r=pnkfelix
Browse files Browse the repository at this point in the history
Remove unused lowering field and method

r? @nikomatsakis

So while trying to understand lowering better, I found out that there's something related to creating definitions. Analyzing that further, I realized that it is entirely dead code.

The `parent_def` field was only ever used for setting and resetting the field itself. The field was never read anywhere else and thus its value was entirely unused.

Maybe the `unused_field` lint should detect when the only use of a field is the field being read without using the read value other than writing back to the field?

The diff is best viewed without whitespace changes getting in the way: https://github.com/rust-lang/rust/pull/51034/files?w=1
  • Loading branch information
kennytm committed May 26, 2018
2 parents ee18e92 + 6a0806b commit e66ba0f
Showing 1 changed file with 184 additions and 215 deletions.
Loading

0 comments on commit e66ba0f

Please sign in to comment.