@@ -141,13 +141,12 @@ decl_derive!(
141
141
/// such derived implementations are only applicable if the annotated type does not contain
142
142
/// anything that may be of interest to a folder.
143
143
///
144
- /// If the annotated type has a `'tcx` lifetime parameter, then that will be used as the
145
- /// lifetime for the type context/interner; otherwise the lifetime of the type context/interner
146
- /// will be unrelated to the annotated type. It therefore matters how any lifetime parameters of
147
- /// the annotated type are named. For example, deriving `TypeFoldable` for both `Foo<'a>` and
148
- /// `Bar<'tcx>` will respectively produce:
144
+ /// The derived implementation will use `TyCtxt<'tcx>` as the interner iff the annotated type
145
+ /// has a `'tcx` lifetime parameter; otherwise it will be generic over all interners. It
146
+ /// therefore matters how any lifetime parameters of the annotated type are named. For example,
147
+ /// deriving `TypeFoldable` for both `Foo<'a>` and `Bar<'tcx>` will respectively produce:
149
148
///
150
- /// `impl<'a, 'tcx > TypeFoldable<TyCtxt<'tcx> > for Foo<'a>`
149
+ /// `impl<'a, I: Interner > TypeFoldable<I > for Foo<'a>`
151
150
///
152
151
/// and
153
152
///
@@ -176,13 +175,12 @@ decl_derive!(
176
175
/// above, such derived implementations are only applicable if the annotated type does not
177
176
/// contain anything that may be of interest to visitors.
178
177
///
179
- /// If the annotated type has a `'tcx` lifetime parameter, then that will be used as the
180
- /// lifetime for the type context/interner; otherwise the lifetime of the type context/interner
181
- /// will be unrelated to the annotated type. It therefore matters how any lifetime parameters of
182
- /// the annotated type are named. For example, deriving `TypeVisitable` for both `Foo<'a>` and
183
- /// `Bar<'tcx>` will respectively produce:
178
+ /// The derived implementation will use `TyCtxt<'tcx>` as the interner iff the annotated type
179
+ /// has a `'tcx` lifetime parameter; otherwise it will be generic over all interners. It
180
+ /// therefore matters how any lifetime parameters of the annotated type are named. For example,
181
+ /// deriving `TypeVisitable` for both `Foo<'a>` and `Bar<'tcx>` will respectively produce:
184
182
///
185
- /// `impl<'a, 'tcx > TypeVisitable<TyCtxt<'tcx> > for Foo<'a>`
183
+ /// `impl<'a, I: Interner > TypeVisitable<I > for Foo<'a>`
186
184
///
187
185
/// and
188
186
///
0 commit comments