rust/tests/crashes
Matthias Krüger 4115f51d15
Rollup merge of #137180 - compiler-errors:sym-regions, r=oli-obk
Give `global_asm` a fake body to store typeck results, represent `sym fn` as a hir expr to fix `sym fn` operands with lifetimes

There are a few intertwined problems with `sym fn` operands in both inline and global asm macros.

Specifically, unlike other anon consts, they may evaluate to a type with free regions in them without actually having an item-level type annotation to give them a "proper" type. This is in contrast to named constants, which always have an item-level type annotation, or unnamed constants which are constrained by their position (e.g. a const arg in a turbofish, or a const array length).

Today, we infer the type of the operand by looking at the HIR typeck results; however, those results are region-erased, so during borrowck we ICE since we don't expect to encounter erased regions. We can't just fill this type with something like `'static`, since we may want to use real (free) regions:

```rust
fn foo<'a>() {
  asm!("/* ... */", sym bar::<&'a ()>);
}
```

The first idea may be to represent `sym fn` operands using *inline* consts instead of anon consts. This makes sense, since inline consts can reference regions from the parent body (like the `'a` in the example above). However, this introduces a problem with `global_asm!`, which doesn't *have* a parent body; inline consts *must* be associated with a parent body since they are not a body owner of their own. In #116087, I attempted to fix this by using two separate `sym` operands for global and inline asm. However, this led to a lot of confusion and also some unattractive code duplication.

In this PR, I adjust the lowering of `global_asm!` so that it's lowered in a "fake" HIR body. This body contains a single expression which is `ExprKind::InlineAsm`; we don't *use* this HIR body, but it's used in typeck and borrowck so that we can properly infer and validate the the lifetimes of `sym fn` operands.

I then adjust the lowering of `sym fn` to instead be represented with a HIR expression. This is both because it's no longer necessary to represent this operand as an anon const, since it's *just* a path expression, and also more importantly to sidestep yet another ICE (https://github.com/rust-lang/rust/issues/137179), which has to do with the existing code breaking an invariant of def-id creation and anon consts. Specifically, we are not allowed to synthesize a def-id for an anon const when that anon const contains expressions with def-ids whose parent is *not* that anon const. This is somewhat related to https://github.com/rust-lang/rust/pull/130443#issuecomment-2445678945, which is also a place in the compiler where synthesizing anon consts leads to def-id parenting issue.

As a side-effect, this consolidates the type checking for inline and global asm, so it allows us to simplify `InlineAsmCtxt` a bit. It also allows us to delete a bit of hacky code from anon const `type_of` which was there to detect `sym fn` operands specifically. This also could be generalized to support `const` asm operands with types with lifetimes in them. Since we specifically reject these consts today, I'm not going to change the representation of those consts (but they'd just be turned into inline consts).

r? oli-obk -- mostly b/c you're patient and also understand the breadth of the code that this touches, please reassign if you don't want to review this.

