| Age | Commit message (Collapse) | Author | Lines |
|
in non-codegen tests. Remove false positive in a test that relied on the exact formatting of an error string and rewrite the sysv64 register allocation test at it was triggering undefined behaviour
|
|
|
|
Rollup of 16 pull requests
- Successful merges: #35418, #35759, #35862, #35863, #35895, #35962, #35977, #35993, #35997, #36054, #36056, #36060, #36086, #36100, #36103, #36125
- Failed merges: #35771, #35810
|
|
Update Error format for E0164, E0165, E0184
Part of #35233
r? @jonathandturner
|
|
Update E0089 to new error format
Fixes #35227.
Part of #35233.
r? @jonathandturner
|
|
Update E0260 to new error format
Updates #35515.
Part of #35233.
r? @jonathandturner
|
|
Update E0463 error message to new format
Fixes #35934 as part of #35233
r? @jonathandturner
|
|
Update E0194 to new error format
Fixes #35280 to update E0194 to support new error message format. Part of #35233.
A separate Github issue #36057 tracks the bonus portion of the original ticket.
r? @jonathandturner
|
|
update error E0451 to new format
Fixes #35928 as part of #35233.
r? @jonathandturner
|
|
Batch up libsyntax breaking changes
Batch of the following syntax-[breaking-change] changes:
- #35591: Add a field `span: Span` to `ast::Generics`.
- #35618: Remove variant `Mod` of `ast::PathListItemKind` and refactor the remaining variant `ast::PathListKind::Ident` to a struct `ast::PathListKind_`.
- #35480: Change uses of `Constness` in the AST to `Spanned<Constness>`.
- c.f. `MethodSig`, `ItemKind`
- #35728: Refactor `cx.pat_enum()` into `cx.pat_tuple_struct()` and `cx.pat_path()`.
- #35850: Generalize the elements of lists in attributes from `MetaItem` to a new type `NestedMetaItem` that can represent a `MetaItem` or a literal.
- #35917: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`.
- Besides removing imports of these traits, this won't cause fallout.
- Add a variant `Union` to `ItemKind` to future proof for `union` (c.f. #36016).
- Remove inherent methods `attrs` and `fold_attrs` of `Annotatable`.
- Use methods `attrs` and `map_attrs` of `HasAttrs` instead.
r? @Manishearth
|
|
|
|
- Fixes #35275
- Part of #35233
r? @jonathandturner
|
|
- Fixes #35270
- Part of #35233
r? @jonathandturner
|
|
- Fixes #35269
- Part of #35233
r? @jonathandturner
|
|
|
|
|
|
|
|
|
|
Updates #35515.
Part of #35233.
r? @jonathandturner
|
|
|
|
- Fixes #35932
- Part of #35233
r? @jonathandturner
|
|
- Fixes #35933
- Part of #35233
r? @jonathandturner
|
|
Closes #24204
|
|
Closes #28324
|
|
|
|
Add tests for #20433, #26251, #28625, #33687
Closes #20433
Closes #26251
Closes #28625
Closes #33687
|
|
Implement RFC#1559: allow all literals in attributes
Implemented rust-lang/rfcs#1559, tracked by #34981.
|
|
Move E0379 check from typeck to ast validation
Part of #35233.
Extension of #35338, #35364.
Fixes #35404.
|
|
Add Span field for Generics structs
|
|
|
|
Closes #20433
Closes #26251
Closes #28625
Closes #33687
|
|
update error E0450 to new format
Fixes #35925 as part of #35233.
I've solve the bonus, and I wonder if any simpler way to do this. But may be possible simplify if let expressions?
r? @jonathandturner
|
|
Err codes
r? @jonathandturner
|
|
Update E0453 to new error format
Fixes #35929.
Part of #35233.
r? @jonathandturner
|
|
Update E0277 to new error format
Fixes #35311.
Part of #35233.
r? @jonathandturner
|
|
Update E0389 to the new format. #35630
|
|
|
|
#35233.
|
|
Fix ICE when arg types can't be found in impl/trait methods while comparing
Fixes #35869.
|
|
Stabilize type-macros
Closes #27245
r? @nikomatsakis
|
|
Combine types and regions in Substs into one interleaved list.
Previously, `Substs` would contain types and regions, in two separate vectors, for example:
```rust
<X as Trait<'a, 'b, A, B>>::method::<'p, 'q, T, U>
/* corresponds to */
Substs { regions: ['a, 'b, 'p, 'q], types: [X, A, B, T, U] }
```
This PR continues the work started in #35605 by further removing the distinction.
A new abstraction over types and regions is introduced in the compiler, `Kind`.
Each `Kind` is a pointer (`&TyS` or `&Region`), with the lowest two bits used as a tag.
Two bits were used instead of just one (type = `0`, region = `1`) to allow adding more kinds.
`Substs` contain only a `Vec<Kind>`, with `Self` first, followed by regions and types (in the definition order):
```rust
Substs { params: [X, 'a, 'b, A, B, 'p, 'q, T, U] }
```
The resulting interleaved list has the property of being the concatenation of parameters for the (potentially) nested generic items it describes, and can be sliced back into those components:
```rust
params[0..5] = [X, 'a, 'b, A, B] // <X as Trait<'a, 'b, A, B>>
params[5..9] = ['p, 'q, T, U] // <_>::method::<'p, 'q, T, U>
```
r? @nikomatsakis
|
|
Improve error message when failing to parse a block
We want to catch this error:
```
if (foo)
bar;
```
as it's valid syntax in other languages, and say how to fix it.
Unfortunately it didn't care if the suggestion made sense and just
highlighted the unexpected token.
Now it attempts to parse a statement, and if it succeeds, it shows the
help message.
Fixes #35907
|
|
Fix ICE when arg types can't be found in impl/trait methods while comparing
Fixes #35869.
|
|
|
|
|
|
Closes #27245
|
|
Fixes #35929.
Part of #35233.
r? @jonathandturner
|
|
|
|
Fixes #35311.
Part of #35233.
r? @jonathandturner
|
|
Rollup of 4 pull requests
- Successful merges: #35876, #35920, #35948, #35961
- Failed merges: #35395
|