Skip to content

Commit 5a3fd48

Browse files
committed
---
yaml --- r: 145661 b: refs/heads/try2 c: 06f4690 h: refs/heads/master i: 145659: 7a4c7d3 v: v3
1 parent 04d758d commit 5a3fd48

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-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: 155857f5488f2b6ca04c3abe6ac22833028c1497
8+
refs/heads/try2: 06f46902caf4a98132229237820d482f99e147ea
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/test/compile-fail/match-static-const-lc.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mod m {
2828
}
2929

3030
fn g() {
31-
use m::aha;
31+
use self::m::aha;
3232
let r = match (0,0) {
3333
(0, aha) => 0,
3434
//~^ ERROR static constant in pattern should be all caps
@@ -37,7 +37,22 @@ fn g() {
3737
assert!(r == 1);
3838
}
3939

40+
mod n {
41+
pub static OKAY : int = 8;
42+
}
43+
44+
fn h() {
45+
use not_okay = self::n::OKAY;
46+
let r = match (0,0) {
47+
(0, not_okay) => 0,
48+
//~^ ERROR static constant in pattern should be all caps
49+
(x, y) => 1 + x + y,
50+
};
51+
assert!(r == 1);
52+
}
53+
4054
fn main () {
4155
f();
4256
g();
57+
h();
4358
}

branches/try2/src/test/run-pass/match-static-const-rename.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mod m {
3838
}
3939

4040
fn g() {
41-
use AHA = m::aha;
41+
use AHA = self::m::aha;
4242
let r = match (0,0) {
4343
(0, AHA) => 0,
4444
(x, y) => 1 + x + y,
@@ -53,12 +53,12 @@ fn g() {
5353

5454
fn h() {
5555
let r = match (0,0) {
56-
(0, m::aha) => 0,
56+
(0, self::m::aha) => 0,
5757
(x, y) => 1 + x + y,
5858
};
5959
assert!(r == 1);
6060
let r = match (0,7) {
61-
(0, m::aha) => 0,
61+
(0, self::m::aha) => 0,
6262
(x, y) => 1 + x + y,
6363
};
6464
assert!(r == 0);

0 commit comments

Comments
 (0)