We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I can't match using a constant that was initialized using a byte string literal:
const ARRAY1: [u8; 0] = []; const ARRAY2: [u8; 0] = *b""; fn main() { match [] { ARRAY1 => {} ARRAY2 => {} } }
This gets an error:
a.rs:2:25: 2:29 error: constant evaluation error: unsupported constant expr a.rs:2 const ARRAY2: [u8; 0] = *b""; ^~~~ a.rs:7:9: 7:15 note: in pattern here a.rs:7 ARRAY2 => {} ^~~~~~ a.rs:2:25: 2:29 error: unsupported constant expr a.rs:2 const ARRAY2: [u8; 0] = *b""; ^~~~
The text was updated successfully, but these errors were encountered:
It seems this is a duplicate of #25574.
Sorry, something went wrong.
No branches or pull requests
I can't match using a constant that was initialized using a byte string literal:
This gets an error:
The text was updated successfully, but these errors were encountered: