about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2023-10-27 11:48:05 +0200
committerGitHub <noreply@github.com>2023-10-27 11:48:05 +0200
commita69fb480a4cb8e6bedff17602fdf880b3fcee9b7 (patch)
tree5fb3dd694e0a9228ee9dbce2b3900d33d72903fa /compiler/rustc_interface/src/errors.rs
parent8d67c3212407523bede9c37387ce03363068a81e (diff)
parent27919ceba717cd5be7f7ebcb2f5e5f5afa955035 (diff)
downloadrust-a69fb480a4cb8e6bedff17602fdf880b3fcee9b7.tar.gz
rust-a69fb480a4cb8e6bedff17602fdf880b3fcee9b7.zip
Rollup merge of #116868 - estebank:suggestion, r=petrochenkov
Tweak suggestion span for outer attr and point at item following invalid inner attr

After:

```
error: `unix_sigpipe` attribute cannot be used at crate level
  --> $DIR/unix_sigpipe-crate.rs:2:1
   |
LL | #![unix_sigpipe = "inherit"]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LL |
LL | fn main() {}
   | ------------ the inner attribute doesn't annotate this function
   |
help: perhaps you meant to use an outer attribute
   |
LL - #![unix_sigpipe = "inherit"]
LL + #[unix_sigpipe = "inherit"]
   |
```

Before:

```
error: `unix_sigpipe` attribute cannot be used at crate level
  --> $DIR/unix_sigpipe-crate.rs:2:1
   |
LL | #![unix_sigpipe = "inherit"]
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: perhaps you meant to use an outer attribute
   |
LL | #[unix_sigpipe = "inherit"]
   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

CC #89566.
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions