~anteater/mms-stack-bugs#72: 
Received "or-patterns syntax is experimental" building on rustc 1.52.1

I'm building on postmarketOS 21.06 from the alpine packaged rust and I get the following error while compiling vgmms:

Compiling vgmms v0.1.0 (/home/user/src/vgmms) error[E0658]: or-patterns syntax is experimental --> src/chat_log.rs:131:9 | 131 | Some(MessageArea::Whitespace | MessageArea::Time() | MessageArea::Sender | MessageArea::Separator()) => return None, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #54883 https://github.com/rust-lang/rust/issues/54883 for more information

error: aborting due to previous error

For more information about this error, try rustc --explain E0658. error: could not compile vgmms

I went into the chat_log.rs file and split that line into four, like this, which fixed it for me. Some(MessageArea::Whitespace) => return None, Some(MessageArea::Time()) => return None, Some(MessageArea::Sender) => return None,
Some(MessageArea::Separator(
)) => return None,

Not sure if you want to persist this change in your codebase but just letting you know it's an issue for people without experimental.

Status
RESOLVED FIXED
Submitter
~adamplumb
Assigned to
No-one
Submitted
3 years ago
Updated
3 years ago
Labels
No labels applied.

~anteater 3 years ago

Thanks for the report! I'll change this to the more backwards-compatible syntax. Occasionally new rustc features are critical, but this one doesn't seem like it's worth the increase in minimum supported rustc version.

~tslocum 3 years ago

Please see this patch for an updated fix for this issue.

~anteater REPORTED FIXED 3 years ago

Patch applied as 851947f0.

Register here or Log in to comment, or comment via email.