Auto merge of #5221 - JohnTitor:rustup, r=phansch

Rustup to rust-lang/rust#69366

changelog: none
This commit is contained in:
bors 2020-02-24 05:58:17 +00:00
commit fc5d0cc583
3 changed files with 5 additions and 5 deletions

View File

@ -162,12 +162,12 @@ fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) {
}
| ItemKind::Trait(_, _, _, _, items) => {
for item in items {
if let AssocItemKind::Fn(fn_sig, _, _) = &item.kind {
if let AssocItemKind::Fn(_, fn_sig, _, _) = &item.kind {
self.check_fn_sig(cx, fn_sig, item.span);
}
}
},
ItemKind::Fn(fn_sig, _, _) => self.check_fn_sig(cx, fn_sig, item.span),
ItemKind::Fn(_, fn_sig, _, _) => self.check_fn_sig(cx, fn_sig, item.span),
_ => (),
}
}

View File

@ -354,13 +354,13 @@ fn visit_mac(&mut self, _mac: &Mac) {
impl EarlyLintPass for NonExpressiveNames {
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) {
if let ItemKind::Fn(ref sig, _, Some(ref blk)) = item.kind {
if let ItemKind::Fn(_, ref sig, _, Some(ref blk)) = item.kind {
do_check(self, cx, &item.attrs, &sig.decl, blk);
}
}
fn check_impl_item(&mut self, cx: &EarlyContext<'_>, item: &AssocItem) {
if let AssocItemKind::Fn(ref sig, _, Some(ref blk)) = item.kind {
if let AssocItemKind::Fn(_, ref sig, _, Some(ref blk)) = item.kind {
do_check(self, cx, &item.attrs, &sig.decl, blk);
}
}

View File

@ -79,7 +79,7 @@ fn visit_type(&mut self, ty: &Ty, cx: &EarlyContext<'_>, reason: &str) {
impl EarlyLintPass for RedundantStaticLifetimes {
fn check_item(&mut self, cx: &EarlyContext<'_>, item: &Item) {
if !item.span.from_expansion() {
if let ItemKind::Const(ref var_type, _) = item.kind {
if let ItemKind::Const(_, ref var_type, _) = item.kind {
self.visit_type(var_type, cx, "Constants have by default a `'static` lifetime");
// Don't check associated consts because `'static` cannot be elided on those (issue
// #2438)