diff options
| author | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-08-30 02:39:06 +0300 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <edy.burt@gmail.com> | 2017-09-01 11:17:03 +0300 |
| commit | ea6aca7726bd035ae79fc4643f863178c8f26e90 (patch) | |
| tree | 009389c2e2d9347c66b28c13016bbed40122d923 /src/librustc/ty/error.rs | |
| parent | 28ddd7a4ef30a89091dbf48cae18f571326510fb (diff) | |
| download | rust-ea6aca7726bd035ae79fc4643f863178c8f26e90.tar.gz rust-ea6aca7726bd035ae79fc4643f863178c8f26e90.zip | |
rustc: take TyCtxt and RegionMaps in CodeMap::span.
Diffstat (limited to 'src/librustc/ty/error.rs')
| -rw-r--r-- | src/librustc/ty/error.rs | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/src/librustc/ty/error.rs b/src/librustc/ty/error.rs index 802994ae094..49d7f40000f 100644 --- a/src/librustc/ty/error.rs +++ b/src/librustc/ty/error.rs @@ -36,11 +36,11 @@ pub enum TypeError<'tcx> { TupleSize(ExpectedFound<usize>), FixedArraySize(ExpectedFound<usize>), ArgCount, + RegionsDoesNotOutlive(Region<'tcx>, Region<'tcx>), - RegionsNotSame(Region<'tcx>, Region<'tcx>), - RegionsNoOverlap(Region<'tcx>, Region<'tcx>), RegionsInsufficientlyPolymorphic(BoundRegion, Region<'tcx>), RegionsOverlyPolymorphic(BoundRegion, Region<'tcx>), + Sorts(ExpectedFound<Ty<'tcx>>), IntMismatch(ExpectedFound<ty::IntVarValue>), FloatMismatch(ExpectedFound<ast::FloatTy>), @@ -110,12 +110,6 @@ impl<'tcx> fmt::Display for TypeError<'tcx> { RegionsDoesNotOutlive(..) => { write!(f, "lifetime mismatch") } - RegionsNotSame(..) => { - write!(f, "lifetimes are not the same") - } - RegionsNoOverlap(..) => { - write!(f, "lifetimes do not intersect") - } RegionsInsufficientlyPolymorphic(br, _) => { write!(f, "expected bound lifetime parameter{}{}, found concrete lifetime", @@ -243,33 +237,6 @@ impl<'a, 'gcx, 'tcx> TyCtxt<'a, 'gcx, 'tcx> { use self::TypeError::*; match err.clone() { - RegionsDoesNotOutlive(subregion, superregion) => { - self.note_and_explain_region(db, "", subregion, "..."); - self.note_and_explain_region(db, "...does not necessarily outlive ", - superregion, ""); - } - RegionsNotSame(region1, region2) => { - self.note_and_explain_region(db, "", region1, "..."); - self.note_and_explain_region(db, "...is not the same lifetime as ", - region2, ""); - } - RegionsNoOverlap(region1, region2) => { - self.note_and_explain_region(db, "", region1, "..."); - self.note_and_explain_region(db, "...does not overlap ", - region2, ""); - } - RegionsInsufficientlyPolymorphic(_, conc_region) => { - self.note_and_explain_region(db, "concrete lifetime that was found is ", - conc_region, ""); - } - RegionsOverlyPolymorphic(_, &ty::ReVar(_)) => { - // don't bother to print out the message below for - // inference variables, it's not very illuminating. - } - RegionsOverlyPolymorphic(_, conc_region) => { - self.note_and_explain_region(db, "expected concrete lifetime is ", - conc_region, ""); - } Sorts(values) => { let expected_str = values.expected.sort_string(self); let found_str = values.found.sort_string(self); |
