Skip to content

Commit 865f5c7

Browse files
committed
Auto merge of #4777 - lzutao:66014-rustup, r=matthiaskrgr
rustup rust-lang/rust#65776 changelog: none
2 parents eae7b99 + 42c8c03 commit 865f5c7

8 files changed

+26
-24
lines changed

.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ matrix:
5656
# We don't want to run these always because they go towards
5757
# the build limit within the Travis rust-lang account.
5858
# The jobs are approximately sorted by execution time
59+
- env: INTEGRATION=rust-lang/rls
60+
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
5961
- env: INTEGRATION=rust-lang/cargo
6062
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
6163
- env: INTEGRATION=rust-lang-nursery/chalk
6264
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
63-
- env: INTEGRATION=rust-lang/rls
64-
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
6565
- env: INTEGRATION=Geal/nom
6666
if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
67-
# FIXME blocked on https://github.com/rust-lang/rust-clippy/issues/4742
67+
# FIXME blocked on https://github.com/rust-lang/rust-clippy/issues/4727
6868
#- env: INTEGRATION=rust-lang/rustfmt
6969
# if: repo =~ /^rust-lang\/rust-clippy$/ AND branch IN (auto, try)
7070
- env: INTEGRATION=hyperium/hyper
@@ -90,7 +90,6 @@ matrix:
9090
allow_failures:
9191
- os: windows
9292
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
93-
- env: INTEGRATION=rust-lang-nursery/stdsimd
9493

9594
before_script:
9695
- |

clippy_lints/Cargo.toml

+7-6
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,21 @@ edition = "2018"
1818

1919
[dependencies]
2020
cargo_metadata = "0.9.0"
21+
if_chain = "1.0.0"
2122
itertools = "0.8"
2223
lazy_static = "1.0.2"
2324
matches = "0.1.7"
25+
pulldown-cmark = "0.6.0"
2426
quine-mc_cluskey = "0.2.2"
2527
regex-syntax = "0.6"
26-
semver = "0.9.0"
2728
serde = { version = "1.0", features = ["derive"] }
29+
smallvec = { version = "1", features = ["union"] }
2830
toml = "0.5.3"
2931
unicode-normalization = "0.1"
30-
pulldown-cmark = "0.6.0"
31-
url = { version = "2.1.0", features = ["serde"] } # cargo requires serde feat in its url dep
32-
# see https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864
33-
if_chain = "1.0.0"
34-
smallvec = { version = "0.6.5", features = ["union"] }
32+
semver = "0.9.0"
33+
# NOTE: cargo requires serde feat in its url dep
34+
# see <https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864>
35+
url = { version = "2.1.0", features = ["serde"] }
3536

3637
[features]
3738
debugging = []

clippy_lints/src/methods/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use rustc::{declare_lint_pass, declare_tool_lint};
1717
use rustc_errors::Applicability;
1818
use syntax::ast;
1919
use syntax::source_map::Span;
20-
use syntax::symbol::{sym, LocalInternedString, Symbol};
20+
use syntax::symbol::{sym, Symbol, SymbolStr};
2121

