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
This will allow for using const values in pattern matching when that lands, as in the following:
#[braid] struct MyData; const TEST_VAL: &MyDataRef = MyDataRef::from_str("test"); match some_data_ref { TEST_VAL => println!("test!"), _ => println!("not a test…"), }
The text was updated successfully, but these errors were encountered:
Still working toward this. Even with const values, the compiler doesn't like this custom type as the pattern to assert on:
cannot use unsized non-slice type `Type` in constant patterns
See rust-lang/rust#87046
Sorry, something went wrong.
This is closed via #13, but the compiler still prevents this as mentioned above.
No branches or pull requests
This will allow for using const values in pattern matching when that lands, as in the following:
The text was updated successfully, but these errors were encountered: