Rollup merge of #73753 - eddyb:extraneous-lifetime, r=Manishearth

Use 'tcx for references to AccessLevels wherever possible.

Most of the changes are just fallout from removing a lifetime parameter from structs, and mostly in clippy.

r? @Manishearth
This commit is contained in:
Manish Goregaokar 2020-07-02 15:55:55 -07:00 committed by GitHub
commit d6bfca2ccf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
173 changed files with 1143 additions and 1267 deletions

View file

@ -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,

View file

@ -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) {

View file

@ -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| {

View file

@ -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| {