diff options
| author | Manish Goregaokar <manishsmail@gmail.com> | 2016-06-29 21:21:22 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-06-29 21:21:22 +0530 |
| commit | 8886818a9ab3e6c52651038d4e22e2d51b932bb9 (patch) | |
| tree | b7df117c5afe9c843b3492a3961e41b1b7b7a164 /src/test | |
| parent | 2a0c2c3b3a0c7291f6160f9cf4178ecbdb920f04 (diff) | |
| parent | b4611b1ff29d93ba9a03932b316935cbfd076ed9 (diff) | |
Rollup merge of #34495 - jseyfried:only_ident_macro_invocations, r=eddyb
Forbid type parameters and global paths in macro invocations
Fixes #28558.
This is a [breaking-change]. For example, the following would break:
```rust
macro_rules! m { () => { () } }
fn main() {
m::<T>!(); // Type parameters are no longer allowed in macro invocations
::m!(); // Global paths are no longer allowed in macro invocations
}
```
Any breakage can be fixed by removing the type parameters or the leading `::` (respectively).
r? @eddyb
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/macro-with-seps-err-msg.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/compile-fail/macro-with-seps-err-msg.rs b/src/test/compile-fail/macro-with-seps-err-msg.rs index 95250e36b86..408bb15ba28 100644 --- a/src/test/compile-fail/macro-with-seps-err-msg.rs +++ b/src/test/compile-fail/macro-with-seps-err-msg.rs @@ -8,8 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:expected macro name without module separators - fn main() { - globnar::brotz!(); + globnar::brotz!(); //~ ERROR expected macro name without module separators + ::foo!(); //~ ERROR expected macro name without module separators + foo::<T>!(); //~ ERROR expected macro name without module separators } |