2222
use crate::utils::usage::mutated_variables;
2323
use crate::utils::{
@@ -1148,8 +1148,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Methods {
11481148
}
11491149

11501150
let (method_names, arg_lists, method_spans) = method_calls(expr, 2);
1151-
let method_names: Vec<LocalInternedString> = method_names.iter().map(|s| s.as_str()).collect();
1152-
let method_names: Vec<&str> = method_names.iter().map(std::convert::AsRef::as_ref).collect();
1151+
let method_names: Vec<SymbolStr> = method_names.iter().map(|s| s.as_str()).collect();
1152+
let method_names: Vec<&str> = method_names.iter().map(|s| &**s).collect();
11531153

11541154
match method_names.as_slice() {
11551155
["unwrap", "get"] => lint_get_unwrap(cx, expr, arg_lists[1], false),

clippy_lints/src/non_expressive_names.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::cmp::Ordering;
55
use syntax::ast::*;
66
use syntax::attr;
77
use syntax::source_map::Span;
8-
use syntax::symbol::LocalInternedString;
8+
use syntax::symbol::SymbolStr;
99
use syntax::visit::{walk_block, walk_expr, walk_pat, Visitor};
1010

1111
declare_clippy_lint! {
@@ -72,7 +72,7 @@ pub struct NonExpressiveNames {
7272
impl_lint_pass!(NonExpressiveNames => [SIMILAR_NAMES, MANY_SINGLE_CHAR_NAMES, JUST_UNDERSCORES_AND_DIGITS]);
7373

7474
struct ExistingName {
75-
interned: LocalInternedString,
75+
interned: SymbolStr,
7676
span: Span,
7777
len: usize,
7878
whitelist: &'static [&'static str],

clippy_lints/src/path_buf_push_overwrite.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PathBufPushOverwrite {
5050
if let Some(get_index_arg) = args.get(1);
5151
if let ExprKind::Lit(ref lit) = get_index_arg.kind;
5252
if let LitKind::Str(ref path_lit, _) = lit.node;
53-
if let pushed_path = Path::new(&path_lit.as_str());
53+
if let pushed_path = Path::new(&*path_lit.as_str());
5454
if let Some(pushed_path_lit) = pushed_path.to_str();
5555
if pushed_path.has_root();
5656
if let Some(root) = pushed_path.components().next();

clippy_lints/src/unsafe_removed_from_name.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use rustc::lint::{EarlyContext, EarlyLintPass, LintArray, LintPass};
33
use rustc::{declare_lint_pass, declare_tool_lint};
44
use syntax::ast::*;
55
use syntax::source_map::Span;
6-
use syntax::symbol::LocalInternedString;
6+
use syntax::symbol::SymbolStr;
77

88
declare_clippy_lint! {
99
/// **What it does:** Checks for imports that remove "unsafe" from an item's
@@ -73,6 +73,6 @@ fn unsafe_to_safe_check(old_name: Ident, new_name: Ident, cx: &EarlyContext<'_>,
7373
}
7474

7575
#[must_use]
76-
fn contains_unsafe(name: &LocalInternedString) -> bool {
76+
fn contains_unsafe(name: &SymbolStr) -> bool {
7777
name.contains("Unsafe") || name.contains("unsafe")
7878
}

clippy_lints/src/utils/internal_lints.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use rustc_data_structures::fx::{FxHashMap, FxHashSet};
1313
use rustc_errors::Applicability;
1414
use syntax::ast::{Crate as AstCrate, ItemKind, Name};
1515
use syntax::source_map::Span;
16-
use syntax_pos::symbol::LocalInternedString;
16+
use syntax_pos::symbol::SymbolStr;
1717

1818
declare_clippy_lint! {
1919
/// **What it does:** Checks for various things we like to keep tidy in clippy.
@@ -112,7 +112,7 @@ impl EarlyLintPass for ClippyLintsInternal {
112112
if let ItemKind::Mod(ref utils_mod) = utils.kind {
113113
if let Some(paths) = utils_mod.items.iter().find(|item| item.ident.name.as_str() == "paths") {
114114
if let ItemKind::Mod(ref paths_mod) = paths.kind {
115-
let mut last_name: Option<LocalInternedString> = None;
115+
let mut last_name: Option<SymbolStr> = None;
116116
for item in &*paths_mod.items {
117117
let name = item.ident.as_str();
118118
if let Some(ref last_name) = last_name {
@@ -279,8 +279,8 @@ declare_lint_pass!(OuterExpnDataPass => [OUTER_EXPN_EXPN_DATA]);
279279
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for OuterExpnDataPass {
280280
fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx hir::Expr) {
281281
let (method_names, arg_lists, spans) = method_calls(expr, 2);
282-
let method_names: Vec<LocalInternedString> = method_names.iter().map(|s| s.as_str()).collect();
283-
let method_names: Vec<&str> = method_names.iter().map(std::convert::AsRef::as_ref).collect();
282+
let method_names: Vec<SymbolStr> = method_names.iter().map(|s| s.as_str()).collect();
283+
let method_names: Vec<&str> = method_names.iter().map(|s| &**s).collect();
284284
if_chain! {
285285
if let ["expn_data", "outer_expn"] = method_names.as_slice();
286286
let args = arg_lists[1];

tests/ui/builtin-type-shadow.stderr

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ error[E0308]: mismatched types
1010
--> $DIR/builtin-type-shadow.rs:5:5
1111
|
1212
LL | fn foo<u32>(a: u32) -> u32 {
13-
| --- expected `u32` because of return type
13+
| --- --- expected `u32` because of return type
14+
| |
15+
| this type parameter
1416
LL | 42
15-
| ^^ expected type parameter, found integer
17+
| ^^ expected type parameter `u32`, found integer
1618
|
1719
= note: expected type `u32`
1820
found type `{integer}`

0 commit comments

Comments
 (0)