@@ -353,7 +353,7 @@ fn parse_foreign_mod(
353353 cx. error ( span, "extern \" Rust\" block does not need to be unsafe" ) ;
354354 }
355355 }
356- Lang :: Cxx => { }
356+ Lang :: Cxx | Lang :: CxxUnwind => { }
357357 }
358358
359359 let trusted = trusted || foreign_mod. unsafety . is_some ( ) ;
@@ -445,6 +445,7 @@ fn parse_lang(abi: &Abi) -> Result<Lang> {
445445
446446 match name. value ( ) . as_str ( ) {
447447 "C++" => Ok ( Lang :: Cxx ) ,
448+ "C++-unwind" => Ok ( Lang :: CxxUnwind ) ,
448449 "Rust" => Ok ( Lang :: Rust ) ,
449450 _ => Err ( Error :: new_spanned (
450451 abi,
@@ -492,7 +493,7 @@ fn parse_extern_type(
492493 let semi_token = foreign_type. semi_token ;
493494
494495 ( match lang {
495- Lang :: Cxx => Api :: CxxType ,
496+ Lang :: Cxx | Lang :: CxxUnwind => Api :: CxxType ,
496497 Lang :: Rust => Api :: RustType ,
497498 } ) ( ExternType {
498499 cfg,
@@ -671,7 +672,7 @@ fn parse_extern_fn(
671672 let semi_token = foreign_fn. semi_token ;
672673
673674 Ok ( match lang {
674- Lang :: Cxx => Api :: CxxFunction ,
675+ Lang :: Cxx | Lang :: CxxUnwind => Api :: CxxFunction ,
675676 Lang :: Rust => Api :: RustFunction ,
676677 } ( ExternFn {
677678 cfg,
@@ -964,7 +965,7 @@ fn parse_extern_type_bounded(
964965 let name = pair ( namespace, & ident, cxx_name, rust_name) ;
965966
966967 Ok ( match lang {
967- Lang :: Cxx => Api :: CxxType ,
968+ Lang :: Cxx | Lang :: CxxUnwind => Api :: CxxType ,
968969 Lang :: Rust => Api :: RustType ,
969970 } ( ExternType {
970971 cfg,
0 commit comments