Use 'tcx for references to AccessLevels wherever possible.
This commit is contained in:
parent
3503f565e1
commit
874f406ffd
173 changed files with 1143 additions and 1267 deletions
|
|
@ -33,10 +33,10 @@ declare_lint! {
|
|||
|
||||
declare_lint_pass!(MissingWhitelistedAttrPass => [MISSING_WHITELISTED_ATTR]);
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingWhitelistedAttrPass {
|
||||
impl<'tcx> LateLintPass<'tcx> for MissingWhitelistedAttrPass {
|
||||
fn check_fn(
|
||||
&mut self,
|
||||
cx: &LateContext<'a, 'tcx>,
|
||||
cx: &LateContext<'tcx>,
|
||||
_: intravisit::FnKind<'tcx>,
|
||||
_: &'tcx hir::FnDecl,
|
||||
_: &'tcx hir::Body,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ macro_rules! fake_lint_pass {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for $struct {
|
||||
impl LateLintPass<'_> for $struct {
|
||||
fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
|
||||
$(
|
||||
if !attr::contains_name(&krate.item.attrs, $attr) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ declare_lint! {
|
|||
|
||||
declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||
impl<'tcx> LateLintPass<'tcx> for Pass {
|
||||
fn check_crate(&mut self, cx: &LateContext, krate: &rustc_hir::Crate) {
|
||||
if !attr::contains_name(&krate.item.attrs, Symbol::intern("crate_okay")) {
|
||||
cx.lint(CRATE_NOT_OKAY, |lint| {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
|
|||
|
||||
declare_lint_pass!(Pass => [TEST_LINT, PLEASE_LINT]);
|
||||
|
||||
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass {
|
||||
impl<'tcx> LateLintPass<'tcx> for Pass {
|
||||
fn check_item(&mut self, cx: &LateContext, it: &rustc_hir::Item) {
|
||||
match &*it.ident.as_str() {
|
||||
"lintme" => cx.lint(TEST_LINT, |lint| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue