Skip to content

Commit

Permalink
Auto merge of #60984 - matthewjasper:borrowck-error-reporting-cleanup…
Browse files Browse the repository at this point in the history
…, r=pnkfelix

Borrowck error reporting cleanup

* Don't show variables created by desugarings in borrowck errors
* Move "conflict error" reporting to it's own module, so that `error_reporting` contains only common error reporting methods.
* Remove unused `ScopeTree` parameter.

r? @pnkfelix
  • Loading branch information
bors committed May 24, 2019
2 parents fd8e23c + 8dc945c commit 4680580
Show file tree
Hide file tree
Showing 11 changed files with 2,108 additions and 2,020 deletions.
7 changes: 7 additions & 0 deletions src/librustc/mir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,13 @@ impl<'tcx> LocalDecl<'tcx> {
}
}

/// Returns `true` is the local is from a compiler desugaring, e.g.,
/// `__next` from a `for` loop.
#[inline]
pub fn from_compiler_desugaring(&self) -> bool {
self.source_info.span.compiler_desugaring_kind().is_some()
}

/// Creates a new `LocalDecl` for a temporary.
#[inline]
pub fn new_temp(ty: Ty<'tcx>, span: Span) -> Self {
Expand Down
Loading

0 comments on commit 4680580

Please sign in to comment.