<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/parser/nonterminal.rs, branch 1.56.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.56.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.56.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2021-08-25T18:24:35+00:00</updated>
<entry>
<title>Use if-let guards in the codebase</title>
<updated>2021-08-25T18:24:35+00:00</updated>
<author>
<name>Léo Lanteri Thauvin</name>
<email>leseulartichaut@gmail.com</email>
</author>
<published>2021-08-16T15:29:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fde1b76b4b1d0d84f5691f4785906b31bb91f38d'/>
<id>urn:sha1:fde1b76b4b1d0d84f5691f4785906b31bb91f38d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Suggest a path separator if a stray colon is found in a match arm</title>
<updated>2021-07-13T23:15:59+00:00</updated>
<author>
<name>Fabian Wolff</name>
<email>fabian.wolff@alumni.ethz.ch</email>
</author>
<published>2021-07-13T11:18:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=23624504250058c36f42fe3eb76300da962e393b'/>
<id>urn:sha1:23624504250058c36f42fe3eb76300da962e393b</id>
<content type='text'>
Co-authored-by: Esteban Kuber &lt;estebank@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>parser: Ensure that all nonterminals have tokens after parsing</title>
<updated>2021-06-06T11:21:12+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2021-05-06T13:21:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cbdfa1edcaab0dc86b5f9696dea790403bcb0f19'/>
<id>urn:sha1:cbdfa1edcaab0dc86b5f9696dea790403bcb0f19</id>
<content type='text'>
</content>
</entry>
<entry>
<title>remove pat2021</title>
<updated>2021-04-28T02:15:59+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2021-04-28T02:15:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2a9db919ffb30ca09a015877b6ab2ffab5633249'/>
<id>urn:sha1:2a9db919ffb30ca09a015877b6ab2ffab5633249</id>
<content type='text'>
</content>
</entry>
<entry>
<title>rename pat2015 to pat_param</title>
<updated>2021-04-15T18:52:09+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2021-04-15T01:34:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0566ccc72fc49e0a30fedebca754c8cc10bb1a73'/>
<id>urn:sha1:0566ccc72fc49e0a30fedebca754c8cc10bb1a73</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Implement token-based handling of attributes during expansion</title>
<updated>2021-04-11T05:31:36+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2020-11-28T23:33:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a93c4f05de5c5cdd8158e23de7c3cf86a548447f'/>
<id>urn:sha1:a93c4f05de5c5cdd8158e23de7c3cf86a548447f</id>
<content type='text'>
This PR modifies the macro expansion infrastructure to handle attributes
in a fully token-based manner. As a result:

* Derives macros no longer lose spans when their input is modified
  by eager cfg-expansion. This is accomplished by performing eager
  cfg-expansion on the token stream that we pass to the derive
  proc-macro
* Inner attributes now preserve spans in all cases, including when we
  have multiple inner attributes in a row.

This is accomplished through the following changes:

* New structs `AttrAnnotatedTokenStream` and `AttrAnnotatedTokenTree` are introduced.
  These are very similar to a normal `TokenTree`, but they also track
  the position of attributes and attribute targets within the stream.
  They are built when we collect tokens during parsing.
  An `AttrAnnotatedTokenStream` is converted to a regular `TokenStream` when
  we invoke a macro.
* Token capturing and `LazyTokenStream` are modified to work with
  `AttrAnnotatedTokenStream`. A new `ReplaceRange` type is introduced, which
  is created during the parsing of a nested AST node to make the 'outer'
  AST node aware of the attributes and attribute target stored deeper in the token stream.
* When we need to perform eager cfg-expansion (either due to `#[derive]` or `#[cfg_eval]`),
we tokenize and reparse our target, capturing additional information about the locations of
`#[cfg]` and `#[cfg_attr]` attributes at any depth within the target.
This is a performance optimization, allowing us to perform less work
in the typical case where captured tokens never have eager cfg-expansion run.
</content>
</entry>
<entry>
<title>Avoid double-collection for expression nonterminals</title>
<updated>2021-03-25T22:05:49+00:00</updated>
<author>
<name>Aaron Hill</name>
<email>aa1ronham@gmail.com</email>
</author>
<published>2021-03-25T22:05:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7504b9bb96236a340c41c95f95cf3c4a09341afc'/>
<id>urn:sha1:7504b9bb96236a340c41c95f95cf3c4a09341afc</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #83384 - mark-i-m:rename-pat2018, r=joshtriplett</title>
<updated>2021-03-23T01:15:43+00:00</updated>
<author>
<name>Yuki Okushi</name>
<email>huyuumi.dev@gmail.com</email>
</author>
<published>2021-03-23T01:15:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=50d048f1426a9b88031bb0c25e9c1ea4edacbfc7'/>
<id>urn:sha1:50d048f1426a9b88031bb0c25e9c1ea4edacbfc7</id>
<content type='text'>
rename :pat2018 -&gt; :pat2015

as requested by T-lang on zulip: https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/or.20patterns/near/231133873

No functional changes here... just renaming.

r? `@nikomatsakis`
</content>
</entry>
<entry>
<title>rename :pat2018 -&gt; :pat215</title>
<updated>2021-03-22T17:40:23+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2021-03-22T17:40:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8c4b3dbb50621b661aa63ad1791eed2d52564dcb'/>
<id>urn:sha1:8c4b3dbb50621b661aa63ad1791eed2d52564dcb</id>
<content type='text'>
</content>
</entry>
<entry>
<title>stabilize or_patterns</title>
<updated>2021-03-20T00:45:32+00:00</updated>
<author>
<name>mark</name>
<email>markm@cs.wisc.edu</email>
</author>
<published>2020-11-21T21:12:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=db5629adcba565a674732e829ce6c4a214160835'/>
<id>urn:sha1:db5629adcba565a674732e829ce6c4a214160835</id>
<content type='text'>
</content>
</entry>
</feed>
