Skip to content

Commit e4379e6

Browse files
committed
make regionerrors a typedef
1 parent 5d9e74e commit e4379e6

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/librustc_mir/borrow_check/diagnostics/region_errors.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ enum Trace {
6363

6464
/// A collection of errors encountered during region inference. This is needed to efficiently
6565
/// report errors after borrow checking.
66-
#[derive(Clone, Debug)]
67-
crate struct RegionErrors<'tcx> {
68-
errors: smallvec::SmallVec<[RegionErrorKind<'tcx>; 4]>,
69-
}
66+
crate type RegionErrors<'tcx> = smallvec::SmallVec<[RegionErrorKind<'tcx>; 4]>;
7067

7168
#[derive(Clone, Debug)]
7269
crate enum RegionErrorKind<'tcx> {
@@ -155,22 +152,6 @@ pub struct ErrorConstraintInfo {
155152
pub(super) span: Span,
156153
}
157154

158-
impl<'tcx> RegionErrors<'tcx> {
159-
pub fn new() -> Self {
160-
RegionErrors {
161-
errors: smallvec::SmallVec::new(),
162-
}
163-
}
164-
165-
pub fn push(&mut self, error: RegionErrorKind<'tcx>) {
166-
self.errors.push(error)
167-
}
168-
169-
pub fn into_iter(self) -> impl Iterator<Item=RegionErrorKind<'tcx>> {
170-
self.errors.into_iter()
171-
}
172-
}
173-
174155
impl<'tcx> RegionInferenceContext<'tcx> {
175156
/// Converts a region inference variable into a `ty::Region` that
176157
/// we can use for error reporting. If `r` is universally bound,

0 commit comments

Comments
 (0)