diff --git a/clippy_lints/src/non_copy_const.rs b/clippy_lints/src/non_copy_const.rs index 2652e5e75d33d..5aaa279941e7b 100644 --- a/clippy_lints/src/non_copy_const.rs +++ b/clippy_lints/src/non_copy_const.rs @@ -12,7 +12,7 @@ use rustc::ty::{Ty, TypeFlags}; use rustc::{declare_lint_pass, declare_tool_lint}; use rustc_errors::Applicability; use rustc_typeck::hir_ty_to_ty; -use syntax_pos::{Span, DUMMY_SP}; +use syntax_pos::{InnerSpan, Span, DUMMY_SP}; use crate::utils::{in_constant, in_macro_or_desugar, is_copy, span_lint_and_then}; @@ -123,7 +123,7 @@ fn verify_ty_bound<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>, source: S } match source { Source::Item { .. } => { - let const_kw_span = span.from_inner_byte_pos(0, 5); + let const_kw_span = span.from_inner(InnerSpan::new(0, 5)); db.span_suggestion( const_kw_span, "make this a static item", diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 7b41bea4ff4be..a1bcc43d8ba27 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -1120,7 +1120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Casts { if let ExprKind::Lit(ref lit) = ex.node { use syntax::ast::{LitIntType, LitKind}; if let LitKind::Int(n, _) = lit.node { - if cast_to.is_fp() { + if cast_to.is_floating_point() { let from_nbits = 128 - n.leading_zeros(); let to_nbits = fp_ty_mantissa_nbits(cast_to); if from_nbits != 0 && to_nbits != 0 && from_nbits <= to_nbits { diff --git a/clippy_lints/src/write.rs b/clippy_lints/src/write.rs index b55d0d9401985..869e532eea6a1 100644 --- a/clippy_lints/src/write.rs +++ b/clippy_lints/src/write.rs @@ -6,7 +6,7 @@ use std::borrow::Cow; use syntax::ast::*; use syntax::parse::{parser, token}; use syntax::tokenstream::TokenStream; -use syntax_pos::{symbol::Symbol, BytePos, Span}; +use syntax_pos::{BytePos, Span}; declare_clippy_lint! { /// **What it does:** This lint warns when you use `println!("")` to @@ -418,7 +418,7 @@ fn check_tts<'a>(cx: &EarlyContext<'a>, tts: &TokenStream, is_write: bool) -> (O match arg.position { ArgumentImplicitlyIs(_) | ArgumentIs(_) => {}, ArgumentNamed(name) => { - if *p == Symbol::intern(name) { + if *p == name { seen = true; all_simple &= arg.format == SIMPLE; }