about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-11-19 02:59:29 +0000
committerbors <bors@rust-lang.org>2018-11-19 02:59:29 +0000
commit7e82eda000c8d4abbdaa76b3563cd77f938fc411 (patch)
treeb245a1f7b79958535f7d14d14039710e1d3b6991 /src/libsyntax
parenta9b791b3c0543120ed03e70600e6cf4f451b4124 (diff)
parent38025e0dca8c2f049884eedc58792c4e321ed27c (diff)
downloadrust-7e82eda000c8d4abbdaa76b3563cd77f938fc411.tar.gz
rust-7e82eda000c8d4abbdaa76b3563cd77f938fc411.zip
Auto merge of #56042 - petrochenkov:nuni, r=petrochenkov
[nightly] resolve: Implement uniform paths 2.0

Forward-port of https://github.com/rust-lang/rust/pull/55884 to nightly.

r? @ghost
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ext/base.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libsyntax/ext/base.rs b/src/libsyntax/ext/base.rs
index 88ee80e6088..bb927b62a18 100644
--- a/src/libsyntax/ext/base.rs
+++ b/src/libsyntax/ext/base.rs
@@ -595,6 +595,13 @@ impl MacroKind {
             MacroKind::ProcMacroStub => "crate-local procedural macro",
         }
     }
+
+    pub fn article(self) -> &'static str {
+        match self {
+            MacroKind::Attr => "an",
+            _ => "a",
+        }
+    }
 }
 
 /// An enum representing the different kinds of syntax extensions.