Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaskrgr committed Jun 12, 2019
1 parent 79e3c7c commit 7c91fb8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clippy_lints/src/non_copy_const.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 7c91fb8

Please sign in to comment.