Skip to content
New issue

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

Adopt let_else across the compiler #89933

Merged
merged 2 commits into from
Oct 19, 2021
Merged

Adopt let_else across the compiler #89933

merged 2 commits into from
Oct 19, 2021

Commits on Oct 16, 2021

  1. Adopt let_else across the compiler

    This performs a substitution of code following the pattern:
    
    let <id> = if let <pat> = ... { identity } else { ... : ! };
    
    To simplify it to:
    
    let <pat> = ... { identity } else { ... : ! };
    
    By adopting the let_else feature.
    est31 committed Oct 16, 2021
    Configuration menu
    Copy the full SHA
    1418df5 View commit details
    Browse the repository at this point in the history
  2. Update the syn crate and adopt let_else in three more places

    The syn crate has gained support for let_else syntax in version 1.0.76,
    see dtolnay/syn#1057 .
    
    In the three instances that use let_else, we've sent code through an
    attr macro, which would create compile errors when there was no
    let_else support in syn. To avoid this, we ran
    `cargo +nightly update -p syn` for updating the syn crate.
    est31 committed Oct 16, 2021
    Configuration menu
    Copy the full SHA
    ef018be View commit details
    Browse the repository at this point in the history