diff options
| author | bors <bors@rust-lang.org> | 2016-06-13 21:07:30 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-13 21:07:30 -0700 |
| commit | bf84f4e171fa0169af59881bc5d87ecc84d61523 (patch) | |
| tree | d8b761d077e741723110a4d5d945748fb17cac57 /src/libsyntax/ext/base.rs | |
| parent | 6551acc8e560d242f317f4fe4324be0962c5db75 (diff) | |
| parent | 2477341d057aff05a8a009a7eb7a1168ccd4e277 (diff) | |
| download | rust-bf84f4e171fa0169af59881bc5d87ecc84d61523.tar.gz rust-bf84f4e171fa0169af59881bc5d87ecc84d61523.zip | |
Auto merge of #33749 - jseyfried:fix_call_site_span, r=nrc
Fix macro call site spans Fix macro call site spans. r? @nrc
Diffstat (limited to 'src/libsyntax/ext/base.rs')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index 95624a43373..b5e4dc63e84 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -617,22 +617,6 @@ impl<'a> ExtCtxt<'a> { } pub fn backtrace(&self) -> ExpnId { self.backtrace } - /// Original span that caused the current exapnsion to happen. - pub fn original_span(&self) -> Span { - let mut expn_id = self.backtrace; - let mut call_site = None; - loop { - match self.codemap().with_expn_info(expn_id, |ei| ei.map(|ei| ei.call_site)) { - None => break, - Some(cs) => { - call_site = Some(cs); - expn_id = cs.expn_id; - } - } - } - call_site.expect("missing expansion backtrace") - } - /// Returns span for the macro which originally caused the current expansion to happen. /// /// Stops backtracing at include! boundary. |
