about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/queries.rs
diff options
context:
space:
mode:
authorYuki Okushi <jtitor@2k36.org>2022-07-30 07:39:55 +0900
committerGitHub <noreply@github.com>2022-07-30 07:39:55 +0900
commit735969eacdc8eecc16eb9b646f994518188fb9fd (patch)
tree532aba54ddde3b4ebe603d84df272013cf2e64a2 /compiler/rustc_interface/src/queries.rs
parent5c3b6d6882c2e3508cc764d2fca8be312c74b198 (diff)
parentdec29b158258d5a0fd2362feee707ff416fc9787 (diff)
downloadrust-735969eacdc8eecc16eb9b646f994518188fb9fd.tar.gz
rust-735969eacdc8eecc16eb9b646f994518188fb9fd.zip
Rollup merge of #99891 - compiler-errors:suggest-slicing-carefully, r=oli-obk
Adjust an expr span to account for macros

Fix this erroneous suggestion:

```
error[E0529]: expected an array or slice, found `Vec<{integer}>`
 --> /home/gh-compiler-errors/test.rs:2:9
  |
2 |     let [..] = vec![1, 2, 3];
  |         ^^^^ pattern cannot match with input type `Vec<{integer}>`
  |
help: consider slicing here
 --> /home/gh-compiler-errors/rust2/library/alloc/src/macros.rs:50:36
  |
50~         $crate::__rust_force_expr!(<[_]>::into_vec(
51+             #[rustc_box]
52+             $crate::boxed::Box::new([$($x),+])
53~         )[..])
```
Diffstat (limited to 'compiler/rustc_interface/src/queries.rs')
0 files changed, 0 insertions, 0 deletions