rust/tests
bors 11663cd3bf Auto merge of #134486 - compiler-errors:drop-for-lint, r=nikomatsakis
Make sure we handle `backwards_incompatible_lint` drops appropriately in drop elaboration

In #131326, a new kind of scheduled drop (`drop_kind: DropKind::Value` + `backwards_incompatible_lint: true`) was added so that we could insert a new kind of no-op MIR statement (`backward incompatible drop`) for linting purposes.

These drops were intended to have *no side-effects*, but drop elaboration code forgot to handle these drops specially and they were handled otherwise as normal drops in most of the code. This ends up being **unsound** since we insert more than one drop call for some values, which means that `Drop::drop` could be called more than once.

This PR fixes this by splitting out the `DropKind::ForLint` and adjusting the code. I'm not totally certain if all of the places I've adjusted are either reachable or correct, but I'm pretty certain that it's *more* correct than it was previously.

cc `@dingxiangfei2009`
r? nikomatsakis

Fixes #134482
2024-12-19 15:58:08 +00:00
..
assembly tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-18 02:59:07 +09:00
auxiliary tests/assembly/asm: Remove uses of rustc_attrs and lang_items features by using minicore 2024-12-18 02:59:07 +09:00
codegen Use field init shorthand where possible 2024-12-17 14:33:10 -08:00
codegen-units Use field init shorthand where possible 2024-12-17 14:33:10 -08:00
coverage Rollup merge of #134323 - Zalathar:dismantle-map-data, r=jieyouxu 2024-12-17 22:34:42 +01:00
coverage-run-rustdoc
crashes Auto merge of #133961 - lcnr:borrowck-cleanup, r=jackh726 2024-12-19 08:33:20 +00:00
debuginfo Reformat Python code with ruff 2024-12-04 23:03:44 +01:00
incremental Add more info on type/trait mismatches for different crate versions 2024-12-07 18:18:08 +00:00
mir-opt Auto merge of #134486 - compiler-errors:drop-for-lint, r=nikomatsakis 2024-12-19 15:58:08 +00:00
pretty
run-make Use field init shorthand where possible 2024-12-17 14:33:10 -08:00
rustdoc Rollup merge of #134432 - GuillaumeGomez:intra-doc-in-footnotes, r=notriddle 2024-12-19 16:48:09 +08:00
rustdoc-gui Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
rustdoc-js Rollup merge of #134277 - notriddle:notriddle/inline-into, r=GuillaumeGomez 2024-12-16 20:00:20 +01:00
rustdoc-js-std rustdoc-search: update test with now-shorter function path 2024-12-13 09:08:44 -07:00
rustdoc-json Remove rustc::existing_doc_keyword lint. 2024-12-17 13:56:10 +11:00
rustdoc-ui Rollup merge of #134481 - estebank:unstable-lint-span, r=compiler-errors 2024-12-18 21:38:11 -05:00
ui Auto merge of #134499 - jieyouxu:rollup-zmaveur, r=jieyouxu 2024-12-19 11:25:43 +00:00
ui-fulldeps Fix tests 2024-12-14 14:53:59 +00:00
COMPILER_TESTS.md