mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 17:18:32 +03:00
Document rustc_ast::Extern variants
This commit is contained in:
@@ -2705,8 +2705,19 @@ pub fn span_with_attributes(&self) -> Span {
|
||||
/// `extern` qualifier on a function item or function type.
|
||||
#[derive(Clone, Copy, Encodable, Decodable, Debug)]
|
||||
pub enum Extern {
|
||||
/// No explicit extern keyword was used
|
||||
///
|
||||
/// E.g. `fn foo() {}`
|
||||
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),
|
||||
/// An explicit extern keyword was used with an explicit ABI
|
||||
///
|
||||
/// E.g. `extern "C" fn foo() {}`
|
||||
Explicit(StrLit, Span),
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user