rust/tests/ui/drop
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 tail expression behind terminating scope 2024-06-18 04:14:43 +08:00
drop_elaboration_with_errors.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop_elaboration_with_errors.stderr Bail out of drop elaboration when encountering error types 2024-02-08 17:51:32 +00:00
drop_order.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-foreign-fundamental.rs
drop-foreign-fundamental.stderr Show number in error message even for one error 2023-11-24 19:15:52 +01:00
drop-if-let-binding.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-on-empty-block-exit.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-on-ret.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-struct-as-object.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-struct-as-object.stderr Update tests 2024-02-07 10:42:01 +08:00
drop-trait-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-trait-generic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-trait.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-uninhabited-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-with-type-ascription-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
drop-with-type-ascription-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dropck_legal_cycles.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dropck-eyepatch-extern-crate.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dropck-eyepatch-manuallydrop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dropck-eyepatch-reorder.rs Allow newly added non_local_definitions lint in tests 2024-02-17 13:59:45 +01:00
dropck-eyepatch.rs Allow newly added non_local_definitions lint in tests 2024-02-17 13:59:45 +01:00
dynamic-drop-async.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
dynamic-drop.rs Error on using yield without also using #[coroutine] on the closure 2024-04-24 08:05:29 +00:00
issue-979.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-2734.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-2735-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-2735-3.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-2735.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-10028.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-17718-const-destructors.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-21486.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-23338-ensure-param-drop-order.rs Improve wording of static_mut_ref 2024-02-18 06:01:40 +03:00
issue-23338-ensure-param-drop-order.stderr Use more accurate span for addr_of! suggestion 2024-07-18 18:39:20 +00:00
issue-23611-enum-swap-in-drop.rs Move tests 2024-03-03 16:30:48 -03:00
issue-23611-enum-swap-in-drop.stderr Use more accurate span for addr_of! suggestion 2024-07-18 18:39:20 +00:00
issue-30018-nopanic.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-35546.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-48962.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90752-raw-ptr-shenanigans.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-90752.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-100276.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-103107.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-110682.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
missing-drop-method.rs Convert bugs back to delayed_bugs. 2024-02-21 10:35:54 +11:00
missing-drop-method.stderr Convert bugs back to delayed_bugs. 2024-02-21 10:35:54 +11:00
no-drop-flag-size.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
nondrop-cycle.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
norm-ice-106444.rs add test for ICE #106444 2024-03-23 12:38:50 +01:00
recursion-check-on-erroneous-impl.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
recursion-check-on-erroneous-impl.stderr Avoid ICE in drop recursion check in case of invalid drop impls 2024-02-08 17:33:04 +00:00
repeat-drop-2.rs
repeat-drop-2.stderr Handle more cases of value suggestions 2024-04-10 20:36:14 +00:00
repeat-drop.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
tail-expr-drop-order-negative.edition2024.stderr tail expression behind terminating scope 2024-06-18 04:14:43 +08:00
tail-expr-drop-order-negative.rs tail expression behind terminating scope 2024-06-18 04:14:43 +08:00
tail-expr-drop-order.rs tail expression behind terminating scope 2024-06-18 04:14:43 +08:00
terminate-in-initializer.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
use_inline_dtor.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00