about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2021-09-10 08:23:14 -0700
committerGitHub <noreply@github.com>2021-09-10 08:23:14 -0700
commit000dbd27f146f4fd6ee2fb5e0f3060c440a08898 (patch)
tree5d4a2ffcb93d0e604ef357304d4269805ca98feb /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentacfe7c41412808094fd85ba3b9f5ceeabfeea932 (diff)
parentf9be6cd8988a48a532c99a9f5b887a6d354e5b2f (diff)
downloadrust-000dbd27f146f4fd6ee2fb5e0f3060c440a08898.tar.gz
rust-000dbd27f146f4fd6ee2fb5e0f3060c440a08898.zip
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()
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions