rust/compiler/rustc_typeck
Yuki Okushi 99fc56b9de
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
```
2021-06-04 13:42:58 +09:00
..
src Rollup merge of #85937 - m-ou-se:macro-ref-suggestions, r=estebank 2021-06-04 13:42:58 +09:00
Cargo.toml move representability out of rustc_middle 2021-04-27 15:01:37 +02:00
README.md

For high-level intro to how type checking works in rustc, see the type checking chapter of the rustc dev guide.