diff options
| author | bors <bors@rust-lang.org> | 2018-07-15 19:35:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-07-15 19:35:06 +0000 |
| commit | 82e5c9c8e2c4f47a8e1090ad8e6be5a16f82795e (patch) | |
| tree | 17ebf48a20a33d0dd196b291c954bf4502fbe3b6 /src/libsyntax_ext | |
| parent | fb8bde03cf0a024c076581824ccf5ede422a613d (diff) | |
| parent | 431aefb2d4d579b152f7f26f3e70d2fdc3db4bfb (diff) | |
| download | rust-82e5c9c8e2c4f47a8e1090ad8e6be5a16f82795e.tar.gz rust-82e5c9c8e2c4f47a8e1090ad8e6be5a16f82795e.zip | |
Auto merge of #52383 - petrochenkov:pmns, r=alexcrichton
resolve: Functions introducing procedural macros reserve a slot in the macro namespace as well Similarly to https://github.com/rust-lang/rust/pull/52234, this gives us symmetry between internal and external views of a crate, but in this case it's always an error to call a procedural macro in the same crate in which it's defined. Closes https://github.com/rust-lang/rust/issues/52225
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/proc_macro_registrar.rs | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/libsyntax_ext/proc_macro_registrar.rs b/src/libsyntax_ext/proc_macro_registrar.rs index 3cfa50b3e7d..5031182d484 100644 --- a/src/libsyntax_ext/proc_macro_registrar.rs +++ b/src/libsyntax_ext/proc_macro_registrar.rs @@ -146,11 +146,6 @@ impl<'a> CollectProcMacros<'a> { "cannot override a built-in #[derive] mode"); } - if self.derives.iter().any(|d| d.trait_name == trait_name) { - self.handler.span_err(trait_attr.span(), - "derive mode defined twice in this crate"); - } - let proc_attrs: Vec<_> = if let Some(attr) = attributes_attr { if !attr.check_name("attributes") { self.handler.span_err(attr.span(), "second argument must be `attributes`") |
