rust/tests/ui/codegen
bors d97326eabf Auto merge of #136264 - GuillaumeGomez:optimize-integers-to-string, r=Amanieu
Optimize `ToString` implementation for integers

Part of https://github.com/rust-lang/rust/issues/135543.

Follow-up of https://github.com/rust-lang/rust/pull/133247 and https://github.com/rust-lang/rust/pull/128204.

The benchmark results are:

| name| 1.87.0-nightly (3ea711f17 2025-03-09) | With this PR | diff |
|-|-|-|-|
| bench_i16 | 32.06 ns/iter (+/- 0.12) | 17.62 ns/iter (+/- 0.03) | -45% |
| bench_i32 | 31.61 ns/iter (+/- 0.04) | 15.10 ns/iter (+/- 0.06) | -52% |
| bench_i64 | 31.71 ns/iter (+/- 0.07) | 15.02 ns/iter (+/- 0.20) | -52% |
| bench_i8 | 13.21 ns/iter (+/- 0.14) | 14.93 ns/iter (+/- 0.16) | +13% |
| bench_u16 | 31.20 ns/iter (+/- 0.06) | 16.14 ns/iter (+/- 0.11) | -48% |
| bench_u32 | 33.27 ns/iter (+/- 0.05) | 16.18 ns/iter (+/- 0.10) | -51% |
| bench_u64 | 31.44 ns/iter (+/- 0.06) | 16.62 ns/iter (+/- 0.21) | -47% |
| bench_u8 | 10.57 ns/iter (+/- 0.30) | 13.00 ns/iter (+/- 0.43) | +22% |

More information about it in [the original comment](https://github.com/rust-lang/rust/pull/136264#discussion_r1987542954).

r? `@workingjubilee`
2025-05-15 20:20:30 +00:00
..
auxiliary Move /src/test to /tests 2023-01-11 09:32:08 +00:00
equal-pointers-unequal Auto merge of #136264 - GuillaumeGomez:optimize-integers-to-string, r=Amanieu 2025-05-15 20:20:30 +00:00
StackColoring-not-blowup-stack-issue-40883.rs Rename and Move some UI tests to more suitable subdirs 2025-02-04 17:02:37 +05:30
alias-uninit-value.rs Adjust `alias-uninit-value.rs` 2024-12-10 11:20:19 +08:00
assign-expr-unit-type.rs Move `assign-assign.rs` to `tests/ui/codegen/assign-expr-unit-type.rs` 2024-12-08 15:32:04 +08:00
cfguard-run.rs Move tests from /ui directory 2025-04-29 18:19:26 +02:00
const-bool-bitcast.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
duplicated-path-in-error.rs compiletest: Support matching on diagnostics without a span 2025-03-25 17:33:09 +03:00
duplicated-path-in-error.stderr Add regression ui test for duplicated path in dylib error 2024-03-04 16:19:17 +01:00
empty-static-libs-issue-108825.rs UI tests: migrate remaining compile time `error-pattern`s to line annotations 2025-04-13 21:48:53 +03:00
freeze-on-polymorphic-projection.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
freeze-on-polymorphic-projection.stderr Check freeze with right param-env 2023-04-16 23:09:57 +00:00
init-large-type.rs tests: remove `//@ pretty-expanded` usages 2024-11-26 02:50:48 +08:00
issue-16602-1.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-16602-2.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-16602-3.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-27859.rs Update test directives for `wasm32-wasip1` 2024-03-11 09:36:35 -07:00
issue-28950.rs compiletest: Add a `//@ needs-threads` directive 2024-03-06 12:35:07 -08:00
issue-55976.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-63787.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-64401.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-79865-llvm-miscompile.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-82833-slice-miscompile.rs Deprecate no-op codegen option `-Cinline-threshold=...` 2024-06-14 20:25:17 +02:00
issue-82859-slice-miscompile.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-88043-bb-does-not-have-terminator.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-97708.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
issue-99551.rs remove `feature(trait_upcasting)` from tests and bless them 2025-02-06 23:44:23 +01:00
issue-101585-128bit-repeat.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
llvm-pr32379.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
mismatched-data-layout.json ensure JSON-defined targets are consistent 2024-11-27 10:13:36 +01:00
mismatched-data-layouts.rs compiletest: Require `//~` annotations even if `error-pattern` is specified 2025-04-03 11:08:55 +03:00
mismatched-data-layouts.stderr ensure JSON-defined targets are consistent 2024-11-27 10:13:36 +01:00
mono-impossible-2.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
mono-impossible-drop.rs Fix ProvenVia for global where clauses 2025-04-05 16:23:25 +00:00
mono-impossible.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
no-mangle-on-internal-lang-items.rs error when using no_mangle on language items 2025-04-30 14:54:10 +03:00
no-mangle-on-internal-lang-items.stderr error when using no_mangle on language items 2025-04-30 14:54:10 +03:00
no-mangle-on-panic-handler.rs error when using no_mangle on language items 2025-04-30 14:54:10 +03:00
no-mangle-on-panic-handler.stderr error when using no_mangle on language items 2025-04-30 14:54:10 +03:00
overflow-during-mono.rs re-use sized fast path 2025-04-09 10:42:26 +00:00
overflow-during-mono.stderr re-use sized fast path 2025-04-09 10:42:26 +00:00
ref-dyn-trait-in-structs-and-enums.rs Cleaned up 4 tests in `tests/ui/issues` 2025-04-19 01:10:26 -06:00
sub-principals-in-codegen.rs Relax a debug assertion in codegen 2024-09-30 12:18:02 -04:00
subtyping-enforces-type-equality.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
subtyping-impacts-selection-1.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
subtyping-impacts-selection-2.rs [AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives 2024-02-16 20:02:50 +00:00
target-cpus.rs Remove the `-test` suffix from normalize directives 2024-12-27 19:58:16 +11:00
target-cpus.stdout Add ui test of LLVM print-from-C++ changes 2023-07-20 11:04:31 -07:00
virtual-function-elimination.rs fix ices on vfe about principal trait 2024-09-23 15:25:52 +08:00