diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-07-18 23:05:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-18 23:05:24 +0200 |
| commit | d1250bc1d53360184cc9dbebd385c3492a01e683 (patch) | |
| tree | 8a3e5766b52fa3d7d75223a44425d11b4556f305 /compiler/rustc_pattern_analysis/src/errors.rs | |
| parent | 11688370dd0467c78ac23f89029b2ba17156b000 (diff) | |
| parent | abf92c049dcdacdadb0a7f45426df30f2dbdb0dc (diff) | |
| download | rust-d1250bc1d53360184cc9dbebd385c3492a01e683.tar.gz rust-d1250bc1d53360184cc9dbebd385c3492a01e683.zip | |
Rollup merge of #127929 - estebank:addr_of, r=compiler-errors
Use more accurate span for `addr_of!` suggestion Use a multipart suggestion instead of a single whole-span replacement: ``` error[E0796]: creating a shared reference to a mutable static --> $DIR/reference-to-mut-static-unsafe-fn.rs:10:18 | LL | let _y = &X; | ^^ shared reference to mutable static | = note: this shared reference has lifetime `'static`, but if the static ever gets mutated, or a mutable reference is created, then any further use of this shared reference is Undefined Behavior help: use `addr_of!` instead to create a raw pointer | LL | let _y = addr_of!(X); | ~~~~~~~~~ + ```
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
