Skip to content

Commit 9215d7e

Browse files
committed
comments only
1 parent bcdcaea commit 9215d7e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/libsyntax/ext/expand.rs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ mod test {
10701070
// these following tests are quite fragile, in that they don't test what
10711071
// *kind* of failure occurs.
10721072

1073-
// make sure that macros can leave scope
1073+
// make sure that macros can't escape fns
10741074
#[should_fail]
10751075
#[test] fn macros_cant_escape_fns_test () {
10761076
let src = "fn bogus() {macro_rules! z (() => (3+4))}\
@@ -1088,7 +1088,7 @@ mod test {
10881088
expand_crate(&sess,cfg,vec!(),vec!(),crate_ast);
10891089
}
10901090

1091-
// make sure that macros can leave scope for modules
1091+
// make sure that macros can't escape modules
10921092
#[should_fail]
10931093
#[test] fn macros_cant_escape_mods_test () {
10941094
let src = "mod foo {macro_rules! z (() => (3+4))}\
@@ -1105,7 +1105,7 @@ mod test {
11051105
expand_crate(&sess,cfg,vec!(),vec!(),crate_ast);
11061106
}
11071107

1108-
// macro_escape modules shouldn't cause macros to leave scope
1108+
// macro_escape modules should allow macros to escape
11091109
#[test] fn macros_can_escape_flattened_mods_test () {
11101110
let src = "#[macro_escape] mod foo {macro_rules! z (() => (3+4))}\
11111111
fn inty() -> int { z!() }".to_string();
@@ -1114,7 +1114,6 @@ mod test {
11141114
"<test>".to_string(),
11151115
src,
11161116
Vec::new(), &sess);
1117-
// should fail:
11181117
let cfg = ::syntax::ext::expand::ExpansionConfig {
11191118
deriving_hash_type_parameter: false,
11201119
crate_id: from_str("test").unwrap(),
@@ -1185,6 +1184,12 @@ mod test {
11851184
// binding should match the second two varrefs, and the second binding
11861185
// should match the first varref.
11871186
//
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+
//
11881193
// The comparisons are done post-mtwt-resolve, so we're comparing renamed
11891194
// names; differences in marks don't matter any more.
11901195
//

0 commit comments

Comments
 (0)