rust/tests
Matthias Krüger cfc5f25b3d
Rollup merge of #127054 - compiler-errors:bound-ordering, r=fmease
Reorder trait bound modifiers *after* `for<...>` binder in trait bounds

This PR suggests changing the grammar of trait bounds from:

```
[CONSTNESS] [ASYNCNESS] [?] [BINDER] [TRAIT_PATH]

const async ? for<'a> Sized
```

to

```
([BINDER] [CONSTNESS] [ASYNCNESS] | [?]) [TRAIT_PATH]
```

i.e., either

```
? Sized
```

or

```
for<'a> const async Sized
```

(but not both)

### Why?

I think it's strange that the binder applies "more tightly" than the `?` trait polarity. This becomes even weirder when considering that we (or at least, I) want to have `async` trait bounds expressed like:

```
where T: for<'a> async Fn(&'a ()) -> i32,
```

and not:

```
where T: async for<'a> Fn(&'a ()) -> i32,
```

### Fallout

No crates on crater use this syntax, presumably because it's literally useless. This will require modifying the reference grammar, though.

### Alternatives

If this is not desirable, then we can alternatively keep parsing `for<'a>` after the `?` but deprecate it with either an FCW (or an immediate hard error), and begin parsing `for<'a>` *before* the `?`.
2024-07-25 04:43:18 +02:00
..
assembly Add NuttX based targets for RISC-V and ARM 2024-07-19 22:00:42 +08:00
auxiliary
codegen Auto merge of #127715 - klensy:tests-w, r=Mark-Simulacrum 2024-07-21 03:06:32 +00:00
codegen-units Avoid MIR bloat in inlining 2024-07-01 05:17:13 -07:00
coverage Bless coverage. 2024-07-13 12:02:12 +00:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes Don't use global caches if opaques can be defined 2024-07-24 10:45:21 +00:00
debuginfo Add Natvis visualiser and debuginfo tests for f16 2024-07-09 03:47:50 +01:00
incremental Auto merge of #126409 - pacak:incr-uplorry, r=michaelwoerister 2024-06-20 09:06:16 +00:00
mir-opt Auto merge of #127722 - BoxyUwU:new_adt_const_params_limitations, r=compiler-errors 2024-07-21 05:36:21 +00:00
pretty Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
run-make Rollup merge of #127990 - Oneirical:ii-the-high-priestest, r=jieyouxu 2024-07-23 19:42:36 +02:00
run-pass-valgrind
rustdoc Auto merge of #120812 - compiler-errors:impl-sorting, r=lcnr 2024-07-21 22:43:47 +00:00
rustdoc-gui Add regression test for items list size (#128023) 2024-07-22 11:33:03 +02:00
rustdoc-js
rustdoc-js-std
rustdoc-json Update all rustdoc-json/ tests to use the new style 2024-07-19 16:54:42 +02:00
rustdoc-ui Revert suggestion verbosity change 2024-07-22 22:51:53 +00:00
ui Rollup merge of #127054 - compiler-errors:bound-ordering, r=fmease 2024-07-25 04:43:18 +02:00
ui-fulldeps Always pass the visitor as the first argument to walk* functions 2024-07-22 14:01:24 +00:00
COMPILER_TESTS.md