-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 #121087
- Loading branch information
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() {} |