rust/compiler/rustc_parse/src
Stuart Cook dc047f1385
Rollup merge of #145378 - xizheyin:144968, r=davidtwco
Add `FnContext` in parser for diagnostic

Fixes rust-lang/rust#144968

Inspired by https://github.com/rust-lang/rust/issues/144968#issuecomment-3156094581, I implemented `FnContext` to indicate whether a function should have a self parameter, for example, whether the function is a trait method, whether it is in an impl block. And I removed the outdated note.

I made two commits to show the difference.

cc ``@estebank`` ``@djc``

r? compiler
2025-08-15 16:16:41 +10:00
..
lexer Clean code for rustc_parse/src/lexer 2025-07-22 18:38:33 +08:00
parser Rollup merge of #145378 - xizheyin:144968, r=davidtwco 2025-08-15 16:16:41 +10:00
errors.rs Rollup merge of #137872 - estebank:extra-vert, r=compiler-errors 2025-08-14 21:48:41 +02:00
lib.rs Remove unused allow attrs 2025-07-07 12:58:16 +00:00
validate_attr.rs Add link to docs on malformed attributes 2025-08-11 16:00:49 +00:00