| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
Context: this is needed to fix https://github.com/rust-lang/rustfmt/issues/4263,
which currently records the span of a const generic param incorrectly
because the location of the `const` kw is not known.
I am not sure how to add tests for this; any guidance in how to do so
would be appreciated :slightly_smiling_face:
|
|
Previously, we would parse `struct Foo where;` and `struct Foo;`
identically, leading to an 'empty' `where` clause being omitted during
pretty printing. This will cause us to lose spans when proc-macros
involved, since we will have a collected `where` token that does not
appear in the pretty-printed item.
We now explicitly track the presence of a `where` token during parsing,
so that we can distinguish between `struct Foo where;` and `struct Foo;`
during pretty-printing
|
|
Lint must_use on mem::replace
This adds a hint on `mem::replace`, "if you don't need the old value,
you can just assign the new value directly". This is in similar spirit
to the `must_use` on `ManuallyDrop::take`.
|
|
Code blocks that are not annotated are assumed to be Rust
|
|
|
|
|
|
parser: Remove `Parser::prev_span`
Follow-up to https://github.com/rust-lang/rust/pull/69384.
r? @Centril
|
|
|
|
|
|
Add more context to E0599 errors
Point at the intermediary unfulfilled trait bounds.
Fix #52523, fix #61661, cc #36513, fix #68131, fix #64417, fix #61768, cc #57457, cc #9082, fix #57994, cc #64934, cc #65149.
|
|
|
|
|
|
suggestions when possible
|
|
- Account for `impl Trait<_>`.
- Provide a reasonable `Span` for empty `Generics` in `impl`s.
- Account for `fn foo<_>(_: _) {}` to suggest `fn foo<T>(_: T) {}`.
- Fix #67995.
|
|
|
|
|
|
|
|
|
|
also move MACRO_ARGUMENTS -> librustc_parse
|