Specify C ABI for generated extern functions in CodegenRust.py (#35278)

Extern functions without an explicit abi are deprecated
in future versions of rust.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-02-04 09:40:46 +01:00 committed by GitHub
parent d5daa31b1f
commit eaaad757e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2854,7 +2854,7 @@ class CGAbstractMethod(CGThing):
decorators.append('unsafe')
if self.extern:
decorators.append('extern')
decorators.append('extern "C"')
if not decorators:
return ''