10000 Rollup merge of #105537 - kadiwa4:remove_some_imports, r=fee1-dead · rust-lang/rust@2daa3bc · GitHub
[go: up one dir, main page]

Skip to content

Commit 2daa3bc

Browse files
authored
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 :/
2 parents 12c2fd2 + 9bc6992 commit 2daa3bc

File tree

76 files changed

+24
-98
lines changed
  • thir/pattern
  • rustc_mir_dataflow/src/framework
  • rustc_mir_transform/src
  • rustc_monomorphize/src
  • rustc_parse/src/parser
  • rustc_query_system/src
  • rustc_save_analysis/src
  • rustc_serialize/src
  • rustc_session/src
  • rustc_span/src
  • rustc_target/src
  • rustc_type_ir/src
  • Some content is hidden

    Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

    76 files changed

    +24
    -98
    lines changed

    compiler/rustc_abi/src/lib.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -1,6 +1,5 @@
    11
    #![cfg_attr(feature = "nightly", feature(step_trait, rustc_attrs, min_specialization))]
    22

    3-
    use std::convert::{TryFrom, TryInto};
    43
    use std::fmt;
    54
    #[cfg(feature = "nightly")]
    65
    use std::iter::Step;

    compiler/rustc_apfloat/src/ieee.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -2,7 +2,6 @@ use crate::{Category, ExpInt, IEK_INF, IEK_NAN, IEK_ZERO};
    22
    use crate::{Float, FloatConvert, ParseError, Round, Status, StatusAnd};
    33

    44
    use core::cmp::{self, Ordering};
    5-
    use core::convert::TryFrom;
    65
    use core::fmt::{self, Write};
    76
    use core::marker::PhantomData;
    87
    use core::mem;

    compiler/rustc_arena/src/lib.rs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -28,7 +28,7 @@ use smallvec::SmallVec;
    2828
    use std::alloc::Layout;
    2929
    use std::cell::{Cell, RefCell};
    3030
    use std::cmp;
    31-
    use std::marker::{PhantomData, Send};
    31+
    use std::marker::PhantomData;
    3232
    use std::mem::{self, MaybeUninit};
    3333
    use std::ptr::{self, NonNull};
    3434
    use std::slice;

    compiler/rustc_ast/src/ast.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -33,7 +33,6 @@ use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
    3333
    use rustc_span::source_map::{respan, Spanned};
    3434
    use rustc_span::symbol::{kw, sym, Ident, Symbol};
    3535
    use rustc_span::{Span, DUMMY_SP};
    36-
    use std::convert::TryFrom;
    3736
    use std::fmt;
    3837
    use std::mem;
    3938
    use thin_vec::{thin_vec, ThinVec};

    compiler/rustc_ast/src/ptr.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -22,7 +22,6 @@
    2222
    //! Moreover, a switch to, e.g., `P<'a, T>` would be easy and mostly automated.
    2323
    2424
    use std::fmt::{self, Debug, Display};
    25-
    use std::iter::FromIterator;
    2625
    use std::ops::{Deref, DerefMut};
    2726
    use std::{slice, vec};
    2827

    compiler/rustc_ast/src/tokenstream.rs

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -362,7 +362,7 @@ impl TokenStream {
    362362
    }
    363363
    }
    364364

    365-
    impl iter::FromIterator<TokenTree> for TokenStream {
    365+
    impl FromIterator<TokenTree> for TokenStream {
    366366
    fn from_iter<I: IntoIterator<Item = TokenTree>>(iter: I) -> Self {
    367367
    TokenStream::new(iter.into_iter().collect::<Vec<TokenTree>>())
    368368
    }

    compiler/rustc_ast_lowering/src/lib.rs

    Lines changed: 2 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -456,8 +456,8 @@ pub fn lower_to_hir<'hir>(tcx: TyCtxt<'hir>, (): ()) -> hir::Crate<'hir> {
    456456
    }
    457457

    458458
    // Drop AST to free memory
    459-
    std::mem::drop(ast_index);
    460-
    sess.time("drop_ast", || std::mem::drop(krate));
    459+
    drop(ast_index);
    460+
    sess.time("drop_ast", || drop(krate));
    461461

    462462
    // Discard hygiene data, which isn't required after lowering to HIR.
    463463
    if !sess.opts.unstable_opts.keep_hygiene_data {

    compiler/rustc_builtin_macros/src/concat.rs

    Lines changed: 0 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,8 +4,6 @@ use rustc_expand::base::{self, DummyResult};
    44
    use rustc_session::errors::report_lit_error;
    55
    use rustc_span::symbol::Symbol;
    66

    7-
    use std::string::String;
    8-
    97
    pub fn expand_concat(
    108
    cx: &mut base::ExtCtxt<'_>,
    119
    sp: rustc_span::Span,

    compiler/rustc_codegen_ssa/src/base.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -41,7 +41,6 @@ use rustc_span::{DebuggerVisualizerFile, DebuggerVisualizerType};
    4141
    use rustc_target::abi::{Align, Size, VariantIdx};
    4242

    4343
    use std::collections::BTreeSet;
    44-
    use std::convert::TryFrom;
    4544
    use std::time::{Duration, Instant};
    4645

    4746
    use itertools::Itertools;

    compiler/rustc_const_eval/src/const_eval/eval_queries.rs

    Lines changed: 0 additions & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -1,5 +1,4 @@
    11
    use std::borrow::Cow;
    2-
    use std::convert::TryInto;
    32

    43
    use either::{Left, Right};
    54

    0 commit comments

    Comments
     (0)
    0