mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
rust: pin-init: internal: use span of Index for generated identifiers
Use the span of `Index` for generated identifiers, so diagnostics can point to the span of the index. Link: https://patch.msgid.link/20260916184131.435059-1-gary@garyguo.net Signed-off-by: Gary Guo <gary@garyguo.net>
This commit is contained in:
parent
fb3d5c6b4c
commit
dfb6a037fd
|
|
@ -41,7 +41,7 @@ impl MemberExt for Member {
|
|||
fn as_ident(&self) -> Ident {
|
||||
match self {
|
||||
Member::Named(ident) => ident.clone(),
|
||||
Member::Unnamed(Index { index, .. }) => format_ident!("_{index}"),
|
||||
Member::Unnamed(Index { index, span }) => format_ident!("_{index}", span = *span),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user