<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_lexer/src, branch 1.78.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.78.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.78.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-02-06T02:12:33+00:00</updated>
<entry>
<title>Invert diagnostic lints.</title>
<updated>2024-02-06T02:12:33+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-02-05T22:51:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0ac1195ee0f8cd6d87e654a2312b899883272ec2'/>
<id>urn:sha1:0ac1195ee0f8cd6d87e654a2312b899883272ec2</id>
<content type='text'>
That is, change `diagnostic_outside_of_impl` and
`untranslatable_diagnostic` from `allow` to `deny`, because more than
half of the compiler has be converted to use translated diagnostics.

This commit removes more `deny` attributes than it adds `allow`
attributes, which proves that this change is warranted.
</content>
</entry>
<entry>
<title>Use `unescape_unicode` for raw C string literals.</title>
<updated>2024-01-25T01:28:11+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-24T05:00:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6be2e5623cb7ae63ca1796759150c0cbc845bbcd'/>
<id>urn:sha1:6be2e5623cb7ae63ca1796759150c0cbc845bbcd</id>
<content type='text'>
They can't contain `\x` escapes, which means they can't contain high
bytes, which means we can used `unescape_unicode` instead of
`unescape_mixed` to unescape them. This avoids unnecessary used of
`MixedUnit`.
</content>
</entry>
<entry>
<title>Rename the unescaping functions.</title>
<updated>2024-01-25T01:28:11+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-24T04:24:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=86f371ed59e4172c9891bc9b976362a73689fb12'/>
<id>urn:sha1:86f371ed59e4172c9891bc9b976362a73689fb12</id>
<content type='text'>
`unescape_literal` becomes `unescape_unicode`, and `unescape_c_string`
becomes `unescape_mixed`. Because rfc3349 will mean that C string
literals will no longer be the only mixed utf8 literals.
</content>
</entry>
<entry>
<title>Rename and invert sense of `Mode` predicates.</title>
<updated>2024-01-25T01:28:11+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-23T03:25:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5e5aa6d556c273141a37c8cb542a022e3e9fae67'/>
<id>urn:sha1:5e5aa6d556c273141a37c8cb542a022e3e9fae67</id>
<content type='text'>
I find it easier if they describe what's allowed, rather than what's
forbidden. Also, consistent naming makes them easier to understand.
</content>
</entry>
<entry>
<title>Rework `CStrUnit`.</title>
<updated>2024-01-25T01:28:11+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-23T01:27:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a1c07214f0f7988cbc5a645a499bb8f7dd9cbed7'/>
<id>urn:sha1:a1c07214f0f7988cbc5a645a499bb8f7dd9cbed7</id>
<content type='text'>
- Rename it as `MixedUnit`, because it will soon be used in more than
  just C string literals.
- Change the `Byte` variant to `HighByte` and use it only for
  `\x80`..`\xff` cases. This fixes the old inexactness where ASCII chars
  could be encoded with either `Byte` or `Char`.
- Add useful comments.
- Remove `is_ascii`, in favour of `u8::is_ascii`.
</content>
</entry>
<entry>
<title>Use `from` instead of `into` in unescaping code.</title>
<updated>2024-01-25T01:26:36+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-01-22T23:37:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ef1e2228cfd9df4059aa44740b0659fea7c5a52f'/>
<id>urn:sha1:ef1e2228cfd9df4059aa44740b0659fea7c5a52f</id>
<content type='text'>
The `T` type in these functions took me some time to understand, and I
find the explicit `T` in the use of `from` makes the code easier to
read, as does the `u8` annotation in `scan_escape`.
</content>
</entry>
<entry>
<title>Rollup merge of #118639 - fmease:deny-features-in-stable-rustc-crates, r=WaffleLapkin</title>
<updated>2024-01-22T15:54:56+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-01-22T15:54:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a54c2956654b962bca686d65db396094aa822b49'/>
<id>urn:sha1:a54c2956654b962bca686d65db396094aa822b49</id>
<content type='text'>
Undeprecate lint `unstable_features` and make use of it in the compiler

See also #117937.

r? compiler
</content>
</entry>
<entry>
<title>Detect `NulInCStr` error earlier.</title>
<updated>2024-01-12T05:19:37+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-06T22:53:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9018d2c455df78d3f2900b4ced3ed63962e4f11e'/>
<id>urn:sha1:9018d2c455df78d3f2900b4ced3ed63962e4f11e</id>
<content type='text'>
By making it an `EscapeError` instead of a `LitError`. This makes it
like the other errors produced when checking string literals contents,
e.g. for invalid escape sequences or bare CR chars.

NOTE: this means these errors are issued earlier, before expansion,
which changes behaviour. It will be possible to move the check back to
the later point if desired. If that happens, it's likely that all the
string literal contents checks will be delayed together.

One nice thing about this: the old approach had some code in
`report_lit_error` to calculate the span of the nul char from a range.
This code used a hardwired `+2` to account for the `c"` at the start of
a C string literal, but this should have changed to a `+3` for raw C
string literals to account for the `cr"`, which meant that the caret in
`cr"` nul error messages was one short of where it should have been. The
new approach doesn't need any of this and avoids the off-by-one error.
</content>
</entry>
<entry>
<title>Undeprecate and use lint `unstable_features`</title>
<updated>2023-12-20T17:16:28+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2023-12-05T07:56:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c0a9f722c40b728eef492040332d4616c1393e4e'/>
<id>urn:sha1:c0a9f722c40b728eef492040332d4616c1393e4e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename some unescaping functions.</title>
<updated>2023-12-13T03:17:50+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2023-12-13T01:50:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b900eb73173f416dba5619ebfc10e6e0438a4753'/>
<id>urn:sha1:b900eb73173f416dba5619ebfc10e6e0438a4753</id>
<content type='text'>
`unescape_raw_str_or_raw_byte_str` only does checking, no unescaping.
And it also now handles C string literals.

`unescape_raw_str` is used for all the non-raw strings.
</content>
</entry>
</feed>
