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
..
2021-08-30 13:09:38 +02:00
2021-09-08 20:51:05 -04:00
2021-09-07 18:08:46 -04:00
2021-09-08 20:51:05 -04:00
2021-08-30 20:17:45 -05:00
2021-08-21 13:27:27 -05:00
2021-09-08 20:40:30 +02:00
2021-09-04 01:40:36 +00:00
2021-09-07 19:57:07 +02:00
2021-09-05 16:14:41 +00:00
2021-09-07 12:31:11 +00:00
2021-09-08 20:51:05 -04:00
2021-09-08 20:51:05 -04:00
2021-09-07 20:46:26 +02:00
2021-08-30 22:18:55 -07:00
2021-09-08 20:51:05 -04:00
2021-09-10 08:23:14 -07:00
2021-09-09 19:49:07 +02:00
2021-09-07 18:08:46 -04:00
2021-09-07 18:08:46 -04:00
2021-09-06 23:58:16 +00:00
2021-08-27 16:21:25 -07:00
2021-09-06 22:38:06 -04:00
2021-09-07 20:46:26 +02:00
2021-08-22 17:27:18 +02:00
2021-09-05 21:40:34 +00:00
2021-08-27 20:47:00 +03:00
2021-08-26 10:40:27 -04:00
2021-08-19 19:30:04 +02:00
2021-09-04 07:17:12 +00:00
2021-09-09 19:49:07 +02:00
2021-09-09 19:49:07 +02:00
2021-09-08 20:40:30 +02:00
2021-09-09 19:49:07 +02:00
2021-09-08 20:40:30 +02:00
2021-09-08 20:51:05 -04:00
2021-09-09 19:49:07 +02:00
2021-08-21 13:27:27 -05:00
2021-09-02 19:23:11 +02:00
2021-09-06 23:58:16 +00:00
2021-09-01 11:10:58 -07:00
2021-09-06 11:20:59 -05:00
2021-09-08 20:51:05 -04:00
2021-08-22 16:35:29 +02:00
2021-09-08 17:36:41 +02:00
2021-09-09 19:49:07 +02:00
2021-08-29 16:25:28 +02:00
2021-09-05 16:14:41 +00:00
2021-09-06 22:38:06 -04:00
2021-08-27 01:07:17 +00:00
2021-08-27 01:07:17 +00:00
2021-09-06 22:38:06 -04:00
2021-09-08 20:51:05 -04:00