This repository was archived by the owner on May 28, 2025. It is now read-only.
Commit 144227d
committed
Auto merge of rust-lang#99232 - lcnr:no-bound-vars-check, r=jackh726
`replace_bound_vars` fast path: check predicates, don't check consts
split out from rust-lang#98900
`ty::Const` doesn't have precomputed type flags, so
computing `has_vars_bound_at_or_above` for constants
requires us to visit the const and its contained types
and constants. A noop fold should be pretty much equally as
fast so removing it prevents us from walking the constant twice
in case it contains bound vars.
r? `@jackh726`File tree
2 files changed
+10
-4
lines changed- compiler
- rustc_middle/src/ty
- rustc_trait_selection/src/traits
2 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
445 | 445 | | |
446 | 446 | | |
447 | 447 | | |
448 | | - | |
449 | | - | |
| 448 | + | |
450 | 449 | | |
451 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
452 | 455 | | |
453 | 456 | | |
454 | 457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
756 | | - | |
757 | | - | |
| 756 | + | |
758 | 757 | | |
759 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
760 | 763 | | |
761 | 764 | | |
762 | 765 | | |
| |||
0 commit comments