Fixes #111709
Fixes #96304
Fixes #137179
2025-02-23 00:16:19 +01:00
..
auxiliary crashes: more tests 2024-12-12 22:09:39 +01:00
34127.rs Fix tests that rely on LLVM IR verification 2024-11-29 19:11:34 +01:00
54888.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
74451.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
79409.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
87577.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
88296.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
92004.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
92470.rs crashes: add more tests 2024-04-26 17:20:16 +02:00
93182.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
93237.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
94846.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
95134.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
98322.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
100041.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
100618.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
101036.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
101557.rs crashes: fix ice detection which did not trigger if code compiled without error by accident 2024-04-14 11:21:58 +02:00
102047.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
102252.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
103708.rs add more known-crashes tests 2024-04-19 23:09:37 +02:00
104685.rs add more known-crashes tests 2024-04-19 23:09:37 +02:00
105238-1.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
105238-2.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
105275.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
105937.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
106473.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
107362.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
108428.rs add two old crash tests 2025-01-25 23:40:35 +01:00
108499.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
108814.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
110378.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
110534.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
110627.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
111419.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
111742.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
112201.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
113379.rs add .rs crashes from https://github.com/rust-lang/glacier 2024-04-14 11:18:23 +02:00
113846.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
114198-2.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
114198.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
114212-2.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
114212.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
114663.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
114920.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
115435.rs crashes: fix ice detection which did not trigger if code compiled without error by accident 2024-04-14 11:21:58 +02:00
115994.rs add more known-crashes tests 2024-04-19 23:09:37 +02:00
116519-2.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
116519.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
116554.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
116947.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
116979.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
117392-2.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117392.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117460.rs add crashtests for several old unfixed ICEs 2024-08-30 12:50:07 +02:00
117496.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117629.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117696-1.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117696-2.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117795.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
117808.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
117877.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
118038.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
118244.rs add more known-crashes tests 2024-04-19 23:09:37 +02:00
118590.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
118603.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
118778.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
118784.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
118952-2.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
118952.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
119095.rs add crashtests for several old unfixed ICEs 2024-08-30 12:50:07 +02:00
119692.rs crashes: fix ice detection which did not trigger if code compiled without error by accident 2024-04-14 11:21:58 +02:00
119694.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
119729.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
119783.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
119786.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
119824.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
120016.rs more crash tests 2024-09-18 00:10:25 +02:00
120033.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
120175.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
120254.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
120811.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
120873.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
120911.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
121097.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
121176.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
121363.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
121429.rs Move Const::{from_anon_const,try_from_lit} to hir_ty_lowering 2024-12-02 19:34:47 +00:00
121538.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
121575.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
121623.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
121858.rs Partially implement ConstArgHasType 2024-05-29 17:06:54 +01:00
121963.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122259.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
122529.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122630.rs crashes: add a couple more tests 2024-04-18 18:55:20 +02:00
122681.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122704.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122710.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122823.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122903-1.rs Adjust crash bug to still reproduce. 2024-05-31 11:04:32 +00:00
122904-2.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
122904.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
123140.rs tests/crashes: add ICEs from matthiaskrgr/glacier2 2024-04-14 11:21:51 +02:00
123157.rs crashes: fix ice detection which did not trigger if code compiled without error by accident 2024-04-14 11:21:58 +02:00
123456.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
123629.rs add a few more crashtests 2024-09-01 22:28:23 +02:00
123690.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
123810.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
123862.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
123887.rs crashes: increment the number of tracked ones 2024-05-27 17:32:56 +02:00
123959.rs crashes: add even more tests?!? 2024-04-18 06:13:47 +02:00
124189.rs crashes: add a couple more ICE tests 2024-04-21 21:04:32 +02:00
124340.rs crashes: add more tests 2024-04-26 17:20:16 +02:00
124352.rs crashes: add more tests 2024-04-26 17:20:16 +02:00
124440.rs crashes: add lastest batch of crash tests 2024-05-05 23:41:08 +02:00
124751.rs Stabilize the 2024 edition 2024-11-22 11:12:15 -08:00
125014.rs crashes: increment the number of tracked ones 2024-05-27 17:32:56 +02:00
125059.rs crashes: increment the number of tracked ones 2024-05-27 17:32:56 +02:00
125185.rs crashes: add more 2024-05-18 23:56:57 +02:00
125323.rs crashes: increment the number of tracked ones 2024-05-27 17:32:56 +02:00
125553.rs remove fixed crashes, add fixed crashes to tests, add new cashed found in the meantime 2024-05-27 20:41:09 +02:00
125680.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
125768.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
125769.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
125772.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
125801.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
125841.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
125879.rs tests: add more crashes 2024-06-09 10:16:12 +02:00
126268.rs add and update some crashtests 2024-11-02 23:44:12 +01:00
126269.rs more ice tests 2024-06-16 20:38:08 +02:00
126443.rs add crashtests for several old unfixed ICEs 2024-08-30 12:50:07 +02:00
126667.rs crashes: add more tests 2024-06-29 09:33:28 +02:00
126680.rs crashes: add more tests 2024-06-29 09:33:28 +02:00
126696.rs crashes: add more tests 2024-06-29 09:33:28 +02:00
126982.rs crashes: add latest 2024-07-04 23:44:10 +02:00
127033.rs add a few more crashtests 2024-09-01 22:28:23 +02:00
127643.rs add more tests 2024-07-21 17:50:57 +02:00
127916.rs add more tests 2024-07-21 17:50:57 +02:00
127972.rs Retroactively feature gate ConstArgKind::Path 2024-08-19 01:14:22 +01:00
128094.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
128119.rs more crash tests 2024-09-18 00:10:25 +02:00
128190.rs tests: more crashes 2024-08-04 21:25:49 +02:00
128695.rs crashes: more tests 2024-08-15 22:44:16 +02:00
129095.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
129109.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
129209.rs crashes: more tests 2024-08-19 00:38:28 +02:00
129372.rs add a few more crashtests 2024-09-01 22:28:23 +02:00
129425.rs couple more crash tests 2024-08-30 12:38:22 +02:00
129556.rs couple more crash tests 2024-08-30 12:38:22 +02:00
130104.rs tests: more ice tests 2024-09-15 21:18:41 +02:00
130310.rs Revert "Add recursion limit to FFI safety lint" 2024-09-23 12:43:44 -04:00
130346.rs tests: more ice tests 2024-09-15 21:18:41 +02:00
130395.rs add some debug-assertion crash tests 2024-12-08 14:17:25 +01:00
130411.rs more crash tests 2024-09-18 00:10:25 +02:00
130524.rs crashes: more tests 2024-09-29 11:58:09 +02:00
130627.rs crashes: more tests 2024-09-29 11:58:09 +02:00
130797.rs crashes: more tests 2024-12-15 17:27:52 +01:00
130970.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
131046.rs add more crash tests 2024-10-09 15:34:45 +02:00
131048.rs add more crash tests 2024-10-09 15:34:45 +02:00
131052.rs add more crash tests 2024-10-09 15:34:45 +02:00
131292.rs add more crash tests 2024-10-09 15:34:45 +02:00
131295.rs add more crash tests 2024-10-09 15:34:45 +02:00
131298.rs add more crash tests 2024-10-09 15:34:45 +02:00
131342.rs Emit warning when calling/declaring functions with unavailable vectors. 2024-11-01 22:24:35 +01:00
131347.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
131373.rs add more crash tests 2024-10-09 15:34:45 +02:00
131406.rs add more crash tests 2024-10-09 15:34:45 +02:00
131451.rs crashes: add test for #131451 2024-12-08 13:09:46 +01:00
131507.rs crash tests: use individual mir opts instead of mir-opt-level where easily possible 2024-12-08 16:52:32 +01:00
131534.rs add latest crash tests 2024-10-12 11:29:38 +02:00
131758.rs add latest crash tests 2024-10-20 10:05:39 +02:00
131762.rs add latest crash tests 2024-10-20 10:05:39 +02:00
131787.rs add latest crash tests 2024-10-20 10:05:39 +02:00
131886.rs remove feature(trait_upcasting) from tests and bless them 2025-02-06 23:44:23 +01:00
132103.rs crashes: more tests 2024-12-15 17:27:52 +01:00
132126.rs add and update some crashtests 2024-11-02 23:44:12 +01:00
132142.rs more crash tests 2024-11-06 22:10:23 +01:00
132335.rs more crash tests 2024-11-06 22:10:23 +01:00
132430.rs more crash tests 2024-11-06 22:10:23 +01:00
132765.rs crashes: more tests 2024-12-12 22:09:39 +01:00
132826.rs add two old crash tests 2025-01-25 23:40:35 +01:00
132882.rs crashes: more tests 2024-12-12 22:09:39 +01:00
132960.rs crashes: more tests 2024-12-15 17:27:52 +01:00
132981.rs Enable more tests on Windows 2025-02-03 10:39:32 -05:00
132985.rs Introduce min_generic_const_args and directly represent paths 2024-11-19 05:07:43 +00:00
133066.rs crashes: more tests 2024-12-12 22:09:39 +01:00
133199.rs crashes: more tests 2024-12-12 22:09:39 +01:00
133275-1.rs crashes: more tests 2024-12-12 22:09:39 +01:00
133275-2.rs crashes: more tests 2024-12-12 22:09:39 +01:00
133426.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
133597.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
133613.rs crashes: more tests 2024-12-15 17:27:52 +01:00
133808.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
133868.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
133965.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
133966.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
134061.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
134174.rs crashes: more tests 2024-12-15 17:27:52 +01:00
134217.rs crashes: more tests v2 2024-12-12 22:55:31 +01:00
134334.rs crashes: more tests 2024-12-15 17:27:52 +01:00
134335.rs crashes: more tests 2024-12-15 17:27:52 +01:00
134479.rs crashes: add latest batch of tests 2025-01-04 14:38:06 +01:00
134587.rs crashes: add latest batch of tests 2025-01-04 14:38:06 +01:00
134615.rs crashes: add latest batch of tests 2025-01-04 14:38:06 +01:00
134641.rs crashes: add latest batch of tests 2025-01-04 14:38:06 +01:00
134654.rs crashes: add latest batch of tests 2025-01-04 14:38:06 +01:00
134838.rs crashes: add latest batch of tests 2025-01-04 14:38:06 +01:00
135122.rs add more crash tests 2025-01-12 10:11:29 +01:00
135128.rs add more crash tests 2025-01-12 10:11:29 +01:00
135470.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135528.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135570.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135617.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135646.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135668.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135718.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135720.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135845.rs crashes: more tests 2025-02-09 10:40:18 +01:00
135863.rs crashes: more tests 2025-02-09 10:40:18 +01:00
136063.rs crashes: more tests 2025-02-09 10:40:18 +01:00
const_mut_ref_check_bypass.rs turn errors that should be impossible due to our static checks into ICEs 2024-09-10 10:27:30 +02:00
project-to-simd-array-field.rs Rework OperandRef::extract_field to stop calling to_immediate_scalar on things which are already immediates 2025-02-19 12:03:40 -08:00
README.md add note not to re-report crashes from crashes tests 2024-11-06 18:07:47 +01:00

This is serves as a collection of crashes so that accidental ICE fixes are tracked. This was formally done at https://github.com/rust-lang/glacier but doing it inside the rustc testsuite is more convenient.

It is imperative that a test in the suite causes an internal compiler error/panic or makes rustc crash in some other way. A test will "pass" if rustc exits with something other than 1 or 0.

When adding crashes from https://github.com/rust-lang/rust/issues, the issue number should be noted in the file name (12345.rs should suffice) and also inside the file via //@ known-bug #4321 if possible.

If you happen to fix one of the crashes, please move it to a fitting subdirectory in tests/ui and give it a meaningful name. Also please add a doc comment at the top of the file explaining why this test exists. :) Adding Fixes #NNNNN Fixes #MMMMM to the description of your pull request will ensure the corresponding tickets will be closed automatically upon merge. The ticket ids can be found in the file name or the known-bug annotation inside the testfile.

Please do not re-report any crashes that you find here!