@@ -3,7 +3,7 @@ use crate::syntax::file::{Item, ItemForeignMod};
3
3
use crate :: syntax:: report:: Errors ;
4
4
use crate :: syntax:: Atom :: * ;
5
5
use crate :: syntax:: {
6
- attrs, error, Api , CppName , Doc , Enum , ExternFn , ExternType , Impl , Include , IncludeKind , Lang ,
6
+ attrs, error, Api , Doc , Enum , ExternFn , ExternType , Impl , Include , IncludeKind , Lang ,
7
7
Namespace , Pair , Receiver , Ref , ResolvableName , Signature , Slice , Struct , Ty1 , Type , TypeAlias ,
8
8
Var , Variant ,
9
9
} ;
@@ -398,10 +398,11 @@ fn parse_extern_fn(
398
398
let throws = throws_tokens. is_some ( ) ;
399
399
let unsafety = foreign_fn. sig . unsafety ;
400
400
let fn_token = foreign_fn. sig . fn_token ;
401
- let ident = Pair {
402
- cxx : CppName :: new ( ns, cxx_name. unwrap_or ( foreign_fn. sig . ident . clone ( ) ) ) ,
403
- rust : rust_name. unwrap_or ( foreign_fn. sig . ident . clone ( ) ) ,
404
- } ;
401
+ let ident = Pair :: new_from_differing_names (
402
+ ns,
403
+ cxx_name. unwrap_or ( foreign_fn. sig . ident . clone ( ) ) ,
404
+ rust_name. unwrap_or ( foreign_fn. sig . ident . clone ( ) ) ,
405
+ ) ;
405
406
let paren_token = foreign_fn. sig . paren_token ;
406
407
let semi_token = foreign_fn. semi_token ;
407
408
let api_function = match lang {
0 commit comments