Skip to content

Commit

Permalink
Reviewed error explanations.
Browse files Browse the repository at this point in the history
This closes rust-lang#36.
  • Loading branch information
ibabushkin committed Jun 9, 2019
1 parent 083576b commit f9180cb
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,22 @@ user code is guaranteed to use them in a read-only fashion."
user code that tries to mutate them will break."
}
VarianceLoosened => {
"The variance of a type or region parameter in an item loosens iff <TODO>."
"The variance of a type or region parameter in an item loosens if an invariant
parameter becomes co-, contra- or bivariant, or a co- or contravariant parameter becomes
bivariant. See https://doc.rust-lang.org/nomicon/subtyping.html for an explanation of the
concept of variance in Rust."
}
VarianceTightened => {
"The variance of a type or region parameter in an item tightens iff <TODO>."
"The variance of a type or region parameter in an item tightens if a variant
parameter becomes co-, contra- or invariant, or a co- or contravairant parameter becomes
invariant. See https://doc.rust-lang.org/nomicon/subtyping.html for an explanation of the
concept of variance in Rust."
}
VarianceChanged { .. } => {
"Switching the variance of a type or region parameter is breaking, if it goes
from covariant to contravariant, or vice-versa."
"Switching the variance of a type or region parameter is breaking if it is
changed from covariant to contravariant, or vice-versa.
See https://doc.rust-lang.org/nomicon/subtyping.html for an explanation of the concept of
variance in Rust."
}
RegionParameterAdded => {
"Adding a new region parameter is a breaking change, because it can break
Expand All @@ -360,7 +368,7 @@ before."
}
RegionParameterRemoved => {
"Removing a region parameter is a breaking change, because it can break
explicit type annotations, well as prevent region inference working as
explicit type annotations, as well as prevent region inference working as
before."
}
TypeParameterAdded { defaulted: true } => {
Expand Down

0 comments on commit f9180cb

Please sign in to comment.