Don't generate multiple impl blocks

This commit is contained in:
Dániel Buga 2020-10-24 11:55:00 +02:00
parent 7bade6ef73
commit 6533d010cf

View File

@ -2036,13 +2036,13 @@ direct_interners! {
macro_rules! slice_interners {
($($field:ident: $method:ident($ty:ty)),+ $(,)?) => (
$(impl<'tcx> TyCtxt<'tcx> {
pub fn $method(self, v: &[$ty]) -> &'tcx List<$ty> {
impl<'tcx> TyCtxt<'tcx> {
$(pub fn $method(self, v: &[$ty]) -> &'tcx List<$ty> {
self.interners.$field.intern_ref(v, || {
Interned(List::from_arena(&*self.arena, v))
}).0
}
})+
})+
}
);
}