Skip to content

Commit 6934618

Browse files
committed
remove SupSupConflict, which is now dead code
1 parent 18698c8 commit 6934618

File tree

2 files changed

+0
-49
lines changed

2 files changed

+0
-49
lines changed

src/librustc/middle/infer/error_reporting.rs

-40
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ use super::ValuePairs;
6565
use super::region_inference::RegionResolutionError;
6666
use super::region_inference::ConcreteFailure;
6767
use super::region_inference::SubSupConflict;
68-
use super::region_inference::SupSupConflict;
6968
use super::region_inference::GenericBoundFailure;
7069
use super::region_inference::GenericKind;
7170
use super::region_inference::ProcessedErrors;
@@ -258,13 +257,6 @@ pub trait ErrorReporting<'tcx> {
258257
sup_origin: SubregionOrigin<'tcx>,
259258
sup_region: Region);
260259

261-
fn report_sup_sup_conflict(&self,
262-
var_origin: RegionVariableOrigin,
263-
origin1: SubregionOrigin<'tcx>,
264-
region1: Region,
265-
origin2: SubregionOrigin<'tcx>,
266-
region2: Region);
267-
268260
fn report_processed_errors(&self,
269261
var_origin: &[RegionVariableOrigin],
270262
trace_origin: &[(TypeTrace<'tcx>, TypeError<'tcx>)],
@@ -313,14 +305,6 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
313305
sup_origin, sup_r);
314306
}
315307

316-
SupSupConflict(var_origin,
317-
origin1, r1,
318-
origin2, r2) => {
319-
self.report_sup_sup_conflict(var_origin,
320-
origin1, r1,
321-
origin2, r2);
322-
}
323-
324308
ProcessedErrors(ref var_origins,
325309
ref trace_origins,
326310
ref same_regions) => {
@@ -376,7 +360,6 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
376360
None => processed_errors.push((*error).clone()),
377361
}
378362
}
379-
SupSupConflict(..) => processed_errors.push((*error).clone()),
380363
_ => () // This shouldn't happen
381364
}
382365
}
@@ -930,29 +913,6 @@ impl<'a, 'tcx> ErrorReporting<'tcx> for InferCtxt<'a, 'tcx> {
930913
self.note_region_origin(&sub_origin);
931914
}
932915

933-
fn report_sup_sup_conflict(&self,
934-
var_origin: RegionVariableOrigin,
935-
origin1: SubregionOrigin<'tcx>,
936-
region1: Region,
937-
origin2: SubregionOrigin<'tcx>,
938-
region2: Region) {
939-
self.report_inference_failure(var_origin);
940-
941-
self.tcx.note_and_explain_region(
942-
"first, the lifetime must be contained by ",
943-
region1,
944-
"...");
945-
946-
self.note_region_origin(&origin1);
947-
948-
self.tcx.note_and_explain_region(
949-
"but, the lifetime must also be contained by ",
950-
region2,
951-
"...");
952-
953-
self.note_region_origin(&origin2);
954-
}
955-
956916
fn report_processed_errors(&self,
957917
var_origins: &[RegionVariableOrigin],
958918
trace_origins: &[(TypeTrace<'tcx>, TypeError<'tcx>)],

src/librustc/middle/infer/region_inference/mod.rs

-9
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,6 @@ pub enum RegionResolutionError<'tcx> {
141141
SubregionOrigin<'tcx>, Region,
142142
SubregionOrigin<'tcx>, Region),
143143

144-
/// `SupSupConflict(v, origin1, r1, origin2, r2)`:
145-
///
146-
/// Could not infer a value for `v` because `v <= r1` (due to
147-
/// `origin1`) and `v <= r2` (due to `origin2`) and
148-
/// `r1` and `r2` have no intersection.
149-
SupSupConflict(RegionVariableOrigin,
150-
SubregionOrigin<'tcx>, Region,
151-
SubregionOrigin<'tcx>, Region),
152-
153144
/// For subsets of `ConcreteFailure` and `SubSupConflict`, we can derive
154145
/// more specific errors message by suggesting to the user where they
155146
/// should put a lifetime. In those cases we process and put those errors

0 commit comments

Comments
 (0)