diff options
| author | kennytm <kennytm@gmail.com> | 2018-07-22 22:10:16 +0800 |
|---|---|---|
| committer | kennytm <kennytm@gmail.com> | 2018-07-23 01:00:03 +0800 |
| commit | 8e6971dd2dc4eb37a6ca0b4de6d6d18336091eec (patch) | |
| tree | 8750588ed75fc65a37300ddb375a6d7a60f0636f /src/libsyntax | |
| parent | 02357079a61a61d18ff93e4a39dd75f6b54c2644 (diff) | |
| parent | a18be44d6318b04a604d1a9b3f965fbdaab8abf6 (diff) | |
| download | rust-8e6971dd2dc4eb37a6ca0b4de6d6d18336091eec.tar.gz rust-8e6971dd2dc4eb37a6ca0b4de6d6d18336091eec.zip | |
Rollup merge of #52581 - petrochenkov:bmacrodoc, r=alexcrichton
Avoid using `#[macro_export]` for documenting builtin macros Use a special `rustc_*` attribute instead. cc https://github.com/rust-lang/rust/pull/52234
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/feature_gate.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs index 143d0d4df71..30137439e77 100644 --- a/src/libsyntax/feature_gate.rs +++ b/src/libsyntax/feature_gate.rs @@ -687,7 +687,8 @@ pub fn deprecated_attributes() -> Vec<&'static (&'static str, AttributeType, Att } pub fn is_builtin_attr(attr: &ast::Attribute) -> bool { - BUILTIN_ATTRIBUTES.iter().any(|&(builtin_name, _, _)| attr.check_name(builtin_name)) + BUILTIN_ATTRIBUTES.iter().any(|&(builtin_name, _, _)| attr.check_name(builtin_name)) || + attr.name().as_str().starts_with("rustc_") } // Attributes that have a special meaning to rustc or rustdoc |
