Skip to content

Commit 1712e18

Browse files
committed
Rustup to latest nightly
Due to rust-lang/rust#48995 and rust-lang/rust#49894
1 parent d45612e commit 1712e18

8 files changed

+20
-20
lines changed

Diff for: clippy_lints/src/copies.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc::ty::Ty;
33
use rustc::hir::*;
44
use std::collections::HashMap;
55
use std::collections::hash_map::Entry;
6-
use syntax::symbol::InternedString;
6+
use syntax::symbol::LocalInternedString;
77
use syntax::util::small_vector::SmallVector;
88
use utils::{SpanlessEq, SpanlessHash};
99
use utils::{get_parent_expr, in_macro, snippet, span_lint_and_then, span_note_and_lint};
@@ -262,8 +262,8 @@ fn if_sequence(mut expr: &Expr) -> (SmallVector<&Expr>, SmallVector<&Block>) {
262262
}
263263

264264
/// Return the list of bindings in a pattern.
265-
fn bindings<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat) -> HashMap<InternedString, Ty<'tcx>> {
266-
fn bindings_impl<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat, map: &mut HashMap<InternedString, Ty<'tcx>>) {
265+
fn bindings<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat) -> HashMap<LocalInternedString, Ty<'tcx>> {
266+
fn bindings_impl<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, pat: &Pat, map: &mut HashMap<LocalInternedString, Ty<'tcx>>) {
267267
match pat.node {
268268
PatKind::Box(ref pat) | PatKind::Ref(ref pat, _) => bindings_impl(cx, pat, map),
269269
PatKind::TupleStruct(_, ref pats, _) => for pat in pats {

Diff for: clippy_lints/src/enum_variants.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use rustc::lint::*;
44
use syntax::ast::*;
55
use syntax::codemap::Span;
6-
use syntax::symbol::InternedString;
6+
use syntax::symbol::LocalInternedString;
77
use utils::{span_help_and_lint, span_lint};
88
use utils::{camel_case_from, camel_case_until, in_macro};
99

@@ -99,7 +99,7 @@ declare_clippy_lint! {
9999
}
100100

101101
pub struct EnumVariantNames {
102-
modules: Vec<(InternedString, String)>,
102+
modules: Vec<(LocalInternedString, String)>,
103103
threshold: u64,
104104
}
105105

@@ -118,7 +118,7 @@ impl LintPass for EnumVariantNames {
118118
}
119119
}
120120

121-
fn var2str(var: &Variant) -> InternedString {
121+
fn var2str(var: &Variant) -> LocalInternedString {
122122
var.node.ident.name.as_str()
123123
}
124124

Diff for: clippy_lints/src/non_expressive_names.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use rustc::lint::*;
22
use syntax::codemap::Span;
3-
use syntax::symbol::InternedString;
3+
use syntax::symbol::LocalInternedString;
44
use syntax::ast::*;
55
use syntax::attr;
66
use syntax::visit::{walk_block, walk_expr, walk_pat, Visitor};
@@ -73,7 +73,7 @@ impl LintPass for NonExpressiveNames {
7373
}
7474

7575
struct ExistingName {
76-
interned: InternedString,
76+
interned: LocalInternedString,
7777
span: Span,
7878
len: usize,
7979
whitelist: &'static [&'static str],

Diff for: clippy_lints/src/unsafe_removed_from_name.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use rustc::lint::*;
22
use syntax::ast::*;
33
use syntax::codemap::Span;
4-
use syntax::symbol::InternedString;
4+
use syntax::symbol::LocalInternedString;
55
use utils::span_lint;
66

77
/// **What it does:** Checks for imports that remove "unsafe" from an item's
@@ -75,6 +75,6 @@ fn unsafe_to_safe_check(old_name: Ident, new_name: Ident, cx: &EarlyContext, spa
7575
}
7676
}
7777

78-
fn contains_unsafe(name: &InternedString) -> bool {
78+
fn contains_unsafe(name: &LocalInternedString) -> bool {
7979
name.contains("Unsafe") || name.contains("unsafe")
8080
}

Diff for: clippy_lints/src/unused_label.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc::hir::intravisit::{walk_expr, walk_fn, FnKind, NestedVisitorMap, Visit
44
use std::collections::HashMap;
55
use syntax::ast;
66
use syntax::codemap::Span;
7-
use syntax::symbol::InternedString;
7+
use syntax::symbol::LocalInternedString;
88
use utils::{in_macro, span_lint};
99

1010
/// **What it does:** Checks for unused labels.
@@ -30,7 +30,7 @@ declare_clippy_lint! {
3030
pub struct UnusedLabel;
3131

3232
struct UnusedLabelVisitor<'a, 'tcx: 'a> {
33-
labels: HashMap<InternedString, Span>,
33+
labels: HashMap<LocalInternedString, Span>,
3434
cx: &'a LateContext<'a, 'tcx>,
3535
}
3636

Diff for: clippy_lints/src/utils/internal_lints.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use rustc::lint::*;
22
use rustc::hir::*;
33
use rustc::hir::intravisit::{walk_expr, NestedVisitorMap, Visitor};
44
use utils::{match_qpath, paths, span_lint};
5-
use syntax::symbol::InternedString;
5+
use syntax::symbol::LocalInternedString;
66
use syntax::ast::{Crate as AstCrate, ItemKind, Name, NodeId};
77
use syntax::codemap::Span;
88
use std::collections::{HashMap, HashSet};
@@ -76,7 +76,7 @@ impl EarlyLintPass for Clippy {
7676
.find(|item| item.ident.name == "paths")
7777
{
7878
if let ItemKind::Mod(ref paths_mod) = paths.node {
79-
let mut last_name: Option<InternedString> = None;
79+
let mut last_name: Option<LocalInternedString> = None;
8080
for item in &paths_mod.items {
8181
let name = item.ident.name.as_str();
8282
if let Some(ref last_name) = last_name {

Diff for: clippy_lints/src/utils/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn match_def_path(tcx: TyCtxt, def_id: DefId, path: &[&str]) -> bool {
116116
use syntax::symbol;
117117

118118
struct AbsolutePathBuffer {
119-
names: Vec<symbol::InternedString>,
119+
names: Vec<symbol::LocalInternedString>,
120120
}
121121

122122
impl ty::item_path::ItemPathBuffer for AbsolutePathBuffer {
@@ -302,7 +302,7 @@ pub fn implements_trait<'a, 'tcx>(
302302
cx.tcx
303303
.predicate_for_trait_def(cx.param_env, traits::ObligationCause::dummy(), trait_id, 0, ty, ty_params);
304304
cx.tcx.infer_ctxt().enter(|infcx| {
305-
traits::SelectionContext::new(&infcx).evaluate_obligation_conservatively(&obligation)
305+
traits::SelectionContext::new(&infcx).infcx().predicate_must_hold(&obligation)
306306
})
307307
}
308308

Diff for: clippy_lints/src/write.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use rustc::lint::*;
44
use std::ops::Deref;
55
use syntax::ast::LitKind;
66
use syntax::ptr;
7-
use syntax::symbol::InternedString;
7+
use syntax::symbol::LocalInternedString;
88
use syntax_pos::Span;
99
use utils::{is_expn_of, match_def_path, match_path, resolve_node, span_lint, span_lint_and_sugg};
1010
use utils::{opt_def_id, paths, last_path_segment};
@@ -389,7 +389,7 @@ where
389389
}
390390

391391
/// Check for fmtstr = "... \n"
392-
fn has_newline_end(args: &HirVec<Expr>, fmtstr: InternedString, fmtlen: usize) -> bool {
392+
fn has_newline_end(args: &HirVec<Expr>, fmtstr: LocalInternedString, fmtlen: usize) -> bool {
393393
if_chain! {
394394
// check the final format string part
395395
if let Some('\n') = fmtstr.chars().last();
@@ -407,7 +407,7 @@ fn has_newline_end(args: &HirVec<Expr>, fmtstr: InternedString, fmtlen: usize) -
407407
}
408408

409409
/// Check for writeln!(v, "") / println!("")
410-
fn has_empty_arg<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, span: Span, fmtstr: InternedString, fmtlen: usize) -> Option<Span> {
410+
fn has_empty_arg<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, span: Span, fmtstr: LocalInternedString, fmtlen: usize) -> Option<Span> {
411411
if_chain! {
412412
// check that the string is empty
413413
if fmtlen == 1;
@@ -427,7 +427,7 @@ fn has_empty_arg<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, span: Span, fmtstr: Inter
427427
}
428428

429429
/// Returns the slice of format string parts in an `Arguments::new_v1` call.
430-
fn get_argument_fmtstr_parts(expr: &Expr) -> Option<(InternedString, usize)> {
430+
fn get_argument_fmtstr_parts(expr: &Expr) -> Option<(LocalInternedString, usize)> {
431431
if_chain! {
432432
if let ExprAddrOf(_, ref expr) = expr.node; // &["…", "…", …]
433433
if let ExprArray(ref exprs) = expr.node;

0 commit comments

Comments
 (0)