Skip to content

Commit 83f0831

Browse files
committed
---
yaml --- r: 152845 b: refs/heads/try2 c: 9215d7e h: refs/heads/master i: 152843: 3456722 v: v3
1 parent 99cb43e commit 83f0831

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: bcdcaea5728db8003b1ad781490d782465658589
8+
refs/heads/try2: 9215d7e5b764c173ef8b2fecda913d39291e378b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/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)