Closed
Description
I've had a couple of situations already where I would have liked RA to print something to identify what function/method a closing }
belongs to.
This could look like this
impl HasSource for Field {
type Ast = FieldSource;
fn source(self, db: &dyn HirDatabase) -> Option<InFile<Self::Ast>> {
let var = VariantId::from(self.parent);
let src = var.child_source(db.upcast());
let field_source = src.map(|it| match it[self.id].clone() {
Either::Left(it) => FieldSource::Pos(it),
Either::Right(it) => FieldSource::Named(it),
});
Some(field_source)
} <fn source(self, &dyn HirDatabase)>
} <impl HasSource for Field>
This makes it easier to navigate code when functions are very long and users won't have to scroll up to the function body to check what the }
belongs to.
The <..>
text would be greyed out.