sunriseos / SunriseOS

Horizon/NX kernel reimplementation
Apache License 2.0
229 stars 13 forks source link

Bump syn from 0.15.40 to 1.0.31 #593

Closed dependabot-preview[bot] closed 4 years ago

dependabot-preview[bot] commented 4 years ago

Bumps syn from 0.15.40 to 1.0.31.

Release notes

Sourced from syn's releases.

1.0.31

  • Add Expr::parse_without_eager_brace to parse expressions in ambiguous syntactic position.

    Rust grammar has an ambiguity where braces sometimes turn a path expression into a struct initialization and sometimes do not. In the following code, the expression S {} is one expression. Presumably there is an empty struct struct S {} defined somewhere which it is instantiating.

    let _ = *S {};
    

    // parsed by rustc as: *(S {})

    We would want to parse the above using Expr::parse after the = token.

    But in the following, S {} is not a struct init expression.

    if *S {} {}
    

    // parsed by rustc as: // // if (S) { // / empty block / // } // { // / another empty block */ // }

    For that reason we would want to parse if-conditions using Expr::parse_without_eager_brace after the if token. Same for similar syntactic positions such as the condition expr after a while token or the expr at the top of a match.

    The Rust grammar's choices around which way this ambiguity is resolved at various syntactic positions is fairly arbitrary. Really either parse behavior could work in most positions, and language designers just decide each case based on which is more likely to be what the programmer had in mind most of the time.

    if return S {} {}
    

    // parsed by rustc as: // // if (return (S {})) { // } // // but could equally well have been this other arbitrary choice: // // if (return S) { // } // {}

    Note the grammar ambiguity on trailing braces is distinct from precedence and is not captured by assigning a precedence level to the braced struct init expr in relation to other operators. This can be illustrated by return 0..S {} vs match 0..S {}. The former parses as return (0..(S {})) implying tighter precedence for struct init than .., while the latter parses as match (0..S) {} implying tighter precedence for .. than struct init, a contradiction.

1.0.30

... (truncated)
Commits
  • ec205a8 Release 1.0.31
  • a3b67e4 Merge pull request #849 from dtolnay/eparse
  • a03ec12 Rewrite parse_without_eager_brace doc with better examples
  • e2a5120 Merge pull request #848 from udoprog/parse-without-eager-brace
  • 2a9200d Make expr_no_struct public as Expr::parse_without_eager_brace
  • cf76afd Update test suite to nightly-2020-06-01
  • 89658fc Release 1.0.30
  • dd68696 Merge pull request 843 from Aaron1011/feature/multiple-empty
  • 405f1bb Handle multiple nested None-delimited groups
  • 7a81558 Merge pull request #842 from dtolnay/group
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired)
dependabot-preview[bot] commented 4 years ago

Superseded by #594.