@@ -353,7 +353,7 @@ fn parse_foreign_mod(
353
353
cx. error ( span, "extern \" Rust\" block does not need to be unsafe" ) ;
354
354
}
355
355
}
356
- Lang :: Cxx => { }
356
+ Lang :: Cxx | Lang :: CxxUnwind => { }
357
357
}
358
358
359
359
let trusted = trusted || foreign_mod. unsafety . is_some ( ) ;
@@ -445,6 +445,7 @@ fn parse_lang(abi: &Abi) -> Result<Lang> {
445
445
446
446
match name. value ( ) . as_str ( ) {
447
447
"C++" => Ok ( Lang :: Cxx ) ,
448
+ "C++-unwind" => Ok ( Lang :: CxxUnwind ) ,
448
449
"Rust" => Ok ( Lang :: Rust ) ,
449
450
_ => Err ( Error :: new_spanned (
450
451
abi,
@@ -492,7 +493,7 @@ fn parse_extern_type(
492
493
let semi_token = foreign_type. semi_token ;
493
494
494
495
( match lang {
495
- Lang :: Cxx => Api :: CxxType ,
496
+ Lang :: Cxx | Lang :: CxxUnwind => Api :: CxxType ,
496
497
Lang :: Rust => Api :: RustType ,
497
498
} ) ( ExternType {
498
499
cfg,
@@ -671,7 +672,7 @@ fn parse_extern_fn(
671
672
let semi_token = foreign_fn. semi_token ;
672
673
673
674
Ok ( match lang {
674
- Lang :: Cxx => Api :: CxxFunction ,
675
+ Lang :: Cxx | Lang :: CxxUnwind => Api :: CxxFunction ,
675
676
Lang :: Rust => Api :: RustFunction ,
676
677
} ( ExternFn {
677
678
cfg,
@@ -964,7 +965,7 @@ fn parse_extern_type_bounded(
964
965
let name = pair ( namespace, & ident, cxx_name, rust_name) ;
965
966
966
967
Ok ( match lang {
967
- Lang :: Cxx => Api :: CxxType ,
968
+ Lang :: Cxx | Lang :: CxxUnwind => Api :: CxxType ,
968
969
Lang :: Rust => Api :: RustType ,
969
970
} ( ExternType {
970
971
cfg,
0 commit comments