Merge remote-tracking branch 'upstream/master' into rustup
This commit is contained in:
commit
7d42d736c5
195 changed files with 4233 additions and 1076 deletions
|
|
@ -925,7 +925,7 @@ impl<'a, 'hir> intravisit::Visitor<'hir> for LintResolver<'a, 'hir> {
|
|||
&& let (expr_ty, _) = walk_ptrs_ty_depth(self.cx.typeck_results().expr_ty(expr))
|
||||
&& match_type(self.cx, expr_ty, &paths::LINT)
|
||||
{
|
||||
if let hir::def::Res::Def(DefKind::Static(..), _) = path.res {
|
||||
if let hir::def::Res::Def(DefKind::Static { .. }, _) = path.res {
|
||||
let lint_name = last_path_segment(qpath).ident.name;
|
||||
self.lints.push(sym_to_string(lint_name).to_ascii_lowercase());
|
||||
} else if let Some(local) = get_parent_local(self.cx, expr) {
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ fn path_to_matched_type(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> Option<Ve
|
|||
None
|
||||
}
|
||||
},
|
||||
Res::Def(DefKind::Static(_), def_id) => read_mir_alloc_def_path(
|
||||
Res::Def(DefKind::Static { .. }, def_id) => read_mir_alloc_def_path(
|
||||
cx,
|
||||
cx.tcx.eval_static_initializer(def_id).ok()?.inner(),
|
||||
cx.tcx.type_of(def_id).instantiate_identity(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue