rust/compiler/rustc_codegen_ssa/src/mir
Matthias Krüger 6404d29442
Rollup merge of #143088 - firefighterduck:improve-doc-discr-tag, r=RalfJung
Improve documentation of `TagEncoding`

This PR is follow-up from the [discussion here](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/.E2.9C.94.20VariantId.3DDiscriminant.20when.20tag.20is.20niche.20encoded.3F/with/524384295).

It aims at making the `TagEncoding` documentation less ambiguous and more detailed with references to relevant implementation sides. It especially clears up the ambiguous use of discriminant/variant index, which sparked the discussion referenced above.

PS: While working with layout data, I somehow ended up looking at the docs for `FakeBorrowKind` and noticed that the one example was not in a doc comment. I hope that this is minor enough of a fix for it to be okay in this otherwise unrelated PR.
2025-06-29 06:59:30 +02:00
..
analyze.rs Don't alloca just to look at a discriminant 2025-03-12 00:56:43 -07:00
block.rs Auto merge of #141759 - 1c3t3a:discriminants-query, r=saethlin 2025-06-28 10:25:00 +00:00
constant.rs Stop relying on rustc_type_ir in non-type-system crates 2025-03-15 06:42:48 +00:00
coverageinfo.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
debuginfo.rs apply clippy::or_fun_call 2025-06-17 13:59:53 +03:00
intrinsic.rs intrinsics: rename min_align_of to align_of 2025-06-12 17:50:25 +02:00
locals.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
mod.rs Fix RISC-V C function ABI when passing/returning structs containing floats 2025-06-16 10:14:07 +01:00
naked_asm.rs centralize -Zmin-function-alignment logic 2025-06-22 00:47:10 +02:00
operand.rs move discr=varid check to layout_sanity_check 2025-06-28 14:47:27 +02:00
place.rs Change tag_field to FieldIdx in Variants::Multiple 2025-06-03 23:42:21 -07:00
rvalue.rs Avoid a bitcast FFI call in transmuting 2025-06-19 21:44:01 -07:00
statement.rs reduce false positives of tail-expr-drop-order from consumed values 2024-11-20 20:53:11 +08:00