Skip to content

Commit d9e38f5

Browse files
committed
Auto merge of #4973 - JohnTitor:rustup-1231, r=phansch
Rustup to rust-lang/rust#67707 `syntax_pos` -> `rustc_span` changelog: none
2 parents 3036b0e + 18b1542 commit d9e38f5

32 files changed

+39
-37
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ matrix:
104104
allow_failures:
105105
- os: windows
106106
env: CARGO_INCREMENTAL=0 OS_WINDOWS=true
107+
# FIXME: Remove this once rls gets rustup
108+
- env: INTEGRATION=rust-lang/rls
107109

108110
before_script:
109111
- |

clippy_lints/src/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ use rustc::lint::{
1515
use rustc::ty;
1616
use rustc_errors::Applicability;
1717
use rustc_session::declare_tool_lint;
18+
use rustc_span::symbol::Symbol;
1819
use semver::Version;
1920
use syntax::ast::{AttrKind, AttrStyle, Attribute, Lit, LitKind, MetaItemKind, NestedMetaItem};
2021
use syntax::source_map::Span;
2122
use syntax::util::lev_distance::find_best_match_for_name;
22-
use syntax_pos::symbol::Symbol;
2323

2424
declare_clippy_lint! {
2525
/// **What it does:** Checks for items annotated with `#[inline(always)]`,

clippy_lints/src/cognitive_complexity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use rustc::hir::*;
55
use rustc::impl_lint_pass;
66
use rustc::lint::{LateContext, LateLintPass, LintArray, LintContext, LintPass};
77
use rustc_session::declare_tool_lint;
8+
use rustc_span::BytePos;
89
use syntax::ast::Attribute;
910
use syntax::source_map::Span;
10-
use syntax_pos::BytePos;
1111

1212
use crate::utils::{match_type, paths, snippet_opt, span_help_and_lint, LimitStack};
1313

clippy_lints/src/consts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ use rustc::ty::subst::{Subst, SubstsRef};
99
use rustc::ty::{self, Ty, TyCtxt};
1010
use rustc::{bug, span_bug};
1111
use rustc_data_structures::sync::Lrc;
12+
use rustc_span::symbol::Symbol;
1213
use std::cmp::Ordering::{self, Equal};
1314
use std::cmp::PartialOrd;
1415
use std::convert::TryInto;
1516
use std::hash::{Hash, Hasher};
1617
use syntax::ast::{FloatTy, LitKind};
17-
use syntax_pos::symbol::Symbol;
1818

1919
/// A `LitKind`-like enum to fold constant `Expr`s into.
2020
#[derive(Debug, Clone)]

clippy_lints/src/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use rustc::impl_lint_pass;
55
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
66
use rustc_data_structures::fx::FxHashSet;
77
use rustc_session::declare_tool_lint;
8+
use rustc_span::Pos;
89
use std::ops::Range;
910
use syntax::ast::{AttrKind, Attribute};
1011
use syntax::source_map::{BytePos, MultiSpan, Span};
11-
use syntax_pos::Pos;
1212
use url::Url;
1313

1414
declare_clippy_lint! {

clippy_lints/src/excessive_precision.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
77
use rustc::ty;
88
use rustc_errors::Applicability;
99
use rustc_session::declare_tool_lint;
10+
use rustc_span::symbol::Symbol;
1011
use std::f32;
1112
use std::f64;
1213
use std::fmt;
1314
use syntax::ast::*;
14-
use syntax_pos::symbol::Symbol;
1515

1616
declare_clippy_lint! {
1717
/// **What it does:** Checks for float literals with a precision greater

clippy_lints/src/fallible_impl_from.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc::hir;
66
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
77
use rustc::ty::{self, Ty};
88
use rustc_session::declare_tool_lint;
9-
use syntax_pos::Span;
9+
use rustc_span::Span;
1010

1111
declare_clippy_lint! {
1212
/// **What it does:** Checks for impls of `From<..>` that contain `panic!()` or `unwrap()`

clippy_lints/src/inherent_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use rustc::impl_lint_pass;
66
use rustc::lint::{LateContext, LateLintPass, LintArray, LintPass};
77
use rustc_data_structures::fx::FxHashMap;
88
use rustc_session::declare_tool_lint;
9-
use syntax_pos::Span;
9+
use rustc_span::Span;
1010

1111
declare_clippy_lint! {
1212
/// **What it does:** Checks for multiple inherent implementations of a struct
@@ -54,7 +54,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MultipleInherentImpl {
5454
// Remember for each inherent implementation encoutered its span and generics
5555
// but filter out implementations that have generic params (type or lifetime)
5656
// or are derived from a macro
57-
if !in_macro(item.span) && generics.params.len() == 0 {
57+
if !in_macro(item.span) && generics.params.is_empty() {
5858
self.impls.insert(item.hir_id.owner_def_id(), item.span);
5959
}
6060
}

clippy_lints/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ extern crate rustc_parse;
3636
#[allow(unused_extern_crates)]
3737
extern crate rustc_session;
3838
#[allow(unused_extern_crates)]
39+
extern crate rustc_span;
40+
#[allow(unused_extern_crates)]
3941
extern crate rustc_target;
4042
#[allow(unused_extern_crates)]
4143
extern crate rustc_typeck;
4244
#[allow(unused_extern_crates)]
4345
extern crate syntax;
44-
#[allow(unused_extern_crates)]
45-
extern crate syntax_pos;
4646

4747
use rustc::lint::{self, LintId};
4848
use rustc::session::Session;

clippy_lints/src/literal_representation.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ enum WarningType {
330330
}
331331

332332
impl WarningType {
333-
fn display(&self, suggested_format: String, cx: &EarlyContext<'_>, span: syntax_pos::Span) {
333+
fn display(&self, suggested_format: String, cx: &EarlyContext<'_>, span: rustc_span::Span) {
334334
match self {
335335
Self::MistypedLiteralSuffix => span_lint_and_sugg(
336336
cx,
@@ -450,7 +450,7 @@ impl LiteralDigitGrouping {
450450
// Returns `false` if the check fails
451451
fn check_for_mistyped_suffix(
452452
cx: &EarlyContext<'_>,
453-
span: syntax_pos::Span,
453+
span: rustc_span::Span,
454454
num_lit: &mut NumericLiteral<'_>,
455455
) -> bool {
456456
if num_lit.suffix.is_some() {

0 commit comments

Comments
 (0)