rust/tests/ui/statics
Esteban Küber abf92c049d 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);
   |                  ~~~~~~~~~ +
```
2024-07-18 18:39:20 +00:00
..
auxiliary
check-immutable-mut-slices.rs
check-immutable-mut-slices.stderr
check-recursion-foreign.rs
check-values-constraints.rs
check-values-constraints.stderr
const_generics.rs
issue-14227.rs
issue-14227.stderr
issue-15261.rs
issue-15261.stderr Use more accurate span for addr_of! suggestion 2024-07-18 18:39:20 +00:00
issue-17233.rs
issue-17718-static-sync.rs
issue-17718-static-sync.stderr
issue-17718-static-unsafe-interior.rs
issue-44373-2.rs
issue-44373.rs
issue-44373.stderr
issue-91050-1.rs
issue-91050-2.rs
missing_lifetime.rs
missing_lifetime.stderr
mutable_memory_validation.rs
mutable_memory_validation.stderr
nested_struct.rs
nested_thread_local.rs
nested_thread_local.stderr
nested-allocations-dont-inherit-codegen-attrs.rs
recursive_interior_mut.rs
static-fn-inline-xc.rs
static-fn-trait-xc.rs
static-function-pointer-xc.rs
static-function-pointer.rs
static-impl.rs
static-impl.stderr
static-method-in-trait-with-tps-intracrate.rs
static-method-xcrate.rs
static-methods-in-traits2.rs
static-methods-in-traits.rs
static-mut-xc.rs
static-mut-xc.stderr Use more accurate span for addr_of! suggestion 2024-07-18 18:39:20 +00:00
static-promotion.rs
static-recursive.rs
static-recursive.stderr Use more accurate span for addr_of! suggestion 2024-07-18 18:39:20 +00:00
uninhabited-static.rs
uninhabited-static.stderr
unsized_type2.rs
unsized_type2.stderr