diff options
| author | bors <bors@rust-lang.org> | 2024-03-26 10:52:11 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-26 10:52:11 +0000 |
| commit | 519d892f9523fe40cc11ec07323ffc2792614742 (patch) | |
| tree | 5e162acaeec9893a39319a107b43fc9407da5a4a /tests/ui/generic-const-items | |
| parent | b13a71a2e77f4625d1a2b8a5b9488414686ebca9 (diff) | |
| parent | 3ec5042cf944cfb242408e45166e7da79eaf0692 (diff) | |
| download | rust-519d892f9523fe40cc11ec07323ffc2792614742.tar.gz rust-519d892f9523fe40cc11ec07323ffc2792614742.zip | |
Auto merge of #121387 - oli-obk:eager_const_failures_regression, r=lcnr
Avoid some unnecessary query invocations. Specifically this inlines `const_eval_poly` and avoids computing the generic params, the param env, normalizing the param env and erasing lifetimes on everything. should fix the perf regression from https://github.com/rust-lang/rust/pull/121087
Diffstat (limited to 'tests/ui/generic-const-items')
| -rw-r--r-- | tests/ui/generic-const-items/hkl_where_bounds.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/ui/generic-const-items/hkl_where_bounds.rs b/tests/ui/generic-const-items/hkl_where_bounds.rs new file mode 100644 index 00000000000..cded518312a --- /dev/null +++ b/tests/ui/generic-const-items/hkl_where_bounds.rs @@ -0,0 +1,14 @@ +//! Test that nonsense bounds prevent consts from being evaluated at all. +//@ check-pass + +#![feature(generic_const_items)] +#![allow(incomplete_features)] +trait Trait { + const ASSOC: u32; +} + +// rustfmt eats the where bound +#[rustfmt::skip] +const ASSOC: u32 = <&'static ()>::ASSOC where for<'a> &'a (): Trait; + +fn main() {} |
