@@ -27,32 +27,32 @@ use ra_ap_syntax::{
2727#[ macro_export]
2828macro_rules! emit_detached {
2929 ( MacroCall , $self: ident, $node: ident, $label: ident) => {
30- $self. extract_macro_call_expanded( & $node, $label) ;
30+ $self. extract_macro_call_expanded( $node, $label) ;
3131 } ;
3232 ( Function , $self: ident, $node: ident, $label: ident) => {
33- $self. extract_canonical_origin( & $node, $label. into( ) ) ;
33+ $self. extract_canonical_origin( $node, $label. into( ) ) ;
3434 } ;
3535 ( Trait , $self: ident, $node: ident, $label: ident) => {
36- $self. extract_canonical_origin( & $node, $label. into( ) ) ;
36+ $self. extract_canonical_origin( $node, $label. into( ) ) ;
3737 } ;
3838 ( Struct , $self: ident, $node: ident, $label: ident) => {
39- $self. extract_canonical_origin( & $node, $label. into( ) ) ;
39+ $self. extract_canonical_origin( $node, $label. into( ) ) ;
4040 } ;
4141 ( Enum , $self: ident, $node: ident, $label: ident) => {
42- $self. extract_canonical_origin( & $node, $label. into( ) ) ;
42+ $self. extract_canonical_origin( $node, $label. into( ) ) ;
4343 } ;
4444 ( Union , $self: ident, $node: ident, $label: ident) => {
45- $self. extract_canonical_origin( & $node, $label. into( ) ) ;
45+ $self. extract_canonical_origin( $node, $label. into( ) ) ;
4646 } ;
4747 ( Module , $self: ident, $node: ident, $label: ident) => {
48- $self. extract_canonical_origin( & $node, $label. into( ) ) ;
48+ $self. extract_canonical_origin( $node, $label. into( ) ) ;
4949 } ;
5050 // TODO canonical origin of other items
5151 ( Path , $self: ident, $node: ident, $label: ident) => {
52- $self. extract_canonical_destination( & $node, $label) ;
52+ $self. extract_canonical_destination( $node, $label) ;
5353 } ;
5454 ( MethodCallExpr , $self: ident, $node: ident, $label: ident) => {
55- $self. extract_method_canonical_destination( & $node, $label) ;
55+ $self. extract_method_canonical_destination( $node, $label) ;
5656 } ;
5757 ( $( $_: tt) * ) => { } ;
5858}
@@ -252,20 +252,20 @@ impl<'a> Translator<'a> {
252252 ) -> Option < Label < generated:: AstNode > > {
253253 match expand_to {
254254 ra_ap_hir_expand:: ExpandTo :: Statements => {
255- ast:: MacroStmts :: cast ( expanded) . map ( |x| self . emit_macro_stmts ( x) . into ( ) )
255+ ast:: MacroStmts :: cast ( expanded) . map ( |x| self . emit_macro_stmts ( & x) . into ( ) )
256256 }
257257 ra_ap_hir_expand:: ExpandTo :: Items => {
258- ast:: MacroItems :: cast ( expanded) . map ( |x| self . emit_macro_items ( x) . into ( ) )
258+ ast:: MacroItems :: cast ( expanded) . map ( |x| self . emit_macro_items ( & x) . into ( ) )
259259 }
260260
261261 ra_ap_hir_expand:: ExpandTo :: Pattern => {
262- ast:: Pat :: cast ( expanded) . map ( |x| self . emit_pat ( x) . into ( ) )
262+ ast:: Pat :: cast ( expanded) . map ( |x| self . emit_pat ( & x) . into ( ) )
263263 }
264264 ra_ap_hir_expand:: ExpandTo :: Type => {
265- ast:: Type :: cast ( expanded) . map ( |x| self . emit_type ( x) . into ( ) )
265+ ast:: Type :: cast ( expanded) . map ( |x| self . emit_type ( & x) . into ( ) )
266266 }
267267 ra_ap_hir_expand:: ExpandTo :: Expr => {
268- ast:: Expr :: cast ( expanded) . map ( |x| self . emit_expr ( x) . into ( ) )
268+ ast:: Expr :: cast ( expanded) . map ( |x| self . emit_expr ( & x) . into ( ) )
269269 }
270270 }
271271 }
0 commit comments