Fix: Re-add missing node start positions (#6780)

This commit is contained in:
Micha Reiser 2023-08-23 09:59:36 +02:00 committed by GitHub
parent 1e6d1182bf
commit 4bdd99f882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -54,7 +54,13 @@ where
if self.is_suppressed(node_comments.trailing, f.context()) {
suppressed_node(node.as_any_node_ref()).fmt(f)
} else {
leading_comments(node_comments.leading).fmt(f)?;
write!(
f,
[
leading_comments(node_comments.leading),
source_position(node.start())
]
)?;
self.fmt_fields(node, f)?;
self.fmt_dangling_comments(node_comments.dangling, f)?;