implement type-changing-struct-update
put the test dir in test/ui/rfcs
This commit is contained in:
parent
41d8c94d45
commit
7bde18a0f3
10 changed files with 275 additions and 29 deletions
|
@ -42,6 +42,7 @@ pub enum TypeError<'tcx> {
|
|||
TupleSize(ExpectedFound<usize>),
|
||||
FixedArraySize(ExpectedFound<u64>),
|
||||
ArgCount,
|
||||
FieldMisMatch(Symbol, Symbol),
|
||||
|
||||
RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>),
|
||||
RegionsInsufficientlyPolymorphic(BoundRegionKind, Region<'tcx>),
|
||||
|
@ -134,6 +135,7 @@ impl<'tcx> fmt::Display for TypeError<'tcx> {
|
|||
pluralize!(values.found)
|
||||
),
|
||||
ArgCount => write!(f, "incorrect number of function parameters"),
|
||||
FieldMisMatch(adt, field) => write!(f, "field type mismatch: {}.{}", adt, field),
|
||||
RegionsDoesNotOutlive(..) => write!(f, "lifetime mismatch"),
|
||||
RegionsInsufficientlyPolymorphic(br, _) => write!(
|
||||
f,
|
||||
|
@ -224,6 +226,7 @@ impl<'tcx> TypeError<'tcx> {
|
|||
| ArgumentMutability(_)
|
||||
| TupleSize(_)
|
||||
| ArgCount
|
||||
| FieldMisMatch(..)
|
||||
| RegionsDoesNotOutlive(..)
|
||||
| RegionsInsufficientlyPolymorphic(..)
|
||||
| RegionsOverlyPolymorphic(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue