Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #![allow(unreachable_code)]
- fn main() {
- println!("{:?}", {
- const fn test(a: bool) -> u32 { match a { True => 1, False => 2 } } test true
- });
- }
- /* ~~~~=== stderr ===~~~~
- Compiling playground v0.0.1 (/playground)
- error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `true`
- --> src/main.rs:6:82
- |
- 6 | const fn test(a: bool) -> u32 { match a { True => 1, False => 2 } } test true
- | ^^^^ expected one of 8 possible tokens here
- error: aborting due to previous error
- error: Could not compile `playground`.
- To learn more, run the command again with --verbose.
- */
- /* ~~~~=== stdout ===~~~~
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement