<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/conditional-compilation, branch 1.87.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.87.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.87.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-03-26T12:30:12+00:00</updated>
<entry>
<title>expand: Leave traces when expanding `cfg` attributes</title>
<updated>2025-03-26T12:30:12+00:00</updated>
<author>
<name>Vadim Petrochenkov</name>
<email>vadim.petrochenkov@gmail.com</email>
</author>
<published>2025-03-22T18:42:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=92d802eda669d69481b99139523008df1c456ba8'/>
<id>urn:sha1:92d802eda669d69481b99139523008df1c456ba8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove `NtMeta`.</title>
<updated>2025-02-27T21:42:06+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-04-18T06:22:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7ea59e053bed52249ba8f42cbdbc7301312197e3'/>
<id>urn:sha1:7ea59e053bed52249ba8f42cbdbc7301312197e3</id>
<content type='text'>
Note: there was an existing code path involving `Interpolated` in
`MetaItem::from_tokens` that was dead. This commit transfers that to the
new form, but puts an `unreachable!` call inside it.
</content>
</entry>
<entry>
<title>More sophisticated span trimming</title>
<updated>2025-02-21T00:41:17+00:00</updated>
<author>
<name>Michael Goulet</name>
<email>michael@errs.io</email>
</author>
<published>2025-02-20T23:05:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0a7ab1d6df4a2cfac819b0bada85b9142ac8ba26'/>
<id>urn:sha1:0a7ab1d6df4a2cfac819b0bada85b9142ac8ba26</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Show diff suggestion format on verbose replacement</title>
<updated>2025-02-10T20:21:39+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-07-09T22:30:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d'/>
<id>urn:sha1:f0845adb0c1b7a7fa1bef73e749b2d7e1d7f374d</id>
<content type='text'>
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
  --&gt; $DIR/attempted-access-non-fatal.rs:7:15
   |
LL |     let _ = 2.l;
   |               ^
   |
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
   |
LL -     let _ = 2.l;
LL +     let _ = 2.0f64;
   |
```
</content>
</entry>
<entry>
<title>Update tests.</title>
<updated>2025-01-07T15:04:14+00:00</updated>
<author>
<name>Mara Bos</name>
<email>m-ou.se@m-ou.se</email>
</author>
<published>2024-10-31T10:39:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=585c9765a203df7cc7b497d848aae4ba979fcb39'/>
<id>urn:sha1:585c9765a203df7cc7b497d848aae4ba979fcb39</id>
<content type='text'>
</content>
</entry>
<entry>
<title>use backticks instead of single quotes when reporting "use of unstable library feature"</title>
<updated>2024-11-03T21:55:52+00:00</updated>
<author>
<name>dianne</name>
<email>diannes.gm@gmail.com</email>
</author>
<published>2024-11-02T23:10:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d7d6238b235fe65caedefd346c2a7107eb0a2656'/>
<id>urn:sha1:d7d6238b235fe65caedefd346c2a7107eb0a2656</id>
<content type='text'>
This is consistent with all other diagnostics I could find containing
features and enables the use of `DiagSymbolList` for generalizing
diagnostics for unstable library features to multiple features.
</content>
</entry>
<entry>
<title>Return earlier in some cases in `collect_token`.</title>
<updated>2024-08-23T04:40:08+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>n.nethercote@gmail.com</email>
</author>
<published>2024-08-20T07:47:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1ae521e9d57ba3a67b1007204da2836d8b19b4a2'/>
<id>urn:sha1:1ae521e9d57ba3a67b1007204da2836d8b19b4a2</id>
<content type='text'>
This example triggers an assertion failure:
```
fn f() -&gt; u32 {
    #[cfg_eval] #[cfg(not(FALSE))] 0
}
```
The sequence of events:
- `configure_annotatable` calls `parse_expr_force_collect`, which calls
  `collect_tokens`.
- Within that, we end up in `parse_expr_dot_or_call`, which again calls
  `collect_tokens`.
  - The return value of the `f` call is the expression `0`.
  - This inner call collects tokens for `0` (parser range 10..11) and
    creates a replacement covering `#[cfg(not(FALSE))] 0` (parser range
    0..11).
- We return to the outer `collect_tokens` call. The return value of the
  `f` call is *again* the expression `0`, again with the range 10..11,
  but the replacement from earlier covers the range 0..11. The code
  mistakenly assumes that any attributes from an inner `collect_tokens`
  call fit entirely within the body of the result of an outer
  `collect_tokens` call. So it adjusts the replacement parser range
  0..11 to a node range by subtracting 10, resulting in -10..1. This is
  an invalid range and triggers an assertion failure.

It's tricky to follow, but basically things get complicated when an AST
node is returned from an inner `collect_tokens` call and then returned
again from an outer `collect_token` node without being wrapped in any
kind of additional layer.

This commit changes `collect_tokens` to return early in some extra cases,
avoiding the construction of lazy tokens. In the example above, the
outer `collect_tokens` returns earlier because the `0` token already has
tokens and `self.capture_state.capturing` is `Capturing::No`. This early
return avoids the creation of the invalid range and the assertion
failure.

Fixes #129166. Note: these invalid ranges have been happening for a long
time. #128725 looks like it's at fault only because it introduced the
assertion that catches the invalid ranges.
</content>
</entry>
<entry>
<title>Make parse error suggestions verbose and fix spans</title>
<updated>2024-07-12T03:02:57+00:00</updated>
<author>
<name>Esteban Küber</name>
<email>esteban@kuber.com.ar</email>
</author>
<published>2024-07-06T03:07:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=692bc344d55cf9d86c60b06c92a70684d013c89f'/>
<id>urn:sha1:692bc344d55cf9d86c60b06c92a70684d013c89f</id>
<content type='text'>
Go over all structured parser suggestions and make them verbose style.

When suggesting to add or remove delimiters, turn them into multiple suggestion parts.
</content>
</entry>
<entry>
<title>Fix parse error message for meta items</title>
<updated>2024-05-10T07:16:27+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2024-05-05T23:25:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0ad3c5da72469c848e321ddee207f9a5dfbf9876'/>
<id>urn:sha1:0ad3c5da72469c848e321ddee207f9a5dfbf9876</id>
<content type='text'>
</content>
</entry>
<entry>
<title>compiletest: add enable-by-default check-cfg</title>
<updated>2024-05-04T09:30:38+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2024-04-06T22:33:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d4e26fbb5301b465a037c4d2ff54024ebd7f73d8'/>
<id>urn:sha1:d4e26fbb5301b465a037c4d2ff54024ebd7f73d8</id>
<content type='text'>
</content>
</entry>
</feed>
