aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/utils.rs
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-06-10 20:51:05 -0400
committerGitHub <noreply@github.com>2020-06-10 20:51:05 -0400
commit35fe0fb56f06217eb13dc92a15fc9e1c6d6127eb (patch)
treed6e1e0c4ce7bae4191776105bf1fffa3a366f468 /components/script/dom/bindings/utils.rs
parentc1f5515a92c61726e689cca52e8fff1c4976a7f9 (diff)
parent3ff416e0657f8e2473dfed992ecebcaf877a162b (diff)
downloadservo-35fe0fb56f06217eb13dc92a15fc9e1c6d6127eb.tar.gz
servo-35fe0fb56f06217eb13dc92a15fc9e1c6d6127eb.zip
Auto merge of #26843 - servo:dependabot/cargo/syn-1.0.31, r=jdm
build(deps): bump syn from 1.0.27 to 1.0.31 Bumps [syn](https://github.com/dtolnay/syn) from 1.0.27 to 1.0.31. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dtolnay/syn/releases">syn's releases</a>.</em></p> <blockquote> <h2>1.0.31</h2> <ul> <li> <p>Add <a href="https://docs.rs/syn/1.0.31/syn/enum.Expr.html#method.parse_without_eager_brace"><code>Expr::parse_without_eager_brace</code></a> to parse expressions in ambiguous syntactic position.</p> <p>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 <code>S {}</code> is one expression. Presumably there is an empty struct <code>struct S {}</code> defined somewhere which it is instantiating.</p> <pre lang="rust"><code>let _ = *S {}; <p>// parsed by rustc as: <code>*(S {})</code> </code></pre></p> <p>We would want to parse the above using <code>Expr::parse</code> after the <code>=</code> token.</p> <p>But in the following, <code>S {}</code> is <em>not</em> a struct init expression.</p> <pre lang="rust"><code>if *S {} {} <p>// parsed by rustc as: // // if (<em>S) { // /</em> empty block <em>/ // } // { // /</em> another empty block */ // } </code></pre></p> <p>For that reason we would want to parse if-conditions using <code>Expr::parse_without_eager_brace</code> after the <code>if</code> token. Same for similar syntactic positions such as the condition expr after a <code>while</code> token or the expr at the top of a <code>match</code>.</p> <p>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.</p> <pre lang="rust"><code>if return S {} {} <p>// parsed by rustc as: // // if (return (S {})) { // } // // but could equally well have been this other arbitrary choice: // // if (return S) { // } // {} </code></pre></p> <p>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 <code>return 0..S {}</code> vs <code>match 0..S {}</code>. The former parses as <code>return (0..(S {}))</code> implying tighter precedence for struct init than <code>..</code>, while the latter parses as <code>match (0..S) {}</code> implying tighter precedence for <code>..</code> than struct init, a contradiction.</p> </li> </ul> <h2>1.0.30</h2> </tr></table> ... (truncated) </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dtolnay/syn/commit/ec205a83fd1a343e93e061d00078b9b88ed32acb"><code>ec205a8</code></a> Release 1.0.31</li> <li><a href="https://github.com/dtolnay/syn/commit/a3b67e42129eefa0c596a84172cf40018cc5c6d8"><code>a3b67e4</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/849">#849</a> from dtolnay/eparse</li> <li><a href="https://github.com/dtolnay/syn/commit/a03ec1212225331b848660b27ac7edbce4e48392"><code>a03ec12</code></a> Rewrite parse_without_eager_brace doc with better examples</li> <li><a href="https://github.com/dtolnay/syn/commit/e2a5120572c690bee7354e9cc91260740145c6a9"><code>e2a5120</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/848">#848</a> from udoprog/parse-without-eager-brace</li> <li><a href="https://github.com/dtolnay/syn/commit/2a9200dfaf7261ea1af1c97a3f5e18bff02b7831"><code>2a9200d</code></a> Make expr_no_struct public as Expr::parse_without_eager_brace</li> <li><a href="https://github.com/dtolnay/syn/commit/cf76afd1141877692d1ebe651d24cc8e28dbf5db"><code>cf76afd</code></a> Update test suite to nightly-2020-06-01</li> <li><a href="https://github.com/dtolnay/syn/commit/89658fc242ee17041a4e2dd74b455f8d89d5de31"><code>89658fc</code></a> Release 1.0.30</li> <li><a href="https://github.com/dtolnay/syn/commit/dd68696574a7ba96f70b0d475f653a2b723037ce"><code>dd68696</code></a> Merge pull request 843 from Aaron1011/feature/multiple-empty</li> <li><a href="https://github.com/dtolnay/syn/commit/405f1bb90c1443ecb6e98e2005370a91c8df2268"><code>405f1bb</code></a> Handle multiple nested <code>None</code>-delimited groups</li> <li><a href="https://github.com/dtolnay/syn/commit/7a81558977eddd61515c6a8c368246ee6655ebf4"><code>7a81558</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/dtolnay/syn/issues/842">#842</a> from dtolnay/group</li> <li>Additional commits viewable in <a href="https://github.com/dtolnay/syn/compare/1.0.27...1.0.31">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=syn&package-manager=cargo&previous-version=1.0.27&new-version=1.0.31)](https://dependabot.com/compatibility-score/?dependency-name=syn&package-manager=cargo&previous-version=1.0.27&new-version=1.0.31) 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-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> 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) </details>
Diffstat (limited to 'components/script/dom/bindings/utils.rs')
0 files changed, 0 insertions, 0 deletions