File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1126,10 +1126,12 @@ impl<T> fmt::Debug for Discriminant<T> {
1126
1126
///
1127
1127
/// [Reference]: ../../reference/items/enumerations.html#custom-discriminant-values-for-fieldless-enumerations
1128
1128
///
1129
- /// The value of a [`Discriminant<T>`] is independent of any *lifetimes* in `T`. As such, reading
1130
- /// or writing a `Discriminant<Foo<'a>>` as a `Discriminant<Foo<'b>>` (whether via [`transmute`] or
1131
- /// otherwise) is always sound. Note that this is **not** true for other kinds of generic
1132
- /// parameters; `Discriminant<Foo<A>>` and `Discriminant<Foo<B>>` might be incompatible.
1129
+ /// The value of a [`Discriminant<T>`] is independent of any *free lifetimes* in `T`. As such,
1130
+ /// reading or writing a `Discriminant<Foo<'a>>` as a `Discriminant<Foo<'b>>` (whether via
1131
+ /// [`transmute`] or otherwise) is always sound. Note that this is **not** true for other kinds
1132
+ /// of generic parameters and for higher-ranked lifetimes; `Discriminant<Foo<A>>` and
1133
+ /// `Discriminant<Foo<B>>` as well as `Discriminant<Bar<dyn for<'a> Trait<'a>>>` and
1134
+ /// `Discriminant<Bar<dyn Trait<'static>>>` may be incompatible.
1133
1135
///
1134
1136
/// # Examples
1135
1137
///
You can’t perform that action at this time.
0 commit comments