diff options
| author | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-17 14:04:20 +0000 |
|---|---|---|
| committer | Jeffrey Seyfried <jeffrey.seyfried@gmail.com> | 2016-11-21 09:00:56 +0000 |
| commit | 36c8f6b0d3f38904459f40496af36d36e9cc0fac (patch) | |
| tree | 6a5efd739f6537c308d3340b6e5495ceca17413f /src/librustc_plugin | |
| parent | e85a0d70b86491752eb501f73b9d2025c5991e8e (diff) | |
| download | rust-36c8f6b0d3f38904459f40496af36d36e9cc0fac.tar.gz rust-36c8f6b0d3f38904459f40496af36d36e9cc0fac.zip | |
Cleanup `InternedString`.
Diffstat (limited to 'src/librustc_plugin')
| -rw-r--r-- | src/librustc_plugin/registry.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_plugin/registry.rs b/src/librustc_plugin/registry.rs index d9fd89b4a77..fe2f9713d1b 100644 --- a/src/librustc_plugin/registry.rs +++ b/src/librustc_plugin/registry.rs @@ -101,7 +101,7 @@ impl<'a> Registry<'a> { /// /// This is the most general hook into `libsyntax`'s expansion behavior. pub fn register_syntax_extension(&mut self, name: ast::Name, extension: SyntaxExtension) { - if name.as_str() == "macro_rules" { + if name == "macro_rules" { panic!("user-defined macros may not be named `macro_rules`"); } self.syntax_exts.push((name, match extension { |
