1
Fork 0

Rollup merge of #101545 - TaKO8Ki:remove-unnecessary-partialord-ord, r=oli-obk

Remove unnecessary `PartialOrd` and `Ord`
This commit is contained in:
Dylan DPC 2022-09-08 20:48:38 +05:30 committed by GitHub
commit 720a82dd52
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 7 additions and 27 deletions

View file

@ -57,7 +57,7 @@ use rustc_span::{Span, DUMMY_SP};
use smallvec::{smallvec, SmallVec};
use std::cell::{Cell, RefCell};
use std::collections::BTreeSet;
use std::{cmp, fmt, ptr};
use std::{fmt, ptr};
use diagnostics::{ImportSuggestion, LabelSuggestion, Suggestion};
use imports::{Import, ImportKind, ImportResolver, NameResolution};
@ -163,7 +163,6 @@ enum ImplTraitContext {
Universal(LocalDefId),
}
#[derive(Eq)]
struct BindingError {
name: Symbol,
origin: BTreeSet<Span>,
@ -171,24 +170,6 @@ struct BindingError {
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> {
/// Error E0401: can't use type or const parameters from outer function.
GenericParamsFromOuterFunction(Res, HasGenericParams),
@ -845,7 +826,7 @@ impl<'a> NameBinding<'a> {
}
}
#[derive(Debug, Default, Clone)]
#[derive(Default, Clone)]
pub struct ExternPreludeEntry<'a> {
extern_crate_item: Option<&'a NameBinding<'a>>,
pub introduced_by_item: bool,