Remove even more redundant builtin candidates
This commit is contained in:
@@ -661,20 +661,6 @@ pub enum ImplSource<'tcx, N> {
|
||||
/// ImplSource for trait upcasting coercion
|
||||
TraitUpcasting(ImplSourceTraitUpcastingData<N>),
|
||||
|
||||
/// ImplSource automatically generated for a closure. The `DefId` is the ID
|
||||
/// of the closure expression. This is an `ImplSource::UserDefined` in spirit, but the
|
||||
/// impl is generated by the compiler and does not appear in the source.
|
||||
Closure(Vec<N>),
|
||||
|
||||
/// Same as above, but for a function pointer type with the given signature.
|
||||
FnPointer(Vec<N>),
|
||||
|
||||
/// ImplSource automatically generated for a generator.
|
||||
Generator(Vec<N>),
|
||||
|
||||
/// ImplSource automatically generated for a generator backing an async future.
|
||||
Future(Vec<N>),
|
||||
|
||||
/// ImplSource for a trait alias.
|
||||
TraitAlias(ImplSourceTraitAliasData<'tcx, N>),
|
||||
}
|
||||
@@ -683,12 +669,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
pub fn nested_obligations(self) -> Vec<N> {
|
||||
match self {
|
||||
ImplSource::UserDefined(i) => i.nested,
|
||||
ImplSource::Param(n, _)
|
||||
| ImplSource::Builtin(n)
|
||||
| ImplSource::FnPointer(n)
|
||||
| ImplSource::Closure(n)
|
||||
| ImplSource::Generator(n)
|
||||
| ImplSource::Future(n) => n,
|
||||
ImplSource::Param(n, _) | ImplSource::Builtin(n) => n,
|
||||
ImplSource::Object(d) => d.nested,
|
||||
ImplSource::TraitAlias(d) => d.nested,
|
||||
ImplSource::TraitUpcasting(d) => d.nested,
|
||||
@@ -698,12 +679,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
pub fn borrow_nested_obligations(&self) -> &[N] {
|
||||
match self {
|
||||
ImplSource::UserDefined(i) => &i.nested,
|
||||
ImplSource::Param(n, _)
|
||||
| ImplSource::Builtin(n)
|
||||
| ImplSource::FnPointer(n)
|
||||
| ImplSource::Closure(n)
|
||||
| ImplSource::Generator(n)
|
||||
| ImplSource::Future(n) => &n,
|
||||
ImplSource::Param(n, _) | ImplSource::Builtin(n) => &n,
|
||||
ImplSource::Object(d) => &d.nested,
|
||||
ImplSource::TraitAlias(d) => &d.nested,
|
||||
ImplSource::TraitUpcasting(d) => &d.nested,
|
||||
@@ -713,12 +689,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
pub fn borrow_nested_obligations_mut(&mut self) -> &mut [N] {
|
||||
match self {
|
||||
ImplSource::UserDefined(i) => &mut i.nested,
|
||||
ImplSource::Param(n, _)
|
||||
| ImplSource::Builtin(n)
|
||||
| ImplSource::FnPointer(n)
|
||||
| ImplSource::Closure(n)
|
||||
| ImplSource::Generator(n)
|
||||
| ImplSource::Future(n) => n,
|
||||
ImplSource::Param(n, _) | ImplSource::Builtin(n) => n,
|
||||
ImplSource::Object(d) => &mut d.nested,
|
||||
ImplSource::TraitAlias(d) => &mut d.nested,
|
||||
ImplSource::TraitUpcasting(d) => &mut d.nested,
|
||||
@@ -742,10 +713,6 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
vtable_base: o.vtable_base,
|
||||
nested: o.nested.into_iter().map(f).collect(),
|
||||
}),
|
||||
ImplSource::Closure(n) => ImplSource::Closure(n.into_iter().map(f).collect()),
|
||||
ImplSource::Generator(n) => ImplSource::Generator(n.into_iter().map(f).collect()),
|
||||
ImplSource::Future(n) => ImplSource::Future(n.into_iter().map(f).collect()),
|
||||
ImplSource::FnPointer(n) => ImplSource::FnPointer(n.into_iter().map(f).collect()),
|
||||
ImplSource::TraitAlias(d) => ImplSource::TraitAlias(ImplSourceTraitAliasData {
|
||||
alias_def_id: d.alias_def_id,
|
||||
substs: d.substs,
|
||||
|
||||
Reference in New Issue
Block a user