fn declared_labels(document: &Document) -> BTreeSet<String>Expand description
Collect every label declared anywhere in the document: any non-reference
block carrying a label attribute: regardless of document order or
duplication. The duplicate-rename suggestion consults this set so it never
proposes a name that some other declaration already uses.