Skip to content

Commit 7c91fb8

Browse files
committed
1 parent 79e3c7c commit 7c91fb8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

clippy_lints/src/non_copy_const.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use rustc::ty::{Ty, TypeFlags};
1212
use rustc::{declare_lint_pass, declare_tool_lint};
1313
use rustc_errors::Applicability;
1414
use rustc_typeck::hir_ty_to_ty;
15-
use syntax_pos::{Span, DUMMY_SP};
15+
use syntax_pos::{InnerSpan, Span, DUMMY_SP};
1616

1717
use crate::utils::{in_constant, in_macro_or_desugar, is_copy, span_lint_and_then};
1818

@@ -123,7 +123,7 @@ fn verify_ty_bound<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, ty: Ty<'tcx>, source: S
123123
}
124124
match source {
125125
Source::Item { .. } => {
126-
let const_kw_span = span.from_inner_byte_pos(0, 5);
126+
let const_kw_span = span.from_inner(InnerSpan::new(0, 5));
127127
db.span_suggestion(
128128
const_kw_span,
129129
"make this a static item",

clippy_lints/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Casts {
11201120
if let ExprKind::Lit(ref lit) = ex.node {
11211121
use syntax::ast::{LitIntType, LitKind};
11221122
if let LitKind::Int(n, _) = lit.node {
1123-
if cast_to.is_fp() {
1123+
if cast_to.is_floating_point() {
11241124
let from_nbits = 128 - n.leading_zeros();
11251125
let to_nbits = fp_ty_mantissa_nbits(cast_to);
11261126
if from_nbits != 0 && to_nbits != 0 && from_nbits <= to_nbits {

clippy_lints/src/write.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::borrow::Cow;
66
use syntax::ast::*;
77
use syntax::parse::{parser, token};
88
use syntax::tokenstream::TokenStream;
9-
use syntax_pos::{symbol::Symbol, BytePos, Span};
9+
use syntax_pos::{BytePos, Span};
1010

1111
declare_clippy_lint! {
1212
/// **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
418418
match arg.position {
419419
ArgumentImplicitlyIs(_) | ArgumentIs(_) => {},
420420
ArgumentNamed(name) => {
421-
if *p == Symbol::intern(name) {
421+
if *p == name {
422422
seen = true;
423423
all_simple &= arg.format == SIMPLE;
424424
}

0 commit comments

Comments
 (0)