diff options
| author | bors <bors@rust-lang.org> | 2019-10-03 23:29:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-03 23:29:48 +0000 |
| commit | 31d75c4e9c5318e880601d3c2cc71e5df094a120 (patch) | |
| tree | 715665644e650d0e3b22ced38a144b586a3616bf /src/libsyntax_pos | |
| parent | 032a53a06ce293571e51bbe621a5c480e8a28e95 (diff) | |
| parent | cc5dcfaada556c5b28f7e95a26d42119bd5e98cc (diff) | |
| download | rust-31d75c4e9c5318e880601d3c2cc71e5df094a120.tar.gz rust-31d75c4e9c5318e880601d3c2cc71e5df094a120.zip | |
Auto merge of #65076 - tmandry:rollup-ka7nzb6, r=tmandry
Rollup of 11 pull requests Successful merges: - #61879 (Stabilize todo macro) - #64675 (Deprecate `#![plugin]` & `#[plugin_registrar]`) - #64690 (proc_macro API: Expose `macro_rules` hygiene) - #64706 (add regression test for #60218) - #64741 (Prevent rustdoc feature doctests) - #64842 (Disallow Self in type param defaults of ADTs) - #65004 (Replace mentions of IRC with Discord) - #65018 (Set RUST_BACKTRACE=0 in tests that include a backtrace in stderr) - #65055 (Add long error explanation for E0556) - #65056 (Make visit projection iterative) - #65057 (typo: fix typo in E0392) Failed merges: r? @ghost
Diffstat (limited to 'src/libsyntax_pos')
| -rw-r--r-- | src/libsyntax_pos/lib.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsyntax_pos/lib.rs b/src/libsyntax_pos/lib.rs index 6e83e1d3f8d..30ee9b90515 100644 --- a/src/libsyntax_pos/lib.rs +++ b/src/libsyntax_pos/lib.rs @@ -526,6 +526,12 @@ impl Span { self.with_ctxt_from_mark(expn_id, Transparency::Transparent) } + /// Equivalent of `Span::mixed_site` from the proc macro API, + /// except that the location is taken from the `self` span. + pub fn with_mixed_site_ctxt(&self, expn_id: ExpnId) -> Span { + self.with_ctxt_from_mark(expn_id, Transparency::SemiTransparent) + } + /// Produces a span with the same location as `self` and context produced by a macro with the /// given ID and transparency, assuming that macro was defined directly and not produced by /// some other macro (which is the case for built-in and procedural macros). |
