This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit bff7b51
move fast reject test out of
`match_impl` has two call sites. For one of them (within `rematch_impl`)
the fast reject test isn't necessary, because any rejection would
represent a compiler bug.
This commit moves the fast reject test to the other `match_impl` call
site, in `assemble_candidates_from_impls`. This lets us move the fast
reject test outside the `probe` call in that function. This avoids the
taking of useless snapshots when the fast reject test succeeds, which
gives a performance win when compiling the `bitmaps` and `nalgebra`
crates.
Co-authored-by: name <[email protected]>SelectionContext::match_impl.1 parent a76277c commit bff7b51
File tree
2 files changed
+12
-11
lines changed- compiler/rustc_trait_selection/src/traits/select
2 files changed
+12
-11
lines changedLines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
542 | 550 | | |
543 | | - | |
| 551 | + | |
544 | 552 | | |
545 | 553 | | |
546 | 554 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2043 | 2043 | | |
2044 | 2044 | | |
2045 | 2045 | | |
2046 | | - | |
| 2046 | + | |
| 2047 | + | |
2047 | 2048 | | |
2048 | 2049 | | |
2049 | 2050 | | |
| |||
2070 | 2071 | | |
2071 | 2072 | | |
2072 | 2073 | | |
| 2074 | + | |
2073 | 2075 | | |
2074 | 2076 | | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
2083 | | - | |
2084 | 2077 | | |
2085 | 2078 | | |
2086 | 2079 | | |
| |||
0 commit comments