rust/compiler/rustc_parse/src/parser
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
..
tokenstream remove eq_unspanned from TokenStream 2025-05-26 17:02:51 +08:00
asm.rs remove P 2025-08-09 15:47:01 +08:00
attr.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00
attr_wrapper.rs Use ThinVec to shrink LazyAttrTokenStreamInner. 2025-04-30 07:12:09 +10:00
cfg_select.rs cfg_select: Support unbraced expressions 2025-08-10 16:18:01 -07:00
diagnostics.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00
expr.rs Auto merge of #145146 - fee1-dead-contrib:push-zmqrkurlzrxy, r=nnethercote 2025-08-09 23:27:55 +00:00
generics.rs remove P 2025-08-09 15:47:01 +08:00
item.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00
mod.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00
nonterminal.rs remove P 2025-08-09 15:47:01 +08:00
pat.rs Rollup merge of #137872 - estebank:extra-vert, r=compiler-errors 2025-08-14 21:48:41 +02:00
path.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00
stmt.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00
tests.rs remove P 2025-08-09 15:47:01 +08:00
token_type.rs Remove token::{Open,Close}Delim. 2025-04-21 07:35:56 +10:00
ty.rs Add FnContext in parser for diagnostic 2025-08-14 21:31:47 +08:00