rust/library/proc_macro/src/bridge
Manish Goregaokar 000dbd27f1
Rollup merge of #86165 - m-ou-se:proc-macro-span-shrink, r=dtolnay
Add proc_macro::Span::{before, after}.

This adds `proc_macro::Span::before()` and `proc_macro::Span::after()` to get a zero width span at the start or end of the span.

These are equivalent to rustc's `Span::shrink_to_lo()` and `Span::shrink_to_hi()` but with a less cryptic name. They are useful when generating diagnostlics like "missing \<thing\> after \<thing\>".

E.g.

```rust
syn::Error::new(ident.span().after(), "missing `:` after field name").into_compile_error()
```
2021-09-10 08:23:14 -07:00
..
buffer.rs proc_macro/bridge: Remove dead code Slice type 2021-07-01 10:20:57 -07:00
client.rs Fix may not to appropriate might not or must not 2021-07-29 01:15:20 -04:00
closure.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
handle.rs mv std libs to library/ 2020-07-27 19:51:13 -05:00
mod.rs Rollup merge of #86165 - m-ou-se:proc-macro-span-shrink, r=dtolnay 2021-09-10 08:23:14 -07:00
rpc.rs Fix a few misspellings. 2021-06-25 13:18:56 -07:00
scoped_cell.rs Bump bootstrap compiler version 2020-11-19 19:23:36 -05:00
server.rs Add -Z proc-macro-backtrace to allow showing proc-macro panics 2020-08-30 22:17:24 -04:00