1
Fork 0

compiler: remove unnecessary imports and qualified paths

This commit is contained in:
KaDiWa 2022-08-09 02:14:43 +02:00
parent a161a7b654
commit 9bc69925cb
No known key found for this signature in database
GPG key ID: 0B52AE391C674CE5
76 changed files with 24 additions and 98 deletions

View file

@ -16,7 +16,6 @@ use rustc_target::abi::{Abi, Size, WrappingRange};
use rustc_target::abi::{Integer, TagEncoding, Variants};
use rustc_target::spec::abi::Abi as SpecAbi;
use std::cmp;
use std::iter;
use std::ops::ControlFlow;
@ -531,7 +530,7 @@ impl<'tcx> LateLintPass<'tcx> for TypeLimits {
_ => {}
};
fn is_valid<T: cmp::PartialOrd>(binop: hir::BinOp, v: T, min: T, max: T) -> bool {
fn is_valid<T: PartialOrd>(binop: hir::BinOp, v: T, min: T, max: T) -> bool {
match binop.node {
hir::BinOpKind::Lt => v > min && v <= max,
hir::BinOpKind::Le => v >= min && v < max,