This repository was archived by the owner on May 28, 2025. It is now read-only.
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 @@ -1132,10 +1132,12 @@ impl<T> fmt::Debug for Discriminant<T> {
11321132///
11331133/// [Reference]: ../../reference/items/enumerations.html#custom-discriminant-values-for-fieldless-enumerations
11341134///
1135- /// The value of a [`Discriminant<T>`] is independent of any *lifetimes* in `T`. As such, reading
1136- /// or writing a `Discriminant<Foo<'a>>` as a `Discriminant<Foo<'b>>` (whether via [`transmute`] or
1137- /// otherwise) is always sound. Note that this is **not** true for other kinds of generic
1138- /// parameters; `Discriminant<Foo<A>>` and `Discriminant<Foo<B>>` might be incompatible.
1135+ /// The value of a [`Discriminant<T>`] is independent of any *free lifetimes* in `T`. As such,
1136+ /// reading or writing a `Discriminant<Foo<'a>>` as a `Discriminant<Foo<'b>>` (whether via
1137+ /// [`transmute`] or otherwise) is always sound. Note that this is **not** true for other kinds
1138+ /// of generic parameters and for higher-ranked lifetimes; `Discriminant<Foo<A>>` and
1139+ /// `Discriminant<Foo<B>>` as well as `Discriminant<Bar<dyn for<'a> Trait<'a>>>` and
1140+ /// `Discriminant<Bar<dyn Trait<'static>>>` may be incompatible.
11391141///
11401142/// # Examples
11411143///
You can’t perform that action at this time.
0 commit comments