summaryrefslogtreecommitdiff
path: root/src/macro_rules
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2017-10-29 22:00:41 +0800
committerJohn Hodge <tpg@ucc.asn.au>2017-10-29 22:00:41 +0800
commitb2f0e1514bd8f52c5a8bc42cf862a678e2c691c3 (patch)
treed2c9746f355793a252bb6f6a97f488c2443cd9c7 /src/macro_rules
parentf26c68609608efa79df5c53be8237df0fa0090f0 (diff)
downloadmrust-b2f0e1514bd8f52c5a8bc42cf862a678e2c691c3.tar.gz
macro_rules - Fix range of placeholder value
Diffstat (limited to 'src/macro_rules')
-rw-r--r--src/macro_rules/parse.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/macro_rules/parse.cpp b/src/macro_rules/parse.cpp
index 38506a21..f5b0f0e4 100644
--- a/src/macro_rules/parse.cpp
+++ b/src/macro_rules/parse.cpp
@@ -212,7 +212,7 @@ public:
// TODO: `error-chain`'s quick_error macro has an arm which refers to an undefined metavar.
// - Maybe emit a warning and use a marker index.
WARNING(lex.point_span(), W0000, "Macro variable $" << name << " not found");
- idx = (1<<30)-1;
+ idx = (1<<16)-1; // NOTE: Encoded as a u16
}
if( var_set_ptr ) {
var_set_ptr->insert( ::std::make_pair(idx,true) );