File tree Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Expand file tree Collapse file tree 3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
5
5
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
- refs/heads/try2: 155857f5488f2b6ca04c3abe6ac22833028c1497
8
+ refs/heads/try2: 06f46902caf4a98132229237820d482f99e147ea
9
9
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ mod m {
28
28
}
29
29
30
30
fn g ( ) {
31
- use m:: aha;
31
+ use self :: m:: aha;
32
32
let r = match ( 0 , 0 ) {
33
33
( 0 , aha) => 0 ,
34
34
//~^ ERROR static constant in pattern should be all caps
@@ -37,7 +37,22 @@ fn g() {
37
37
assert ! ( r == 1 ) ;
38
38
}
39
39
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
+
40
54
fn main ( ) {
41
55
f ( ) ;
42
56
g ( ) ;
57
+ h ( ) ;
43
58
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ mod m {
38
38
}
39
39
40
40
fn g ( ) {
41
- use AHA = m:: aha;
41
+ use AHA = self :: m:: aha;
42
42
let r = match ( 0 , 0 ) {
43
43
( 0 , AHA ) => 0 ,
44
44
( x, y) => 1 + x + y,
@@ -53,12 +53,12 @@ fn g() {
53
53
54
54
fn h ( ) {
55
55
let r = match ( 0 , 0 ) {
56
- ( 0 , m:: aha) => 0 ,
56
+ ( 0 , self :: m:: aha) => 0 ,
57
57
( x, y) => 1 + x + y,
58
58
} ;
59
59
assert ! ( r == 1 ) ;
60
60
let r = match ( 0 , 7 ) {
61
- ( 0 , m:: aha) => 0 ,
61
+ ( 0 , self :: m:: aha) => 0 ,
62
62
( x, y) => 1 + x + y,
63
63
} ;
64
64
assert ! ( r == 0 ) ;
You can’t perform that action at this time.
0 commit comments