@@ -1971,32 +1971,8 @@ impl<'tcx, T: Hash> Hash for Interned<'tcx, List<T>> {
1971
1971
}
1972
1972
}
1973
1973
1974
- impl<'tcx> Borrow<[Ty<'tcx>]> for Interned<'tcx, List<Ty<'tcx>>> {
1975
- fn borrow<'a>(&'a self) -> &'a [Ty<'tcx>] {
1976
- &self.0[..]
1977
- }
1978
- }
1979
-
1980
- impl<'tcx> Borrow<[CanonicalVarInfo]> for Interned<'tcx, List<CanonicalVarInfo>> {
1981
- fn borrow(&self) -> &[CanonicalVarInfo] {
1982
- &self.0[..]
1983
- }
1984
- }
1985
-
1986
- impl<'tcx> Borrow<[GenericArg<'tcx>]> for Interned<'tcx, InternalSubsts<'tcx>> {
1987
- fn borrow<'a>(&'a self) -> &'a [GenericArg<'tcx>] {
1988
- &self.0[..]
1989
- }
1990
- }
1991
-
1992
- impl<'tcx> Borrow<[ProjectionKind]> for Interned<'tcx, List<ProjectionKind>> {
1993
- fn borrow(&self) -> &[ProjectionKind] {
1994
- &self.0[..]
1995
- }
1996
- }
1997
-
1998
- impl<'tcx> Borrow<[PlaceElem<'tcx>]> for Interned<'tcx, List<PlaceElem<'tcx>>> {
1999
- fn borrow(&self) -> &[PlaceElem<'tcx>] {
1974
+ impl<'tcx, T> Borrow<[T]> for Interned<'tcx, List<T>> {
1975
+ fn borrow<'a>(&'a self) -> &'a [T] {
2000
1976
&self.0[..]
2001
1977
}
2002
1978
}
@@ -2007,34 +1983,12 @@ impl<'tcx> Borrow<RegionKind> for Interned<'tcx, RegionKind> {
2007
1983
}
2008
1984
}
2009
1985
2010
- impl<'tcx> Borrow<[ExistentialPredicate<'tcx>]>
2011
- for Interned<'tcx, List<ExistentialPredicate<'tcx>>>
2012
- {
2013
- fn borrow<'a>(&'a self) -> &'a [ExistentialPredicate<'tcx>] {
2014
- &self.0[..]
2015
- }
2016
- }
2017
-
2018
- impl<'tcx> Borrow<[Predicate<'tcx>]> for Interned<'tcx, List<Predicate<'tcx>>> {
2019
- fn borrow<'a>(&'a self) -> &'a [Predicate<'tcx>] {
2020
- &self.0[..]
2021
- }
2022
- }
2023
-
2024
1986
impl<'tcx> Borrow<Const<'tcx>> for Interned<'tcx, Const<'tcx>> {
2025
1987
fn borrow<'a>(&'a self) -> &'a Const<'tcx> {
2026
1988
&self.0
2027
1989
}
2028
1990
}
2029
1991
2030
- impl<'tcx> Borrow<[traits::ChalkEnvironmentClause<'tcx>]>
2031
- for Interned<'tcx, List<traits::ChalkEnvironmentClause<'tcx>>>
2032
- {
2033
- fn borrow<'a>(&'a self) -> &'a [traits::ChalkEnvironmentClause<'tcx>] {
2034
- &self.0[..]
2035
- }
2036
- }
2037
-
2038
1992
impl<'tcx> Borrow<PredicateKind<'tcx>> for Interned<'tcx, PredicateKind<'tcx>> {
2039
1993
fn borrow<'a>(&'a self) -> &'a PredicateKind<'tcx> {
2040
1994
&self.0
0 commit comments