Built-in implementation of Tuple trait
This commit is contained in:
@@ -634,6 +634,10 @@ pub enum ImplSource<'tcx, N> {
|
||||
|
||||
/// ImplSource for a `const Drop` implementation.
|
||||
ConstDestruct(ImplSourceConstDestructData<N>),
|
||||
|
||||
/// ImplSource for a `std::marker::Tuple` implementation.
|
||||
/// This has no nested predicates ever, so no data.
|
||||
Tuple,
|
||||
}
|
||||
|
||||
impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
@@ -648,7 +652,8 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
ImplSource::Object(d) => d.nested,
|
||||
ImplSource::FnPointer(d) => d.nested,
|
||||
ImplSource::DiscriminantKind(ImplSourceDiscriminantKindData)
|
||||
| ImplSource::Pointee(ImplSourcePointeeData) => Vec::new(),
|
||||
| ImplSource::Pointee(ImplSourcePointeeData)
|
||||
| ImplSource::Tuple => Vec::new(),
|
||||
ImplSource::TraitAlias(d) => d.nested,
|
||||
ImplSource::TraitUpcasting(d) => d.nested,
|
||||
ImplSource::ConstDestruct(i) => i.nested,
|
||||
@@ -666,7 +671,8 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
ImplSource::Object(d) => &d.nested,
|
||||
ImplSource::FnPointer(d) => &d.nested,
|
||||
ImplSource::DiscriminantKind(ImplSourceDiscriminantKindData)
|
||||
| ImplSource::Pointee(ImplSourcePointeeData) => &[],
|
||||
| ImplSource::Pointee(ImplSourcePointeeData)
|
||||
| ImplSource::Tuple => &[],
|
||||
ImplSource::TraitAlias(d) => &d.nested,
|
||||
ImplSource::TraitUpcasting(d) => &d.nested,
|
||||
ImplSource::ConstDestruct(i) => &i.nested,
|
||||
@@ -733,6 +739,7 @@ impl<'tcx, N> ImplSource<'tcx, N> {
|
||||
nested: i.nested.into_iter().map(f).collect(),
|
||||
})
|
||||
}
|
||||
ImplSource::Tuple => ImplSource::Tuple,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user