diff options
| author | bors <bors@rust-lang.org> | 2019-03-27 08:58:40 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-03-27 08:58:40 +0000 |
| commit | c5fb4d0d2f464bc9ab61f7693ed4dde4d9326820 (patch) | |
| tree | cdee8726acffb5087a4cb9343491a4b72e80a487 /src/librustdoc/html/static/source-script.js | |
| parent | 267fb90b55736dc2362e8621a247f54da5fd8d40 (diff) | |
| parent | e88b0d9a94118168fd02a917e7c99ad47cf3418e (diff) | |
| download | rust-c5fb4d0d2f464bc9ab61f7693ed4dde4d9326820.tar.gz rust-c5fb4d0d2f464bc9ab61f7693ed4dde4d9326820.zip | |
Auto merge of #55780 - ogoffart:span_source_text, r=petrochenkov
Introduce proc_macro::Span::source_text A function to extract the actual source behind a Span. Background: I would like to use `syn` in a `build.rs` script to parse the rust code, and extract part of the source code. However, `syn` only gives access to proc_macro2::Span, and i would like to get the source code behind that. I opened an issue on proc_macro2 bug tracker for this feature https://github.com/alexcrichton/proc-macro2/issues/110 and @alexcrichton said the feature should first go upstream in proc_macro. So there it is! Since most of the Span API is unstable anyway, this is guarded by the same `proc_macro_span` feature as everything else.
Diffstat (limited to 'src/librustdoc/html/static/source-script.js')
0 files changed, 0 insertions, 0 deletions
