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

@ -1,5 +1,4 @@
use std::borrow::Cow;
use std::convert::TryInto;
use either::{Left, Right};

View file

@ -1,5 +1,4 @@
use std::assert_matches::assert_matches;
use std::convert::TryFrom;
use rustc_apfloat::ieee::{Double, Single};
use rustc_apfloat::{Float, FloatConvert};

View file

@ -2,8 +2,6 @@
//! looking at their MIR. Intrinsics/functions supported here are shared by CTFE
//! and miri.
use std::convert::TryFrom;
use rustc_hir::def_id::DefId;
use rustc_middle::mir::{
self,

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use rustc_ast::Mutability;
use rustc_hir::lang_items::LangItem;
use rustc_middle::mir::TerminatorKind;

View file

@ -1,5 +1,3 @@
use std::convert::TryFrom;
use rustc_apfloat::Float;
use rustc_middle::mir;
use rustc_middle::mir::interpret::{InterpResult, Scalar};

View file

@ -1,6 +1,5 @@
use rustc_middle::mir::interpret::InterpResult;
use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor};
use std::convert::TryInto;
use std::ops::ControlFlow;
/// Checks whether a type contains generic parameters which require substitution.

View file

@ -4,7 +4,6 @@
//! That's useful because it means other passes (e.g. promotion) can rely on `const`s
//! to be const-safe.
use std::convert::TryFrom;
use std::fmt::{Display, Write};
use std::num::NonZeroUsize;

View file

@ -3,7 +3,6 @@ use rustc_middle::mir::*;
use rustc_middle::ty::{Ty, TyCtxt};
use rustc_target::abi::VariantIdx;
use std::convert::TryFrom;
use std::iter::TrustedLen;
/// Expand `lhs = Rvalue::Aggregate(kind, operands)` into assignments to the fields.