Implement RFC 1861: Extern types
This commit is contained in:
parent
bed9a85c40
commit
77f7e85d7f
81 changed files with 737 additions and 120 deletions
|
|
@ -2007,13 +2007,16 @@ pub enum ForeignItemKind {
|
|||
/// A foreign static item (`static ext: u8`), with optional mutability
|
||||
/// (the boolean is true when mutable)
|
||||
Static(P<Ty>, bool),
|
||||
/// A foreign type
|
||||
Ty,
|
||||
}
|
||||
|
||||
impl ForeignItemKind {
|
||||
pub fn descriptive_variant(&self) -> &str {
|
||||
match *self {
|
||||
ForeignItemKind::Fn(..) => "foreign function",
|
||||
ForeignItemKind::Static(..) => "foreign static item"
|
||||
ForeignItemKind::Static(..) => "foreign static item",
|
||||
ForeignItemKind::Ty => "foreign type",
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue