@@ -1070,7 +1070,7 @@ mod test {
1070
1070
// these following tests are quite fragile, in that they don't test what
1071
1071
// *kind* of failure occurs.
1072
1072
1073
- // make sure that macros can leave scope
1073
+ // make sure that macros can't escape fns
1074
1074
#[ should_fail]
1075
1075
#[ test] fn macros_cant_escape_fns_test ( ) {
1076
1076
let src = "fn bogus() {macro_rules! z (() => (3+4))}\
@@ -1088,7 +1088,7 @@ mod test {
1088
1088
expand_crate ( & sess, cfg, vec ! ( ) , vec ! ( ) , crate_ast) ;
1089
1089
}
1090
1090
1091
- // make sure that macros can leave scope for modules
1091
+ // make sure that macros can't escape modules
1092
1092
#[ should_fail]
1093
1093
#[ test] fn macros_cant_escape_mods_test ( ) {
1094
1094
let src = "mod foo {macro_rules! z (() => (3+4))}\
@@ -1105,7 +1105,7 @@ mod test {
1105
1105
expand_crate ( & sess, cfg, vec ! ( ) , vec ! ( ) , crate_ast) ;
1106
1106
}
1107
1107
1108
- // macro_escape modules shouldn't cause macros to leave scope
1108
+ // macro_escape modules should allow macros to escape
1109
1109
#[ test] fn macros_can_escape_flattened_mods_test ( ) {
1110
1110
let src = "#[macro_escape] mod foo {macro_rules! z (() => (3+4))}\
1111
1111
fn inty() -> int { z!() }". to_string ( ) ;
@@ -1114,7 +1114,6 @@ mod test {
1114
1114
"<test>" . to_string ( ) ,
1115
1115
src,
1116
1116
Vec :: new ( ) , & sess) ;
1117
- // should fail:
1118
1117
let cfg = :: syntax:: ext:: expand:: ExpansionConfig {
1119
1118
deriving_hash_type_parameter : false ,
1120
1119
crate_id : from_str ( "test" ) . unwrap ( ) ,
@@ -1185,6 +1184,12 @@ mod test {
1185
1184
// binding should match the second two varrefs, and the second binding
1186
1185
// should match the first varref.
1187
1186
//
1187
+ // Put differently; this is a sparse representation of a boolean matrix
1188
+ // indicating which bindings capture which identifiers.
1189
+ //
1190
+ // Note also that this matrix is dependent on the implicit ordering of
1191
+ // the bindings and the varrefs discovered by the name-finder and the path-finder.
1192
+ //
1188
1193
// The comparisons are done post-mtwt-resolve, so we're comparing renamed
1189
1194
// names; differences in marks don't matter any more.
1190
1195
//
0 commit comments