rust/tests
Josh Triplett a5a60d75a8 Add size_of, size_of_val, align_of, and align_of_val to the prelude
Many, many projects use `size_of` to get the size of a type. However,
it's also often equally easy to hardcode a size (e.g. `8` instead of
`size_of::<u64>()`). Minimizing friction in the use of `size_of` helps
ensure that people use it and make code more self-documenting.

The name `size_of` is unambiguous: the name alone, without any prefix or
path, is self-explanatory and unmistakeable for any other functionality.
Adding it to the prelude cannot produce any name conflicts, as any local
definition will silently shadow the one from the prelude. Thus, we don't
need to wait for a new edition prelude to add it.

Add `size_of_val`, `align_of`, and `align_of_val` as well, with similar
justification: widely useful, self-explanatory, unmistakeable for
anything else, won't produce conflicts.
2024-05-13 15:11:28 +02:00
..
assembly Add inline comments why we're forcing the target cpu 2024-05-01 16:54:20 -07:00
auxiliary Clean up users of rust_dbg_call 2024-04-17 15:08:08 -04:00
codegen Unify Rvalue::Aggregate paths in cg_ssa 2024-05-11 21:22:51 -07:00
codegen-units Fix some minor issues from the ui-test auto-porting 2024-05-11 19:58:35 -04:00
coverage Auto merge of #124223 - Zalathar:conditional-let, r=compiler-errors 2024-05-07 22:28:51 +00:00
coverage-run-rustdoc
crashes Propagate errors rather than using return_if_err 2024-05-12 12:50:18 -04:00
debuginfo Implement lldb formattter for "clang encoded" enums (LLDB 18.1+) 2024-05-05 17:53:02 -07:00
incremental add test for incremental ICE: slice-pattern-const.rs #83085 2024-04-21 14:45:00 +02:00
mir-opt Auto merge of #124795 - scottmcm:simplify-slice-from-raw-parts, r=joboet 2024-05-08 19:37:57 +00:00
pretty Rollup merge of #124269 - scrabsha:sasha/fix-124206, r=dtolnay 2024-04-29 18:03:22 +01:00
run-make Rollup merge of #125022 - GuillaumeGomez:migrate-rustdoc-scrape-examples-ordering, r=jieyouxu 2024-05-12 13:41:57 +02:00
run-make-fulldeps
run-pass-valgrind
rustdoc Always hide private fields in aliased type 2024-05-11 13:11:46 +02:00
rustdoc-gui Rollup merge of #124738 - notriddle:notriddle/search-form-js, r=GuillaumeGomez 2024-05-07 18:12:54 +02:00
rustdoc-js rustdoc-search: add parser for & syntax 2024-04-19 14:31:21 -07:00
rustdoc-js-std rustdoc-search: add parser for & syntax 2024-04-19 14:31:21 -07:00
rustdoc-json
rustdoc-ui Always hide private fields in aliased type 2024-05-11 13:11:46 +02:00
ui Add size_of, size_of_val, align_of, and align_of_val to the prelude 2024-05-13 15:11:28 +02:00
ui-fulldeps Add ErrorGuaranteed to Recovered::Yes and use it more. 2024-05-09 20:12:07 +10:00
COMPILER_TESTS.md