minor fix

This commit is contained in:
Mark Mansi 2019-11-29 11:07:01 -06:00
parent 05db660d39
commit 2a86b6cb33

View File

@ -121,10 +121,6 @@ impl RegionName {
} }
} }
crate fn name(&self) -> Symbol {
self.name
}
crate fn highlight_region_name(&self, diag: &mut DiagnosticBuilder<'_>) { crate fn highlight_region_name(&self, diag: &mut DiagnosticBuilder<'_>) {
match &self.source { match &self.source {
RegionNameSource::NamedFreeRegion(span) RegionNameSource::NamedFreeRegion(span)
@ -309,7 +305,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
// happen if we have an elided name in an async fn for example: the // happen if we have an elided name in an async fn for example: the
// compiler will generate a region named `'_`, but reporting such a name is // compiler will generate a region named `'_`, but reporting such a name is
// not actually useful, so we synthesize a name for it instead. // not actually useful, so we synthesize a name for it instead.
let name = self.synthesize_region_name(renctx); let name = renctx.synthesize_region_name();
Some(RegionName { Some(RegionName {
name, name,
source: RegionNameSource::AnonRegionFromAsyncFn(span), source: RegionNameSource::AnonRegionFromAsyncFn(span),