@@ -29,7 +29,7 @@ use crate::{
2929 CppEffectiveName , CppOriginalName ,
3030 } ,
3131 known_types:: known_types,
32- minisyn:: minisynize_punctuated,
32+ minisyn:: { minisynize_punctuated, FnArg } ,
3333 types:: validate_ident_ok_for_rust,
3434} ;
3535use indexmap:: map:: IndexMap as HashMap ;
@@ -41,8 +41,8 @@ use itertools::Itertools;
4141use proc_macro2:: Span ;
4242use quote:: quote;
4343use syn:: {
44- parse_quote, punctuated:: Punctuated , token:: Comma , FnArg , Ident , Pat , PatType , ReturnType ,
45- Type , TypePath , TypePtr , TypeReference , Visibility ,
44+ parse_quote, punctuated:: Punctuated , token:: Comma , Ident , Pat , PatType , ReturnType , Type ,
45+ TypePath , TypePtr , TypeReference , Visibility ,
4646} ;
4747
4848use crate :: {
@@ -1673,8 +1673,8 @@ impl<'a> FnAnalyzer<'a> {
16731673 sophistication : TypeConversionSophistication ,
16741674 construct_into_self : bool ,
16751675 ) -> Result < ( FnArg , ArgumentAnalysis ) , ConvertErrorFromCpp > {
1676- Ok ( match arg {
1677- FnArg :: Typed ( pt) => {
1676+ Ok ( match & arg. 0 {
1677+ syn :: FnArg :: Typed ( pt) => {
16781678 let mut pt = pt. clone ( ) ;
16791679 let mut self_type = None ;
16801680 let old_pat = * pt. pat ;
@@ -1762,7 +1762,7 @@ impl<'a> FnAnalyzer<'a> {
17621762 UnsafetyNeeded :: None
17631763 } ;
17641764 (
1765- FnArg :: Typed ( pt) ,
1765+ syn :: FnArg :: Typed ( pt) . into ( ) ,
17661766 ArgumentAnalysis {
17671767 self_type,
17681768 name : new_pat. into ( ) ,
@@ -2367,10 +2367,10 @@ impl HasFieldsAndBases for Api<FnPrePhase2> {
23672367}
23682368
23692369/// Stringify a function argument for diagnostics
2370- fn describe_arg ( arg : & FnArg ) -> String {
2370+ fn describe_arg ( arg : & syn :: FnArg ) -> String {
23712371 match arg {
2372- FnArg :: Receiver ( _) => "the function receiver (this/self paramter)" . into ( ) ,
2373- FnArg :: Typed ( PatType { pat, .. } ) => match pat. as_ref ( ) {
2372+ syn :: FnArg :: Receiver ( _) => "the function receiver (this/self paramter)" . into ( ) ,
2373+ syn :: FnArg :: Typed ( PatType { pat, .. } ) => match pat. as_ref ( ) {
23742374 Pat :: Ident ( pti) => pti. ident . to_string ( ) ,
23752375 _ => "another argument we don't know how to describe" . into ( ) ,
23762376 } ,
0 commit comments