<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_parse/src/lexer, branch 1.85.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.85.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.85.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-12-18T02:38:53+00:00</updated>
<entry>
<title>Re-export more `rustc_span::symbol` things from `rustc_span`.</title>
<updated>2024-12-18T02:38:53+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-12-12T23:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2620eb42d72d24baa1ca1056a769862b92c85f7f'/>
<id>urn:sha1:2620eb42d72d24baa1ca1056a769862b92c85f7f</id>
<content type='text'>
`rustc_span::symbol` defines some things that are re-exported from
`rustc_span`, such as `Symbol` and `sym`. But it doesn't re-export some
closely related things such as `Ident` and `kw`. So you can do `use
rustc_span::{Symbol, sym}` but you have to do `use
rustc_span::symbol::{Ident, kw}`, which is inconsistent for no good
reason.

This commit re-exports `Ident`, `kw`, and `MacroRulesNormalizedIdent`,
and changes many `rustc_span::symbol::` qualifiers in `compiler/` to
`rustc_span::`. This is a 200+ net line of code reduction, mostly
because many files with two `use rustc_span` items can be reduced to
one.
</content>
</entry>
<entry>
<title>Remove `Lexer`'s dependency on `Parser`.</title>
<updated>2024-12-12T20:10:20+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-12-12T00:49:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2e412fef75ff2f45186863a76fdd7c5a9ec1f018'/>
<id>urn:sha1:2e412fef75ff2f45186863a76fdd7c5a9ec1f018</id>
<content type='text'>
Lexing precedes parsing, as you'd expect: `Lexer` creates a
`TokenStream` and `Parser` then parses that `TokenStream`.

But, in a horrendous violation of layering abstractions and common
sense, `Lexer` depends on `Parser`! The `Lexer::unclosed_delim_err`
method does some error recovery that relies on creating a `Parser` to do
some post-processing of the `TokenStream` that the `Lexer` just created.

This commit just removes `unclosed_delim_err`. This change removes
`Lexer`'s dependency on `Parser`, and also means that `lex_token_tree`'s
return value can have a more typical form.

The cost is slightly worse error messages in two obscure cases, as shown
in these tests:
- tests/ui/parser/brace-in-let-chain.rs: there is slightly less
  explanation in this case involving an extra `{`.
- tests/ui/parser/diff-markers/unclosed-delims{,-in-macro}.rs: the diff
  marker detection is no longer supported (because that detection is
  implemented in the parser).

In my opinion this cost is outweighed by the magnitude of the code
cleanup.
</content>
</entry>
<entry>
<title>Remove `PErr`.</title>
<updated>2024-12-12T00:31:55+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-12-12T00:31:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=40c964510c3d6f6c05ceee305e128bd924baf1d6'/>
<id>urn:sha1:40c964510c3d6f6c05ceee305e128bd924baf1d6</id>
<content type='text'>
It's just a synonym for `Diag` that adds no value and is only used in a
few places.
</content>
</entry>
<entry>
<title>Fix typo in RFC mention 3598 -&gt; 3593</title>
<updated>2024-12-09T17:16:14+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-12-09T17:16:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5404cbb9960c9aa15d104a658a94879237e5a845'/>
<id>urn:sha1:5404cbb9960c9aa15d104a658a94879237e5a845</id>
<content type='text'>
https://github.com/rust-lang/rfcs/blob/master/text/3593-unprefixed-guarded-strings.md
</content>
</entry>
<entry>
<title>Only error raw lifetime followed by \' in edition 2021+</title>
<updated>2024-12-01T05:23:16+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2024-11-26T00:28:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d878fd8877669005ee05de0c5c60021109580934'/>
<id>urn:sha1:d878fd8877669005ee05de0c5c60021109580934</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #133487 - pitaj:reserve-guarded-strings, r=fee1-dead</title>
<updated>2024-11-28T11:06:04+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2024-11-28T11:06:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ca71c8fe5e12704bd2f58081375a9c9d27bd8399'/>
<id>urn:sha1:ca71c8fe5e12704bd2f58081375a9c9d27bd8399</id>
<content type='text'>
fix confusing diagnostic for reserved `##`

Closes #131615
</content>
</entry>
<entry>
<title>fix confusing diagnostic for reserved `##`</title>
<updated>2024-11-26T05:29:14+00:00</updated>
<author>
<name>Peter Jaszkowiak</name>
<email>p.jaszkow@gmail.com</email>
</author>
<published>2024-11-26T04:50:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=44f4f67f460a3b3c9bb34851d3d812fbdba81936'/>
<id>urn:sha1:44f4f67f460a3b3c9bb34851d3d812fbdba81936</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Streamline `lex_token_trees` error handling.</title>
<updated>2024-11-25T05:10:55+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-11-15T03:54:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=16a39bb7ca7d2af14069deef36291ca1c41b4bb0'/>
<id>urn:sha1:16a39bb7ca7d2af14069deef36291ca1c41b4bb0</id>
<content type='text'>
- Use iterators instead of `for` loops.
- Use `if`/`else` instead of `match`.
</content>
</entry>
<entry>
<title>Fix some formatting.</title>
<updated>2024-11-25T05:10:55+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-11-14T23:05:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ba1a1ddc3f8c8007061c6f915448b22880da61ca'/>
<id>urn:sha1:ba1a1ddc3f8c8007061c6f915448b22880da61ca</id>
<content type='text'>
Must be one of those cases where the function is too long and rustfmt
bails out.
</content>
</entry>
<entry>
<title>Split `Lexer::bump`.</title>
<updated>2024-11-25T05:10:55+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-11-14T23:01:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=593cf680aa6578d48998dac05532d76dfcad07ac'/>
<id>urn:sha1:593cf680aa6578d48998dac05532d76dfcad07ac</id>
<content type='text'>
It has two different ways of being called.
</content>
</entry>
</feed>
