diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2021-05-30 16:45:51 +0200 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-10-02 13:00:19 -0400 |
| commit | e2d3e09b9cb60f148e99d16e9af650f81275e5f1 (patch) | |
| tree | de896a06331369f9f6544fc51a15139079f19336 /compiler/rustc_middle/src/dep_graph | |
| parent | 6e1211081239be62a5d0bb3bbcb29a9f14621c81 (diff) | |
| download | rust-e2d3e09b9cb60f148e99d16e9af650f81275e5f1.tar.gz rust-e2d3e09b9cb60f148e99d16e9af650f81275e5f1.zip | |
Prevent macro ambiguity errors
The previous macro_rules! parsers failed when an additional modifier was added with ambiguity errors. The error is pretty unclear as to what exactly the cause here is, but this change simplifies the argument parsing code such that the error is avoided.
Diffstat (limited to 'compiler/rustc_middle/src/dep_graph')
| -rw-r--r-- | compiler/rustc_middle/src/dep_graph/dep_node.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/dep_graph/dep_node.rs b/compiler/rustc_middle/src/dep_graph/dep_node.rs index e788dd4be85..07d42902be5 100644 --- a/compiler/rustc_middle/src/dep_graph/dep_node.rs +++ b/compiler/rustc_middle/src/dep_graph/dep_node.rs @@ -140,11 +140,11 @@ macro_rules! is_eval_always_attr { } macro_rules! contains_anon_attr { - ($($attr:ident $(($($attr_args:tt)*))* ),*) => ({$(is_anon_attr!($attr) | )* false}); + ($(($attr:ident $($attr_args:tt)* )),*) => ({$(is_anon_attr!($attr) | )* false}); } macro_rules! contains_eval_always_attr { - ($($attr:ident $(($($attr_args:tt)*))* ),*) => ({$(is_eval_always_attr!($attr) | )* false}); + ($(($attr:ident $($attr_args:tt)* )),*) => ({$(is_eval_always_attr!($attr) | )* false}); } #[allow(non_upper_case_globals)] |
