Skip to content

Conversation

alexcrichton
Copy link
Member

No description provided.

@bors bors closed this Nov 27, 2013
@alexcrichton alexcrichton deleted the no-routine branch November 28, 2013 04:52
flip1995 pushed a commit to flip1995/rust that referenced this pull request May 5, 2023
use `is_inside_const_context` for `in_constant` util fn

Fixes rust-lang#10452.

This PR improves the `in_constant` util function to detect more cases of const contexts. Previously this function would not detect cases like expressions in array length position or expression in an inline const block `const { .. }`.

changelog: [`bool_to_int_with_if`]: recognize array length operand as being in a const context and don't suggest `usize::from` there
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants