mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +00:00
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:
commit
2daa3bcbc2
@ -1,6 +1,5 @@
|
|||||||
#![cfg_attr(feature = "nightly", feature(step_trait, rustc_attrs, min_specialization))]
|
#![cfg_attr(feature = "nightly", feature(step_trait, rustc_attrs, min_specialization))]
|
||||||
|
|
||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
#[cfg(feature = "nightly")]
|
#[cfg(feature = "nightly")]
|
||||||
use std::iter::Step;
|
use std::iter::Step;
|
||||||
|
@ -2,7 +2,6 @@ use crate::{Category, ExpInt, IEK_INF, IEK_NAN, IEK_ZERO};
|
|||||||
use crate::{Float, FloatConvert, ParseError, Round, Status, StatusAnd};
|
use crate::{Float, FloatConvert, ParseError, Round, Status, StatusAnd};
|
||||||
|
|
||||||
use core::cmp::{self, Ordering};
|
use core::cmp::{self, Ordering};
|
||||||
use core::convert::TryFrom;
|
|
||||||
use core::fmt::{self, Write};
|
use core::fmt::{self, Write};
|
||||||
use core::marker::PhantomData;
|
use core::marker::PhantomData;
|
||||||
use core::mem;
|
use core::mem;
|
||||||
|
@ -28,7 +28,7 @@ use smallvec::SmallVec;
|
|||||||
use std::alloc::Layout;
|
use std::alloc::Layout;
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use std::cmp;
|
use std::cmp;
|
||||||
use std::marker::{PhantomData, Send};
|
use std::marker::PhantomData;
|
||||||
use std::mem::{self, MaybeUninit};
|
use std::mem::{self, MaybeUninit};
|
||||||
use std::ptr::{self, NonNull};
|
use std::ptr::{self, NonNull};
|
||||||
use std::slice;
|
use std::slice;
|
||||||
|
@ -33,7 +33,6 @@ use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
|||||||
use rustc_span::source_map::{respan, Spanned};
|
use rustc_span::source_map::{respan, Spanned};
|
||||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||||
use rustc_span::{Span, DUMMY_SP};
|
use rustc_span::{Span, DUMMY_SP};
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use thin_vec::{thin_vec, ThinVec};
|
use thin_vec::{thin_vec, ThinVec};
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
//! Moreover, a switch to, e.g., `P<'a, T>` would be easy and mostly automated.
|
//! Moreover, a switch to, e.g., `P<'a, T>` would be easy and mostly automated.
|
||||||
|
|
||||||
use std::fmt::{self, Debug, Display};
|
use std::fmt::{self, Debug, Display};
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
use std::{slice, vec};
|
use std::{slice, vec};
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ impl TokenStream {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl iter::FromIterator<TokenTree> for TokenStream {
|
impl FromIterator<TokenTree> for TokenStream {
|
||||||
fn from_iter<I: IntoIterator<Item = TokenTree>>(iter: I) -> Self {
|
fn from_iter<I: IntoIterator<Item = TokenTree>>(iter: I) -> Self {
|
||||||
TokenStream::new(iter.into_iter().collect::<Vec<TokenTree>>())
|
TokenStream::new(iter.into_iter().collect::<Vec<TokenTree>>())
|
||||||
}
|
}
|
||||||
|
@ -456,8 +456,8 @@ pub fn lower_to_hir<'hir>(tcx: TyCtxt<'hir>, (): ()) -> hir::Crate<'hir> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Drop AST to free memory
|
// Drop AST to free memory
|
||||||
std::mem::drop(ast_index);
|
drop(ast_index);
|
||||||
sess.time("drop_ast", || std::mem::drop(krate));
|
sess.time("drop_ast", || drop(krate));
|
||||||
|
|
||||||
// Discard hygiene data, which isn't required after lowering to HIR.
|
// Discard hygiene data, which isn't required after lowering to HIR.
|
||||||
if !sess.opts.unstable_opts.keep_hygiene_data {
|
if !sess.opts.unstable_opts.keep_hygiene_data {
|
||||||
|
@ -4,8 +4,6 @@ use rustc_expand::base::{self, DummyResult};
|
|||||||
use rustc_session::errors::report_lit_error;
|
use rustc_session::errors::report_lit_error;
|
||||||
use rustc_span::symbol::Symbol;
|
use rustc_span::symbol::Symbol;
|
||||||
|
|
||||||
use std::string::String;
|
|
||||||
|
|
||||||
pub fn expand_concat(
|
pub fn expand_concat(
|
||||||
cx: &mut base::ExtCtxt<'_>,
|
cx: &mut base::ExtCtxt<'_>,
|
||||||
sp: rustc_span::Span,
|
sp: rustc_span::Span,
|
||||||
|
@ -41,7 +41,6 @@ use rustc_span::{DebuggerVisualizerFile, DebuggerVisualizerType};
|
|||||||
use rustc_target::abi::{Align, Size, VariantIdx};
|
use rustc_target::abi::{Align, Size, VariantIdx};
|
||||||
|
|
||||||
use std::collections::BTreeSet;
|
use std::collections::BTreeSet;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
use either::{Left, Right};
|
use either::{Left, Right};
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
use std::assert_matches::assert_matches;
|
use std::assert_matches::assert_matches;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use rustc_apfloat::ieee::{Double, Single};
|
use rustc_apfloat::ieee::{Double, Single};
|
||||||
use rustc_apfloat::{Float, FloatConvert};
|
use rustc_apfloat::{Float, FloatConvert};
|
||||||
|
@ -2,8 +2,6 @@
|
|||||||
//! looking at their MIR. Intrinsics/functions supported here are shared by CTFE
|
//! looking at their MIR. Intrinsics/functions supported here are shared by CTFE
|
||||||
//! and miri.
|
//! and miri.
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_middle::mir::{
|
use rustc_middle::mir::{
|
||||||
self,
|
self,
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use rustc_ast::Mutability;
|
use rustc_ast::Mutability;
|
||||||
use rustc_hir::lang_items::LangItem;
|
use rustc_hir::lang_items::LangItem;
|
||||||
use rustc_middle::mir::TerminatorKind;
|
use rustc_middle::mir::TerminatorKind;
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
use rustc_apfloat::Float;
|
use rustc_apfloat::Float;
|
||||||
use rustc_middle::mir;
|
use rustc_middle::mir;
|
||||||
use rustc_middle::mir::interpret::{InterpResult, Scalar};
|
use rustc_middle::mir::interpret::{InterpResult, Scalar};
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use rustc_middle::mir::interpret::InterpResult;
|
use rustc_middle::mir::interpret::InterpResult;
|
||||||
use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor};
|
use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitable, TypeVisitor};
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::ops::ControlFlow;
|
use std::ops::ControlFlow;
|
||||||
|
|
||||||
/// Checks whether a type contains generic parameters which require substitution.
|
/// Checks whether a type contains generic parameters which require substitution.
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
//! That's useful because it means other passes (e.g. promotion) can rely on `const`s
|
//! That's useful because it means other passes (e.g. promotion) can rely on `const`s
|
||||||
//! to be const-safe.
|
//! to be const-safe.
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt::{Display, Write};
|
use std::fmt::{Display, Write};
|
||||||
use std::num::NonZeroUsize;
|
use std::num::NonZeroUsize;
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ use rustc_middle::mir::*;
|
|||||||
use rustc_middle::ty::{Ty, TyCtxt};
|
use rustc_middle::ty::{Ty, TyCtxt};
|
||||||
use rustc_target::abi::VariantIdx;
|
use rustc_target::abi::VariantIdx;
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::iter::TrustedLen;
|
use std::iter::TrustedLen;
|
||||||
|
|
||||||
/// Expand `lhs = Rvalue::Aggregate(kind, operands)` into assignments to the fields.
|
/// Expand `lhs = Rvalue::Aggregate(kind, operands)` into assignments to the fields.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use crate::stable_hasher;
|
use crate::stable_hasher;
|
||||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -9,7 +9,6 @@ use crate::fx::FxHashSet;
|
|||||||
use crate::graph::vec_graph::VecGraph;
|
use crate::graph::vec_graph::VecGraph;
|
||||||
use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
|
use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
|
||||||
use rustc_index::vec::{Idx, IndexVec};
|
use rustc_index::vec::{Idx, IndexVec};
|
||||||
use std::cmp::Ord;
|
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::cmp::Ord;
|
|
||||||
|
|
||||||
use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
|
use crate::graph::{DirectedGraph, GraphSuccessors, WithNumEdges, WithNumNodes, WithSuccessors};
|
||||||
use rustc_index::vec::{Idx, IndexVec};
|
use rustc_index::vec::{Idx, IndexVec};
|
||||||
|
|
||||||
|
@ -867,11 +867,9 @@ where
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
|
use std::cmp::Ordering;
|
||||||
use std::convert::From;
|
|
||||||
use std::fmt::{self, Debug};
|
use std::fmt::{self, Debug};
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::marker::{Send, Sync};
|
|
||||||
|
|
||||||
impl<O, T: ?Sized> Deref for OwningRef<O, T> {
|
impl<O, T: ?Sized> Deref for OwningRef<O, T> {
|
||||||
type Target = T;
|
type Target = T;
|
||||||
@ -1096,7 +1094,6 @@ where
|
|||||||
// std types integration and convenience type defs
|
// std types integration and convenience type defs
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
use std::boxed::Box;
|
|
||||||
use std::cell::{Ref, RefCell, RefMut};
|
use std::cell::{Ref, RefCell, RefMut};
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
mod owning_ref {
|
mod owning_ref {
|
||||||
use super::super::OwningRef;
|
use super::super::OwningRef;
|
||||||
use super::super::{BoxRef, Erased, ErasedBoxRef, RcRef};
|
use super::super::{BoxRef, Erased, ErasedBoxRef, RcRef};
|
||||||
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
|
use std::cmp::Ordering;
|
||||||
use std::collections::hash_map::DefaultHasher;
|
use std::collections::hash_map::DefaultHasher;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
@ -368,7 +368,7 @@ mod owning_handle {
|
|||||||
mod owning_ref_mut {
|
mod owning_ref_mut {
|
||||||
use super::super::BoxRef;
|
use super::super::BoxRef;
|
||||||
use super::super::{BoxRefMut, Erased, ErasedBoxRefMut, OwningRefMut};
|
use super::super::{BoxRefMut, Erased, ErasedBoxRefMut, OwningRefMut};
|
||||||
use std::cmp::{Ord, Ordering, PartialEq, PartialOrd};
|
use std::cmp::Ordering;
|
||||||
use std::collections::hash_map::DefaultHasher;
|
use std::collections::hash_map::DefaultHasher;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
@ -86,7 +86,6 @@ use crate::fx::FxHashMap;
|
|||||||
|
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::collections::hash_map::Entry;
|
use std::collections::hash_map::Entry;
|
||||||
use std::convert::Into;
|
|
||||||
use std::error::Error;
|
use std::error::Error;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
use crate::stable_hasher::{HashStable, StableHasher, StableOrd};
|
use crate::stable_hasher::{HashStable, StableHasher, StableOrd};
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::cmp::Ordering;
|
use std::cmp::Ordering;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use std::ops::{Bound, Index, IndexMut, RangeBounds};
|
use std::ops::{Bound, Index, IndexMut, RangeBounds};
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
//! A variant of `SortedMap` that preserves insertion order.
|
//! A variant of `SortedMap` that preserves insertion order.
|
||||||
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::iter::FromIterator;
|
|
||||||
|
|
||||||
use crate::stable_hasher::{HashStable, StableHasher};
|
use crate::stable_hasher::{HashStable, StableHasher};
|
||||||
use rustc_index::vec::{Idx, IndexVec};
|
use rustc_index::vec::{Idx, IndexVec};
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::iter::ExactSizeIterator;
|
|
||||||
use std::iter::FusedIterator;
|
use std::iter::FusedIterator;
|
||||||
use std::iter::Iterator;
|
|
||||||
|
|
||||||
/// Iterator which may contain instance of
|
/// Iterator which may contain instance of
|
||||||
/// one of two specific implementations.
|
/// one of two specific implementations.
|
||||||
|
@ -3,7 +3,6 @@ use crate::fx::FxHashMap;
|
|||||||
use arrayvec::ArrayVec;
|
use arrayvec::ArrayVec;
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::ops::Index;
|
use std::ops::Index;
|
||||||
|
|
||||||
// For pointer-sized arguments arrays
|
// For pointer-sized arguments arrays
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::iter::FromIterator;
|
|
||||||
|
|
||||||
use super::map::SsoHashMap;
|
use super::map::SsoHashMap;
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ cfg_if! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use std::iter::Iterator as ParallelIterator;
|
pub use Iterator as ParallelIterator;
|
||||||
|
|
||||||
pub fn par_iter<T: IntoIterator>(t: T) -> T::IntoIter {
|
pub fn par_iter<T: IntoIterator>(t: T) -> T::IntoIter {
|
||||||
t.into_iter()
|
t.into_iter()
|
||||||
|
@ -76,7 +76,7 @@ where
|
|||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
// No need to drop the tag, as it's Copy
|
// No need to drop the tag, as it's Copy
|
||||||
unsafe {
|
unsafe {
|
||||||
std::mem::drop(P::from_usize(self.raw.pointer_raw()));
|
drop(P::from_usize(self.raw.pointer_raw()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::slice::Iter;
|
use std::slice::Iter;
|
||||||
use std::vec::IntoIter;
|
use std::vec::IntoIter;
|
||||||
|
|
||||||
|
@ -45,7 +45,6 @@ use rustc_target::json::ToJson;
|
|||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::cmp::max;
|
use std::cmp::max;
|
||||||
use std::default::Default;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::ffi::OsString;
|
use std::ffi::OsString;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
|
@ -55,7 +55,6 @@ wrapper:
|
|||||||
|
|
||||||
```
|
```
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::marker::Sync;
|
|
||||||
|
|
||||||
struct NotThreadSafe<T> {
|
struct NotThreadSafe<T> {
|
||||||
value: Cell<T>,
|
value: Cell<T>,
|
||||||
|
@ -59,7 +59,7 @@ into_diagnostic_arg_using_display!(
|
|||||||
i128,
|
i128,
|
||||||
u128,
|
u128,
|
||||||
std::io::Error,
|
std::io::Error,
|
||||||
std::boxed::Box<dyn std::error::Error>,
|
Box<dyn std::error::Error>,
|
||||||
std::num::NonZeroU32,
|
std::num::NonZeroU32,
|
||||||
hir::Target,
|
hir::Target,
|
||||||
Edition,
|
Edition,
|
||||||
|
@ -34,7 +34,6 @@ use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
|||||||
use rustc_span::{BytePos, FileName, RealFileName, Span, DUMMY_SP};
|
use rustc_span::{BytePos, FileName, RealFileName, Span, DUMMY_SP};
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
|
||||||
use std::default::Default;
|
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
|
@ -6,7 +6,7 @@ use rustc_span::hygiene::DesugaringKind;
|
|||||||
use rustc_span::symbol::Ident;
|
use rustc_span::symbol::Ident;
|
||||||
use rustc_span::Span;
|
use rustc_span::Span;
|
||||||
|
|
||||||
use std::iter::{Enumerate, ExactSizeIterator};
|
use std::iter::Enumerate;
|
||||||
|
|
||||||
pub struct EnumerateAndAdjust<I> {
|
pub struct EnumerateAndAdjust<I> {
|
||||||
enumerate: Enumerate<I>,
|
enumerate: Enumerate<I>,
|
||||||
|
@ -31,7 +31,6 @@ use rustc_trait_selection::traits::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
use std::cell::LazyCell;
|
use std::cell::LazyCell;
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use std::ops::{ControlFlow, Deref};
|
use std::ops::{ControlFlow, Deref};
|
||||||
|
|
||||||
|
@ -30,8 +30,6 @@ use rustc_middle::hir::nested_filter;
|
|||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
use rustc_span::symbol::{sym, Symbol};
|
use rustc_span::symbol::{sym, Symbol};
|
||||||
use rustc_span::Span;
|
use rustc_span::Span;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::vec::Vec;
|
|
||||||
|
|
||||||
const LOADED_FROM_DISK: Symbol = sym::loaded_from_disk;
|
const LOADED_FROM_DISK: Symbol = sym::loaded_from_disk;
|
||||||
const EXCEPT: Symbol = sym::except;
|
const EXCEPT: Symbol = sym::except;
|
||||||
|
@ -113,7 +113,6 @@ use rustc_span::Symbol;
|
|||||||
|
|
||||||
use std::fs as std_fs;
|
use std::fs as std_fs;
|
||||||
use std::io::{self, ErrorKind};
|
use std::io::{self, ErrorKind};
|
||||||
use std::mem;
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
use std::time::{Duration, SystemTime, UNIX_EPOCH};
|
||||||
|
|
||||||
@ -305,7 +304,7 @@ pub fn prepare_session_directory(
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete_session_dir_lock_file(sess, &lock_file_path);
|
delete_session_dir_lock_file(sess, &lock_file_path);
|
||||||
mem::drop(directory_lock);
|
drop(directory_lock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -864,7 +863,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
|
|||||||
|
|
||||||
// Let's make it explicit that the file lock is released at this point,
|
// Let's make it explicit that the file lock is released at this point,
|
||||||
// or rather, that we held on to it until here
|
// or rather, that we held on to it until here
|
||||||
mem::drop(lock);
|
drop(lock);
|
||||||
}
|
}
|
||||||
Err(_) => {
|
Err(_) => {
|
||||||
debug!(
|
debug!(
|
||||||
@ -898,7 +897,7 @@ pub fn garbage_collect_session_directories(sess: &Session) -> io::Result<()> {
|
|||||||
|
|
||||||
// Let's make it explicit that the file lock is released at this point,
|
// Let's make it explicit that the file lock is released at this point,
|
||||||
// or rather, that we held on to it until here
|
// or rather, that we held on to it until here
|
||||||
mem::drop(lock);
|
drop(lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -4,7 +4,6 @@ use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
|||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::ops::{Index, IndexMut, RangeBounds};
|
use std::ops::{Index, IndexMut, RangeBounds};
|
||||||
use std::slice;
|
use std::slice;
|
||||||
|
@ -25,7 +25,6 @@ use rustc_target::spec::{CodeModel, LinkerFlavorCli, MergeFunctions, PanicStrate
|
|||||||
use rustc_target::spec::{RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TlsModel};
|
use rustc_target::spec::{RelroLevel, SanitizerSet, SplitDebuginfo, StackProtector, TlsModel};
|
||||||
|
|
||||||
use std::collections::{BTreeMap, BTreeSet};
|
use std::collections::{BTreeMap, BTreeSet};
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::num::NonZeroUsize;
|
use std::num::NonZeroUsize;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ pub use crate::cursor::Cursor;
|
|||||||
use self::LiteralKind::*;
|
use self::LiteralKind::*;
|
||||||
use self::TokenKind::*;
|
use self::TokenKind::*;
|
||||||
use crate::cursor::EOF_CHAR;
|
use crate::cursor::EOF_CHAR;
|
||||||
use std::convert::TryFrom;
|
|
||||||
|
|
||||||
/// Parsed token.
|
/// Parsed token.
|
||||||
/// It doesn't contain information about data that has been parsed,
|
/// It doesn't contain information about data that has been parsed,
|
||||||
|
@ -16,7 +16,6 @@ use rustc_target::abi::{Abi, Size, WrappingRange};
|
|||||||
use rustc_target::abi::{Integer, TagEncoding, Variants};
|
use rustc_target::abi::{Integer, TagEncoding, Variants};
|
||||||
use rustc_target::spec::abi::Abi as SpecAbi;
|
use rustc_target::spec::abi::Abi as SpecAbi;
|
||||||
|
|
||||||
use std::cmp;
|
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use std::ops::ControlFlow;
|
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 {
|
match binop.node {
|
||||||
hir::BinOpKind::Lt => v > min && v <= max,
|
hir::BinOpKind::Lt => v > min && v <= max,
|
||||||
hir::BinOpKind::Le => v >= min && v < max,
|
hir::BinOpKind::Le => v >= min && v < max,
|
||||||
|
@ -7,7 +7,6 @@ use rustc_middle::ty::ParameterizedOverTcx;
|
|||||||
use rustc_serialize::opaque::FileEncoder;
|
use rustc_serialize::opaque::FileEncoder;
|
||||||
use rustc_serialize::Encoder as _;
|
use rustc_serialize::Encoder as _;
|
||||||
use rustc_span::hygiene::MacroKind;
|
use rustc_span::hygiene::MacroKind;
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::num::NonZeroUsize;
|
use std::num::NonZeroUsize;
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
use rustc_macros::HashStable;
|
use rustc_macros::HashStable;
|
||||||
use rustc_span::Symbol;
|
use rustc_span::Symbol;
|
||||||
|
|
||||||
use std::cmp::Ord;
|
|
||||||
use std::fmt::{self, Debug, Formatter};
|
use std::fmt::{self, Debug, Formatter};
|
||||||
|
|
||||||
rustc_index::newtype_index! {
|
rustc_index::newtype_index! {
|
||||||
|
@ -95,7 +95,6 @@ mod pointer;
|
|||||||
mod queries;
|
mod queries;
|
||||||
mod value;
|
mod value;
|
||||||
|
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::{Read, Write};
|
use std::io::{Read, Write};
|
||||||
|
@ -3,7 +3,6 @@ use super::{AllocId, InterpResult};
|
|||||||
use rustc_macros::HashStable;
|
use rustc_macros::HashStable;
|
||||||
use rustc_target::abi::{HasDataLayout, Size};
|
use rustc_target::abi::{HasDataLayout, Size};
|
||||||
|
|
||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use either::{Either, Left, Right};
|
use either::{Either, Left, Right};
|
||||||
|
@ -36,7 +36,6 @@ use rustc_span::{Span, DUMMY_SP};
|
|||||||
use either::Either;
|
use either::Either;
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::fmt::{self, Debug, Display, Formatter, Write};
|
use std::fmt::{self, Debug, Display, Formatter, Write};
|
||||||
use std::ops::{ControlFlow, Index, IndexMut};
|
use std::ops::{ControlFlow, Index, IndexMut};
|
||||||
use std::{iter, mem};
|
use std::{iter, mem};
|
||||||
|
@ -12,7 +12,6 @@ use crate::ty::subst::{GenericArg, SubstsRef};
|
|||||||
use crate::ty::{self, Ty, TyCtxt};
|
use crate::ty::{self, Ty, TyCtxt};
|
||||||
use rustc_hir::def_id::DefId;
|
use rustc_hir::def_id::DefId;
|
||||||
use rustc_span::source_map::Span;
|
use rustc_span::source_map::Span;
|
||||||
use std::iter::FromIterator;
|
|
||||||
|
|
||||||
pub mod type_op {
|
pub mod type_op {
|
||||||
use crate::ty::fold::TypeFoldable;
|
use crate::ty::fold::TypeFoldable;
|
||||||
|
@ -2,7 +2,6 @@ use rustc_apfloat::ieee::{Double, Single};
|
|||||||
use rustc_apfloat::Float;
|
use rustc_apfloat::Float;
|
||||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||||
use rustc_target::abi::Size;
|
use rustc_target::abi::Size;
|
||||||
use std::convert::{TryFrom, TryInto};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::num::NonZeroU8;
|
use std::num::NonZeroU8;
|
||||||
|
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
use super::Const;
|
use super::Const;
|
||||||
use crate::mir;
|
use crate::mir;
|
||||||
use crate::mir::interpret::{AllocId, ConstValue, Scalar};
|
use crate::mir::interpret::{AllocId, ConstValue, Scalar};
|
||||||
|
@ -23,7 +23,6 @@ use smallvec::SmallVec;
|
|||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::char;
|
use std::char;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt::{self, Write as _};
|
use std::fmt::{self, Write as _};
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use std::ops::{ControlFlow, Deref, DerefMut};
|
use std::ops::{ControlFlow, Deref, DerefMut};
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
use std::convert::TryFrom;
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use crate::mir::interpret::{alloc_range, AllocId, Allocation, Pointer, Scalar};
|
use crate::mir::interpret::{alloc_range, AllocId, Allocation, Pointer, Scalar};
|
||||||
|
@ -30,7 +30,6 @@ mod test;
|
|||||||
mod util;
|
mod util;
|
||||||
|
|
||||||
use std::borrow::Borrow;
|
use std::borrow::Borrow;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
|
|
||||||
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
|
@ -7,7 +7,6 @@ use rustc_middle::thir::*;
|
|||||||
use rustc_middle::ty;
|
use rustc_middle::ty;
|
||||||
use rustc_middle::ty::TypeVisitable;
|
use rustc_middle::ty::TypeVisitable;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
pub(crate) fn field_match_pairs<'pat>(
|
pub(crate) fn field_match_pairs<'pat>(
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::cmp::{self, max, min, Ordering};
|
use std::cmp::{self, max, min, Ordering};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::iter::{once, IntoIterator};
|
use std::iter::once;
|
||||||
use std::ops::RangeInclusive;
|
use std::ops::RangeInclusive;
|
||||||
|
|
||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
//! ## `PartialOrd`
|
//! ## `PartialOrd`
|
||||||
//!
|
//!
|
||||||
//! Given that they represent partially ordered sets, you may be surprised that [`JoinSemiLattice`]
|
//! Given that they represent partially ordered sets, you may be surprised that [`JoinSemiLattice`]
|
||||||
//! and [`MeetSemiLattice`] do not have [`PartialOrd`][std::cmp::PartialOrd] as a supertrait. This
|
//! and [`MeetSemiLattice`] do not have [`PartialOrd`] as a supertrait. This
|
||||||
//! is because most standard library types use lexicographic ordering instead of set inclusion for
|
//! is because most standard library types use lexicographic ordering instead of set inclusion for
|
||||||
//! their `PartialOrd` impl. Since we do not actually need to compare lattice elements to run a
|
//! their `PartialOrd` impl. Since we do not actually need to compare lattice elements to run a
|
||||||
//! dataflow analysis, there's no need for a newtype wrapper with a custom `PartialOrd` impl. The
|
//! dataflow analysis, there's no need for a newtype wrapper with a custom `PartialOrd` impl. The
|
||||||
|
@ -35,7 +35,6 @@ use rustc_middle::mir::visit::{MutVisitor, MutatingUseContext, PlaceContext, Vis
|
|||||||
use rustc_middle::mir::*;
|
use rustc_middle::mir::*;
|
||||||
use rustc_middle::ty::TyCtxt;
|
use rustc_middle::ty::TyCtxt;
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
pub struct SimplifyCfg {
|
pub struct SimplifyCfg {
|
||||||
label: String,
|
label: String,
|
||||||
|
@ -20,7 +20,6 @@ use rustc_middle::ty::{
|
|||||||
Const, Ty, TyCtxt,
|
Const, Ty, TyCtxt,
|
||||||
};
|
};
|
||||||
use rustc_span::symbol::sym;
|
use rustc_span::symbol::sym;
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::ops::ControlFlow;
|
use std::ops::ControlFlow;
|
||||||
|
|
||||||
use crate::errors::UnusedGenericParams;
|
use crate::errors::UnusedGenericParams;
|
||||||
|
@ -6,7 +6,6 @@ use rustc_ast::attr;
|
|||||||
use rustc_ast::token::{self, Delimiter, Nonterminal};
|
use rustc_ast::token::{self, Delimiter, Nonterminal};
|
||||||
use rustc_errors::{error_code, fluent, Diagnostic, IntoDiagnostic, PResult};
|
use rustc_errors::{error_code, fluent, Diagnostic, IntoDiagnostic, PResult};
|
||||||
use rustc_span::{sym, BytePos, Span};
|
use rustc_span::{sym, BytePos, Span};
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
// Public for rustfmt usage
|
// Public for rustfmt usage
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
|
@ -8,7 +8,6 @@ use rustc_errors::PResult;
|
|||||||
use rustc_session::parse::ParseSess;
|
use rustc_session::parse::ParseSess;
|
||||||
use rustc_span::{sym, Span, DUMMY_SP};
|
use rustc_span::{sym, Span, DUMMY_SP};
|
||||||
|
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::ops::Range;
|
use std::ops::Range;
|
||||||
|
|
||||||
/// A wrapper type to ensure that the parser handles outer attributes correctly.
|
/// A wrapper type to ensure that the parser handles outer attributes correctly.
|
||||||
|
@ -21,7 +21,6 @@ use rustc_span::lev_distance::lev_distance;
|
|||||||
use rustc_span::source_map::{self, Span};
|
use rustc_span::source_map::{self, Span};
|
||||||
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
use rustc_span::symbol::{kw, sym, Ident, Symbol};
|
||||||
use rustc_span::DUMMY_SP;
|
use rustc_span::DUMMY_SP;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::mem;
|
use std::mem;
|
||||||
use thin_vec::ThinVec;
|
use thin_vec::ThinVec;
|
||||||
use tracing::debug;
|
use tracing::debug;
|
||||||
|
@ -46,7 +46,7 @@ impl DepNodeIndex {
|
|||||||
pub const FOREVER_RED_NODE: DepNodeIndex = DepNodeIndex::from_u32(1);
|
pub const FOREVER_RED_NODE: DepNodeIndex = DepNodeIndex::from_u32(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::convert::From<DepNodeIndex> for QueryInvocationId {
|
impl From<DepNodeIndex> for QueryInvocationId {
|
||||||
#[inline]
|
#[inline]
|
||||||
fn from(dep_node_index: DepNodeIndex) -> Self {
|
fn from(dep_node_index: DepNodeIndex) -> Self {
|
||||||
QueryInvocationId(dep_node_index.as_u32())
|
QueryInvocationId(dep_node_index.as_u32())
|
||||||
|
@ -22,7 +22,6 @@ use rustc_index::vec::{Idx, IndexVec};
|
|||||||
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder, IntEncodedWithFixedSize, MemDecoder};
|
use rustc_serialize::opaque::{FileEncodeResult, FileEncoder, IntEncodedWithFixedSize, MemDecoder};
|
||||||
use rustc_serialize::{Decodable, Decoder, Encodable};
|
use rustc_serialize::{Decodable, Decoder, Encodable};
|
||||||
use smallvec::SmallVec;
|
use smallvec::SmallVec;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
// The maximum value of `SerializedDepNodeIndex` leaves the upper two bits
|
// The maximum value of `SerializedDepNodeIndex` leaves the upper two bits
|
||||||
// unused so that we can store multiple index types in `CompressedHybridIndex`,
|
// unused so that we can store multiple index types in `CompressedHybridIndex`,
|
||||||
|
@ -9,7 +9,6 @@ use rustc_data_structures::sharded::Sharded;
|
|||||||
use rustc_data_structures::sync::Lock;
|
use rustc_data_structures::sync::Lock;
|
||||||
use rustc_data_structures::sync::WorkerLocal;
|
use rustc_data_structures::sync::WorkerLocal;
|
||||||
use rustc_index::vec::{Idx, IndexVec};
|
use rustc_index::vec::{Idx, IndexVec};
|
||||||
use std::default::Default;
|
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
@ -22,8 +22,8 @@ use {
|
|||||||
rustc_data_structures::{jobserver, OnDrop},
|
rustc_data_structures::{jobserver, OnDrop},
|
||||||
rustc_rayon_core as rayon_core,
|
rustc_rayon_core as rayon_core,
|
||||||
rustc_span::DUMMY_SP,
|
rustc_span::DUMMY_SP,
|
||||||
std::iter::{self, FromIterator},
|
std::iter,
|
||||||
std::{mem, process},
|
std::process,
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Represents a span and a query key.
|
/// Represents a span and a query key.
|
||||||
@ -247,7 +247,7 @@ impl QueryLatch {
|
|||||||
jobserver::release_thread();
|
jobserver::release_thread();
|
||||||
waiter.condvar.wait(&mut info);
|
waiter.condvar.wait(&mut info);
|
||||||
// Release the lock before we potentially block in `acquire_thread`
|
// Release the lock before we potentially block in `acquire_thread`
|
||||||
mem::drop(info);
|
drop(info);
|
||||||
jobserver::acquire_thread();
|
jobserver::acquire_thread();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -36,7 +36,6 @@ use rustc_span::symbol::Ident;
|
|||||||
use rustc_span::*;
|
use rustc_span::*;
|
||||||
|
|
||||||
use std::cell::Cell;
|
use std::cell::Cell;
|
||||||
use std::default::Default;
|
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::BufWriter;
|
use std::io::BufWriter;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
use crate::leb128::{self, largest_max_leb128_len};
|
use crate::leb128::{self, largest_max_leb128_len};
|
||||||
use crate::serialize::{Decodable, Decoder, Encodable, Encoder};
|
use crate::serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||||
use std::convert::TryInto;
|
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
use std::mem::MaybeUninit;
|
use std::mem::MaybeUninit;
|
||||||
|
@ -32,7 +32,7 @@ use std::collections::btree_map::{
|
|||||||
use std::collections::{BTreeMap, BTreeSet};
|
use std::collections::{BTreeMap, BTreeSet};
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::iter::{self, FromIterator};
|
use std::iter;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::str::{self, FromStr};
|
use std::str::{self, FromStr};
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use std::env;
|
use std::env;
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use crate::search_paths::{PathKind, SearchPath};
|
use crate::search_paths::{PathKind, SearchPath};
|
||||||
|
@ -15,11 +15,10 @@ pub use crate::*;
|
|||||||
use rustc_data_structures::fx::FxHashMap;
|
use rustc_data_structures::fx::FxHashMap;
|
||||||
use rustc_data_structures::stable_hasher::StableHasher;
|
use rustc_data_structures::stable_hasher::StableHasher;
|
||||||
use rustc_data_structures::sync::{AtomicU32, Lrc, MappedReadGuard, ReadGuard, RwLock};
|
use rustc_data_structures::sync::{AtomicU32, Lrc, MappedReadGuard, ReadGuard, RwLock};
|
||||||
|
use std::cmp;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::sync::atomic::Ordering;
|
use std::sync::atomic::Ordering;
|
||||||
use std::{clone::Clone, cmp};
|
|
||||||
use std::{convert::TryFrom, unreachable};
|
|
||||||
|
|
||||||
use std::fs;
|
use std::fs;
|
||||||
use std::io;
|
use std::io;
|
||||||
|
@ -9,7 +9,6 @@ use rustc_data_structures::sync::Lock;
|
|||||||
use rustc_macros::HashStable_Generic;
|
use rustc_macros::HashStable_Generic;
|
||||||
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
||||||
|
|
||||||
use std::cmp::{Ord, PartialEq, PartialOrd};
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::str;
|
use std::str;
|
||||||
@ -1974,7 +1973,6 @@ pub mod kw {
|
|||||||
/// For example `sym::rustfmt` or `sym::u8`.
|
/// For example `sym::rustfmt` or `sym::u8`.
|
||||||
pub mod sym {
|
pub mod sym {
|
||||||
use super::Symbol;
|
use super::Symbol;
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
#[doc(inline)]
|
#[doc(inline)]
|
||||||
pub use super::sym_generated::*;
|
pub use super::sym_generated::*;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#![deny(rustc::untranslatable_diagnostic)]
|
#![deny(rustc::untranslatable_diagnostic)]
|
||||||
#![deny(rustc::diagnostic_outside_of_impl)]
|
#![deny(rustc::diagnostic_outside_of_impl)]
|
||||||
|
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
|
@ -45,9 +45,7 @@ use rustc_span::symbol::{sym, Symbol};
|
|||||||
use serde_json::Value;
|
use serde_json::Value;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::convert::TryFrom;
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
use std::iter::FromIterator;
|
|
||||||
use std::ops::{Deref, DerefMut};
|
use std::ops::{Deref, DerefMut};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#![allow(rustc::usage_of_ty_tykind)]
|
#![allow(rustc::usage_of_ty_tykind)]
|
||||||
|
|
||||||
use std::cmp::{Eq, Ord, Ordering, PartialEq, PartialOrd};
|
use std::cmp::Ordering;
|
||||||
use std::{fmt, hash};
|
use std::{fmt, hash};
|
||||||
|
|
||||||
use crate::DebruijnIndex;
|
use crate::DebruijnIndex;
|
||||||
|
Loading…
Reference in New Issue
Block a user