1
Fork 0

rustc_lint: Remove some redundant fields from EarlyContext

Use consistent function parameter order for early context construction and early linting
Rename some functions to make it clear that they do not necessarily work on the whole crate
This commit is contained in:
Vadim Petrochenkov 2021-09-28 00:28:49 +03:00
parent d13e8dd41d
commit 452aa81770
8 changed files with 81 additions and 105 deletions

View file

@ -164,7 +164,7 @@ impl EarlyLintPass for NonCamelCaseTypes {
let has_repr_c = it
.attrs
.iter()
.any(|attr| attr::find_repr_attrs(&cx.sess, attr).contains(&attr::ReprC));
.any(|attr| attr::find_repr_attrs(cx.sess(), attr).contains(&attr::ReprC));
if has_repr_c {
return;