mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 12:43:36 +00:00
Add suport for extern types.
See https://github.com/rust-lang/rust/pull/44295
This commit is contained in:
parent
cf0d494dda
commit
c1e897907a
@ -2740,8 +2740,10 @@ impl Rewrite for ast::ForeignItem {
|
||||
format!("{}{}{};", prefix, sep, ty_str)
|
||||
})
|
||||
}
|
||||
// FIXME(#2097) support extern types.
|
||||
ast::ForeignItemKind::Ty => unimplemented!(),
|
||||
ast::ForeignItemKind::Ty => {
|
||||
let vis = format_visibility(&self.vis);
|
||||
Some(format!("{}type {};", vis, self.ident))
|
||||
}
|
||||
}?;
|
||||
|
||||
let missing_span = if self.attrs.is_empty() {
|
||||
|
@ -25,6 +25,11 @@ extern {
|
||||
fn DMR_GetDevice(pHDev: *mut HDEV, searchMode: DeviceSearchMode, pSearchString: *const c_char, devNr: c_uint, wildcard: c_char) -> TDMR_ERROR;
|
||||
|
||||
fn quux() -> (); // Post comment
|
||||
|
||||
pub type
|
||||
Foo;
|
||||
|
||||
type Bar;
|
||||
}
|
||||
|
||||
extern "Rust" { static ext: u32;
|
||||
|
@ -34,6 +34,10 @@ extern "C" {
|
||||
) -> TDMR_ERROR;
|
||||
|
||||
fn quux() -> (); // Post comment
|
||||
|
||||
pub type Foo;
|
||||
|
||||
type Bar;
|
||||
}
|
||||
|
||||
extern "Rust" {
|
||||
|
Loading…
Reference in New Issue
Block a user