<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/ui/conditional-compilation, 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-11-03T21:55:52+00:00</updated>
<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>
<entry>
<title>Further cleanup cfgs in the UI test suite</title>
<updated>2024-04-09T21:58:18+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2024-04-09T21:16:57+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0c3f5cce891d36d596a4ed2a8b8d1402d5287c31'/>
<id>urn:sha1:0c3f5cce891d36d596a4ed2a8b8d1402d5287c31</id>
<content type='text'>
This commit does three things:
 1. replaces (the last remaining) never true cfgs by the FALSE cfg
 2. fix derive-helper-configured.rs (typo in directive)
 3. and comment some current unused #[cfg_attr] (missing revisions)
</content>
</entry>
<entry>
<title>Unify all the always-false cfgs under the `FALSE` cfg</title>
<updated>2024-04-06T23:16:45+00:00</updated>
<author>
<name>Urgau</name>
<email>urgau@numericable.fr</email>
</author>
<published>2024-04-06T22:43:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c4a97d9407556081c5a8d8927ef86529b3bf4572'/>
<id>urn:sha1:c4a97d9407556081c5a8d8927ef86529b3bf4572</id>
<content type='text'>
</content>
</entry>
<entry>
<title>[AUTO-GENERATED] Migrate ui tests from `//` to `//@` directives</title>
<updated>2024-02-16T20:02:50+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>jieyouxu@outlook.com</email>
</author>
<published>2024-02-16T20:02:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=ec2cc761bc7067712ecc7734502f703fe3b024c8'/>
<id>urn:sha1:ec2cc761bc7067712ecc7734502f703fe3b024c8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Bless tests</title>
<updated>2024-01-13T17:46:58+00:00</updated>
<author>
<name>George-lewis</name>
<email>george-lewis@user.noreply.github.com</email>
</author>
<published>2024-01-10T06:39:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d56cdd48cba336c4c18e81792871ea39556af847'/>
<id>urn:sha1:d56cdd48cba336c4c18e81792871ea39556af847</id>
<content type='text'>
Update tests
</content>
</entry>
<entry>
<title>Show number in error message even for one error</title>
<updated>2023-11-24T18:15:52+00:00</updated>
<author>
<name>Nilstrieb</name>
<email>48135649+Nilstrieb@users.noreply.github.com</email>
</author>
<published>2023-11-21T15:44:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=41e8d152dc5abb5a706999ada8b059d3420af8f3'/>
<id>urn:sha1:41e8d152dc5abb5a706999ada8b059d3420af8f3</id>
<content type='text'>
Co-authored-by: Adrian &lt;adrian.iosdev@gmail.com&gt;
</content>
</entry>
</feed>
