granite-rust/tests
Guillaume Gomez 81aca633bb
Rollup merge of #129408 - Urgau:macro-arg-drop_copy, r=compiler-errors
Fix handling of macro arguments within the `dropping_copy_types` lint

This PR fixes the handling of spans with different context (aka macro arguments) than the primary expression within the different `{drop,forget}ing_copy_types` and `{drop,forget}ing_references` lints.

<details>
<summary>Before</summary>

```
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
 --> drop_writeln.rs:5:5
  |
5 |     drop(writeln!(&mut msg, "test"));
  |     ^^^^^--------------------------^
  |          |
  |          argument has type `Result<(), std::fmt::Error>`
  |
  = note: `#[warn(dropping_copy_types)]` on by default
help: use `let _ = ...` to ignore the expression or result
 --> /home/[..]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/macros/mod.rs:688:9
  |
68|         let _ =
  |         ~~~~~~~
```

</details>

<details>
<summary>With this PR</summary>

```
warning: calls to `std::mem::drop` with a value that implements `Copy` does nothing
 --> drop_writeln.rs:5:5
  |
5 |     drop(writeln!(&mut msg, "test"));
  |     ^^^^^--------------------------^
  |          |
  |          argument has type `Result<(), std::fmt::Error>`
  |
  = note: `#[warn(dropping_copy_types)]` on by default
help: use `let _ = ...` to ignore the expression or result
  |
5 -     drop(writeln!(&mut msg, "test"));
5 +     let _ = writeln!(&mut msg, "test");
  |
```

</details>

``````@rustbot`````` label +L-dropping_copy_types
2024-08-23 12:32:16 +02:00
..
assembly llvm 20: adapt integer comparison tests 2024-08-22 13:23:00 +00:00
auxiliary
codegen Rollup merge of #129350 - krasimirgg:llvm20, r=nikic 2024-08-23 12:32:16 +02:00
codegen-units Fix and enable disabled codegen-units tests 2024-08-10 14:03:27 -04:00
coverage Finish blessing coverage/mcdc tests after LLVM 19 upgrade 2024-08-01 13:36:50 +10:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes crashes: more tests 2024-08-19 00:38:28 +02:00
debuginfo Rollup merge of #128627 - khuey:DUMMY_SP-line-no, r=nnethercote 2024-08-21 18:15:01 +02:00
incremental Rollup merge of #127279 - bvanjoi:fix-112680, r=petrochenkov 2024-08-21 19:35:10 +02:00
mir-opt Auto merge of #122551 - RayMuir:copy_fmt, r=saethlin 2024-08-19 23:10:46 +00:00
pretty stabilize raw_ref_op 2024-08-18 19:46:53 +02:00
run-make Auto merge of #129257 - ChrisDenton:rename-null-descriptor, r=jieyouxu 2024-08-22 15:53:02 +00:00
run-pass-valgrind
rustdoc Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
rustdoc-gui rustdoc: animate the :target highlight 2024-08-19 18:14:35 -07:00
rustdoc-js Add test for Self not being a generic in search index 2024-08-04 12:49:28 -07:00
rustdoc-js-std Update tests 2024-06-07 11:55:52 +08:00
rustdoc-json Stabilize opaque type precise capturing 2024-08-17 12:33:29 -04:00
rustdoc-ui Adjust expected errors for a rustdoc test 2024-08-18 22:52:54 -05:00
ui Rollup merge of #129408 - Urgau:macro-arg-drop_copy, r=compiler-errors 2024-08-23 12:32:16 +02:00
ui-fulldeps untranslatable_diagnostic lint: point at the untranslated thing 2024-08-10 20:36:33 +03:00
COMPILER_TESTS.md