diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-06-30 01:53:17 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-06-30 01:53:32 +0300 |
| commit | 84f1bc8b662da4ceb0e448bf0d24ce627e6a462b (patch) | |
| tree | f43a60b5fbefba0ccb7fad613f5df8bfafebdc51 /src/libproc_macro | |
| parent | b69d51162b5391119e86d1c6e884aa09292a7806 (diff) | |
| download | rust-84f1bc8b662da4ceb0e448bf0d24ce627e6a462b.tar.gz rust-84f1bc8b662da4ceb0e448bf0d24ce627e6a462b.zip | |
Address comments
Diffstat (limited to 'src/libproc_macro')
| -rw-r--r-- | src/libproc_macro/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libproc_macro/lib.rs b/src/libproc_macro/lib.rs index 820b0906a75..fb5cbf473a3 100644 --- a/src/libproc_macro/lib.rs +++ b/src/libproc_macro/lib.rs @@ -1434,9 +1434,12 @@ pub mod __internal { CURRENT_SESS.with(|p| { let _reset = Reset { prev: p.get() }; - // No way to determine def location for a proc macro rigth now, so use call location. + // No way to determine def location for a proc macro right now, so use call location. let location = cx.current_expansion.mark.expn_info().unwrap().call_site; // Opaque mark was already created by expansion, now create its transparent twin. + // We can't use the call-site span literally here, even if it appears to provide + // correct name resolution, because it has all the `ExpnInfo` wrong, so the edition + // checks, lint macro checks, macro backtraces will all break. let opaque_mark = cx.current_expansion.mark; let transparent_mark = Mark::fresh_cloned(opaque_mark); transparent_mark.set_transparency(Transparency::Transparent); |
