about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2021-06-04 13:42:58 +0900
committerGitHub <noreply@github.com>2021-06-04 13:42:58 +0900
commit99fc56b9dedc18e13942e06c1b964cf93cf5a6e7 (patch)
tree1e41df2aeebe6aa81605c35bba42b76f05451b02 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent5b0a49efa8d5ecc2838edfb93820e46dbff1a606 (diff)
parente735f6086d4f131ccc6f0205e850860faaea3411 (diff)
downloadrust-99fc56b9dedc18e13942e06c1b964cf93cf5a6e7.tar.gz
rust-99fc56b9dedc18e13942e06c1b964cf93cf5a6e7.zip
Rollup merge of #85937 - m-ou-se:macro-ref-suggestions, r=estebank
Fix bad suggestions for code from proc_macro

Fixes #85932

This disables these suggestions for spans from external macros, while keeping them for macros defined locally:

Before:
```
3 | #[hello]
  | ^^^^^^^^
  | |
  | expected `&mut i32`, found integer
  | help: consider mutably borrowing here: `&mut #[hello]`
```

After:
```
3 | #[hello]
  | ^^^^^^^^ expected `&mut i32`, found integer
```

Unchanged:
```
26 | macro_rules! bla { () => { x(123); } }
   |                              ^^^
   |                              |
   |                              expected `&mut i32`, found integer
   |                              help: consider mutably borrowing here: `&mut 123`
...
29 |     bla!();
   |     ------- in this macro invocation
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions