1
Fork 0

Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead

compiler: remove unnecessary imports and qualified paths

Some of these imports were necessary before Edition 2021, others were already in the prelude.

I hope it's fine that this PR is so spread-out across files :/
This commit is contained in:
Matthias Krüger 2022-12-11 09:51:57 +01:00 committed by GitHub
commit 2daa3bcbc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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,