Skip to content

Commit f9180cb

Browse files
committed
Reviewed error explanations.
This closes rust-lang#36.
1 parent 083576b commit f9180cb

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

src/changes.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,22 @@ user code is guaranteed to use them in a read-only fashion."
344344
user code that tries to mutate them will break."
345345
}
346346
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."
348351
}
349352
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."
351357
}
352358
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."
355363
}
356364
RegionParameterAdded => {
357365
"Adding a new region parameter is a breaking change, because it can break
@@ -360,7 +368,7 @@ before."
360368
}
361369
RegionParameterRemoved => {
362370
"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
364372
before."
365373
}
366374
TypeParameterAdded { defaulted: true } => {

0 commit comments

Comments
 (0)