diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2017-05-15 09:41:05 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2017-05-15 09:41:05 +0000 |
| commit | 4f2f27014de578c26478848fc746182e22413540 (patch) | |
| tree | c30a068a7efe230ab18551a588bc9dc0d8845b26 /src/libsyntax/ext/base.rs | |
| parent | 9956e81c19c2f5bbc273d75b49f2e031d80d0e4e (diff) | |
| download | rust-4f2f27014de578c26478848fc746182e22413540.tar.gz rust-4f2f27014de578c26478848fc746182e22413540.zip | |
Fix regression on `include!(line!())`.
Diffstat (limited to 'src/libsyntax/ext/base.rs')
| -rw-r--r-- | src/libsyntax/ext/base.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs index fda026fec64..1f279cc9c80 100644 --- a/src/libsyntax/ext/base.rs +++ b/src/libsyntax/ext/base.rs @@ -695,7 +695,7 @@ impl<'a> ExtCtxt<'a> { /// Returns span for the macro which originally caused the current expansion to happen. /// /// Stops backtracing at include! boundary. - pub fn expansion_cause(&self) -> Span { + pub fn expansion_cause(&self) -> Option<Span> { let mut ctxt = self.backtrace(); let mut last_macro = None; loop { @@ -711,7 +711,7 @@ impl<'a> ExtCtxt<'a> { break } } - last_macro.expect("missing expansion backtrace") + last_macro } pub fn struct_span_warn(&self, |
