@@ -344,14 +344,22 @@ user code is guaranteed to use them in a read-only fashion."
344
344
user code that tries to mutate them will break."
345
345
}
346
346
VarianceLoosened => {
347
- "The variance of a type or region parameter in an item loosens iff <TODO>."
347
+ "The variance of a type or region parameter in an item loosens if an invariant
348
+ parameter becomes co-, contra- or bivariant, or a co- or contravariant parameter becomes
349
+ bivariant. See https://doc.rust-lang.org/nomicon/subtyping.html for an explanation of the
350
+ concept of variance in Rust."
348
351
}
349
352
VarianceTightened => {
350
- "The variance of a type or region parameter in an item tightens iff <TODO>."
353
+ "The variance of a type or region parameter in an item tightens if a variant
354
+ parameter becomes co-, contra- or invariant, or a co- or contravairant parameter becomes
355
+ invariant. See https://doc.rust-lang.org/nomicon/subtyping.html for an explanation of the
356
+ concept of variance in Rust."
351
357
}
352
358
VarianceChanged { .. } => {
353
- "Switching the variance of a type or region parameter is breaking, if it goes
354
- from covariant to contravariant, or vice-versa."
359
+ "Switching the variance of a type or region parameter is breaking if it is
360
+ changed from covariant to contravariant, or vice-versa.
361
+ See https://doc.rust-lang.org/nomicon/subtyping.html for an explanation of the concept of
362
+ variance in Rust."
355
363
}
356
364
RegionParameterAdded => {
357
365
"Adding a new region parameter is a breaking change, because it can break
@@ -360,7 +368,7 @@ before."
360
368
}
361
369
RegionParameterRemoved => {
362
370
"Removing a region parameter is a breaking change, because it can break
363
- explicit type annotations, well as prevent region inference working as
371
+ explicit type annotations, as well as prevent region inference working as
364
372
before."
365
373
}
366
374
TypeParameterAdded { defaulted : true } => {
0 commit comments