remove unnecessary PartialOrd
and Ord
This commit is contained in:
parent
b44197abb0
commit
bdc865d8f7
@ -135,7 +135,6 @@ pub struct RegionInferenceContext<'tcx> {
|
|||||||
/// adds a new lower bound to the SCC it is analyzing: so you wind up
|
/// adds a new lower bound to the SCC it is analyzing: so you wind up
|
||||||
/// with `'R: 'O` where `'R` is the pick-region and `'O` is the
|
/// with `'R: 'O` where `'R` is the pick-region and `'O` is the
|
||||||
/// minimal viable option.
|
/// minimal viable option.
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd)]
|
|
||||||
pub(crate) struct AppliedMemberConstraint {
|
pub(crate) struct AppliedMemberConstraint {
|
||||||
/// The SCC that was affected. (The "member region".)
|
/// The SCC that was affected. (The "member region".)
|
||||||
///
|
///
|
||||||
|
@ -456,7 +456,7 @@ struct HandlerInner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A key denoting where from a diagnostic was stashed.
|
/// A key denoting where from a diagnostic was stashed.
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, Hash)]
|
||||||
pub enum StashKey {
|
pub enum StashKey {
|
||||||
ItemNoType,
|
ItemNoType,
|
||||||
UnderscoreForArrayLengths,
|
UnderscoreForArrayLengths,
|
||||||
|
@ -457,7 +457,7 @@ impl PartialRes {
|
|||||||
|
|
||||||
/// Different kinds of symbols can coexist even if they share the same textual name.
|
/// Different kinds of symbols can coexist even if they share the same textual name.
|
||||||
/// Therefore, they each have a separate universe (known as a "namespace").
|
/// Therefore, they each have a separate universe (known as a "namespace").
|
||||||
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
|
#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)]
|
||||||
pub enum Namespace {
|
pub enum Namespace {
|
||||||
/// The type namespace includes `struct`s, `enum`s, `union`s, `trait`s, and `mod`s
|
/// The type namespace includes `struct`s, `enum`s, `union`s, `trait`s, and `mod`s
|
||||||
/// (and, by extension, crates).
|
/// (and, by extension, crates).
|
||||||
|
@ -141,7 +141,7 @@ pub enum TokenKind {
|
|||||||
Unknown,
|
Unknown,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord)]
|
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
|
||||||
pub enum DocStyle {
|
pub enum DocStyle {
|
||||||
Outer,
|
Outer,
|
||||||
Inner,
|
Inner,
|
||||||
|
@ -705,7 +705,7 @@ pub enum TerminatorKind<'tcx> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Information about an assertion failure.
|
/// Information about an assertion failure.
|
||||||
#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq, PartialOrd)]
|
#[derive(Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq)]
|
||||||
pub enum AssertKind<O> {
|
pub enum AssertKind<O> {
|
||||||
BoundsCheck { len: O, index: O },
|
BoundsCheck { len: O, index: O },
|
||||||
Overflow(BinOp, O, O),
|
Overflow(BinOp, O, O),
|
||||||
|
@ -14,7 +14,7 @@ use std::slice;
|
|||||||
|
|
||||||
pub use super::query::*;
|
pub use super::query::*;
|
||||||
|
|
||||||
#[derive(Debug, Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq, PartialOrd)]
|
#[derive(Debug, Clone, TyEncodable, TyDecodable, Hash, HashStable, PartialEq)]
|
||||||
pub struct SwitchTargets {
|
pub struct SwitchTargets {
|
||||||
/// Possible values. The locations to branch to in each case
|
/// Possible values. The locations to branch to in each case
|
||||||
/// are found in the corresponding indices from the `targets` vector.
|
/// are found in the corresponding indices from the `targets` vector.
|
||||||
|
@ -57,7 +57,7 @@ use rustc_span::{Span, DUMMY_SP};
|
|||||||
use smallvec::{smallvec, SmallVec};
|
use smallvec::{smallvec, SmallVec};
|
||||||
use std::cell::{Cell, RefCell};
|
use std::cell::{Cell, RefCell};
|
||||||
use std::collections::BTreeSet;
|
use std::collections::BTreeSet;
|
||||||
use std::{cmp, fmt, ptr};
|
use std::{fmt, ptr};
|
||||||
|
|
||||||
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
|
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
|
||||||
use imports::{Import, ImportKind, ImportResolver, NameResolution};
|
use imports::{Import, ImportKind, ImportResolver, NameResolution};
|
||||||
@ -163,7 +163,6 @@ enum ImplTraitContext {
|
|||||||
Universal(LocalDefId),
|
Universal(LocalDefId),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Eq)]
|
|
||||||
struct BindingError {
|
struct BindingError {
|
||||||
name: Symbol,
|
name: Symbol,
|
||||||
origin: BTreeSet<Span>,
|
origin: BTreeSet<Span>,
|
||||||
@ -171,24 +170,6 @@ struct BindingError {
|
|||||||
could_be_path: bool,
|
could_be_path: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialOrd for BindingError {
|
|
||||||
fn partial_cmp(&self, other: &BindingError) -> Option<cmp::Ordering> {
|
|
||||||
Some(self.cmp(other))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl PartialEq for BindingError {
|
|
||||||
fn eq(&self, other: &BindingError) -> bool {
|
|
||||||
self.name == other.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Ord for BindingError {
|
|
||||||
fn cmp(&self, other: &BindingError) -> cmp::Ordering {
|
|
||||||
self.name.cmp(&other.name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
enum ResolutionError<'a> {
|
enum ResolutionError<'a> {
|
||||||
/// Error E0401: can't use type or const parameters from outer function.
|
/// Error E0401: can't use type or const parameters from outer function.
|
||||||
GenericParamsFromOuterFunction(Res, HasGenericParams),
|
GenericParamsFromOuterFunction(Res, HasGenericParams),
|
||||||
@ -845,7 +826,7 @@ impl<'a> NameBinding<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Default, Clone)]
|
#[derive(Default, Clone)]
|
||||||
pub struct ExternPreludeEntry<'a> {
|
pub struct ExternPreludeEntry<'a> {
|
||||||
extern_crate_item: Option<&'a NameBinding<'a>>,
|
extern_crate_item: Option<&'a NameBinding<'a>>,
|
||||||
pub introduced_by_item: bool,
|
pub introduced_by_item: bool,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user