Document rustc_ast::Extern variants
This commit is contained in:
parent
b7bc90fea3
commit
3c7c694e73
1 changed files with 11 additions and 0 deletions
|
@ -2705,8 +2705,19 @@ impl Item {
|
||||||
/// `extern` qualifier on a function item or function type.
|
/// `extern` qualifier on a function item or function type.
|
||||||
#[derive(Clone, Copy, Encodable, Decodable, Debug)]
|
#[derive(Clone, Copy, Encodable, Decodable, Debug)]
|
||||||
pub enum Extern {
|
pub enum Extern {
|
||||||
|
/// No explicit extern keyword was used
|
||||||
|
///
|
||||||
|
/// E.g. `fn foo() {}`
|
||||||
None,
|
None,
|
||||||
|
/// An explicit extern keyword was used, but with implicit ABI
|
||||||
|
///
|
||||||
|
/// E.g. `extern fn foo() {}`
|
||||||
|
///
|
||||||
|
/// This is just `extern "C"` (see `rustc_target::spec::abi::Abi::FALLBACK`)
|
||||||
Implicit(Span),
|
Implicit(Span),
|
||||||
|
/// An explicit extern keyword was used with an explicit ABI
|
||||||
|
///
|
||||||
|
/// E.g. `extern "C" fn foo() {}`
|
||||||
Explicit(StrLit, Span),
|
Explicit(StrLit, Span),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue