@@ -66,83 +66,52 @@ impl Emission<ast::Meta> for Translator<'_> {
6666impl Emission < ast:: Fn > for Translator < ' _ > {
6767 fn post_emit ( & mut self , node : & ast:: Fn , label : Label < generated:: Function > ) {
6868 self . emit_function_has_implementation ( node, label) ;
69- self . extract_canonical_origin ( node, label. into ( ) ) ;
7069 }
7170}
7271
7372impl Emission < ast:: Struct > for Translator < ' _ > {
7473 fn post_emit ( & mut self , node : & ast:: Struct , label : Label < generated:: Struct > ) {
7574 self . emit_derive_expansion ( node, label) ;
76- self . extract_canonical_origin ( node, label. into ( ) ) ;
7775 }
7876}
7977
8078impl Emission < ast:: Enum > for Translator < ' _ > {
8179 fn post_emit ( & mut self , node : & ast:: Enum , label : Label < generated:: Enum > ) {
8280 self . emit_derive_expansion ( node, label) ;
83- self . extract_canonical_origin ( node, label. into ( ) ) ;
8481 }
8582}
8683
8784impl Emission < ast:: Union > for Translator < ' _ > {
8885 fn post_emit ( & mut self , node : & ast:: Union , label : Label < generated:: Union > ) {
8986 self . emit_derive_expansion ( node, label) ;
90- self . extract_canonical_origin ( node, label. into ( ) ) ;
9187 }
9288}
9389
9490impl Emission < ast:: Trait > for Translator < ' _ > {
95- fn post_emit ( & mut self , node : & ast:: Trait , label : Label < generated:: Trait > ) {
96- self . extract_canonical_origin ( node, label. into ( ) ) ;
97- }
9891}
9992
10093impl Emission < ast:: Module > for Translator < ' _ > {
101- fn post_emit ( & mut self , node : & ast:: Module , label : Label < generated:: Module > ) {
102- self . extract_canonical_origin ( node, label. into ( ) ) ;
103- }
10494}
10595
10696impl Emission < ast:: Variant > for Translator < ' _ > {
107- fn post_emit ( & mut self , node : & ast:: Variant , label : Label < generated:: Variant > ) {
108- self . extract_canonical_origin_of_enum_variant ( node, label) ;
109- }
11097}
11198
11299impl Emission < ast:: PathExpr > for Translator < ' _ > {
113- fn post_emit ( & mut self , node : & ast:: PathExpr , label : Label < generated:: PathExpr > ) {
114- self . extract_path_canonical_destination ( node, label. into ( ) ) ;
115- }
116100}
117101
118102impl Emission < ast:: RecordExpr > for Translator < ' _ > {
119- fn post_emit ( & mut self , node : & ast:: RecordExpr , label : Label < generated:: StructExpr > ) {
120- self . extract_path_canonical_destination ( node, label. into ( ) ) ;
121- }
122103}
123104
124105impl Emission < ast:: PathPat > for Translator < ' _ > {
125- fn post_emit ( & mut self , node : & ast:: PathPat , label : Label < generated:: PathPat > ) {
126- self . extract_path_canonical_destination ( node, label. into ( ) ) ;
127- }
128106}
129107
130108impl Emission < ast:: RecordPat > for Translator < ' _ > {
131- fn post_emit ( & mut self , node : & ast:: RecordPat , label : Label < generated:: StructPat > ) {
132- self . extract_path_canonical_destination ( node, label. into ( ) ) ;
133- }
134109}
135110
136111impl Emission < ast:: TupleStructPat > for Translator < ' _ > {
137- fn post_emit ( & mut self , node : & ast:: TupleStructPat , label : Label < generated:: TupleStructPat > ) {
138- self . extract_path_canonical_destination ( node, label. into ( ) ) ;
139- }
140112}
141113
142114impl Emission < ast:: MethodCallExpr > for Translator < ' _ > {
143- fn post_emit ( & mut self , node : & ast:: MethodCallExpr , label : Label < generated:: MethodCallExpr > ) {
144- self . extract_method_canonical_destination ( node, label) ;
145- }
146115}
147116
148117impl Emission < ast:: PathSegment > for Translator < ' _ > {
@@ -678,38 +647,6 @@ impl<'a> Translator<'a> {
678647 self . origin_from_hir ( item. parent_enum ( sema. db ) )
679648 }
680649
681- pub ( crate ) fn extract_canonical_origin < T : AddressableAst + HasName > (
682- & mut self ,
683- item : & T ,
684- label : Label < generated:: Addressable > ,
685- ) {
686- // TODO: remove method.
687- }
688-
689- pub ( crate ) fn extract_canonical_origin_of_enum_variant (
690- & mut self ,
691- item : & ast:: Variant ,
692- label : Label < generated:: Variant > ,
693- ) {
694- // TODO: remove method.
695- }
696-
697- pub ( crate ) fn extract_path_canonical_destination (
698- & mut self ,
699- item : & impl PathAst ,
700- label : Label < generated:: Resolvable > ,
701- ) {
702- // TODO: remove method.
703- }
704-
705- pub ( crate ) fn extract_method_canonical_destination (
706- & mut self ,
707- item : & ast:: MethodCallExpr ,
708- label : Label < generated:: MethodCallExpr > ,
709- ) {
710- // TODO: remove method.
711- }
712-
713650 pub ( crate ) fn should_be_excluded ( & self , item : & impl ast:: HasAttrs ) -> bool {
714651 self . semantics . is_some_and ( |sema| {
715652 item. attrs ( ) . any ( |attr| {
0 commit comments