- Notifications
You must be signed in to change notification settings - Fork 13.9k
Open
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.
Description
I tried this code:
fn foo<T>() { const { panic!() } } // uncommenting this line makes it compile // #[inline] pub fn wut() { foo::<i32>(); }I expected #[inline] to not affect whether the code compiles or not. However, the code compiles with #[inline], and fails to compile without #[inline]. I'm not sure if this is a bug or not.
Discovered in #144363
@rustbot labels +A-const-eval
Meta
Reproducible on the playground with stable rust 1.88.0
Metadata
Metadata
Assignees
Labels
A-const-evalArea: Constant evaluation, covers all const contexts (static, const fn, ...)Area: Constant evaluation, covers all const contexts (static, const fn, ...)C-discussionCategory: Discussion or questions that doesn't represent real issues.Category: Discussion or questions that doesn't represent real issues.