Skip to content
This repository was archived by the owner on Aug 16, 2021. It is now read-only.

Commit 5134800

Browse files
committed
Fix tests on stable/beta (closes #12)
Apparently, if the macro invocation is the last "expression" in the function block, the parser expects an expression and will not let the macro expand to anything else. Appending a semicolon will disabuse it of that notion. The breakage only applies to error_chain! usage inside functions, which is probably not relevant other than in these tests. Seems to be fixed in nightly 1.12 anyway.
1 parent d1fac75 commit 5134800

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ addons:
77
- libelf-dev
88
- libdw-dev
99
rust:
10+
- stable
11+
- beta
1012
- nightly
1113
before_script:
1214
- |

tests/tests.rs

100644100755
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ fn smoke_test_1() {
1515
foreign_links { }
1616

1717
errors { }
18-
}
18+
};
1919
}
2020

2121
#[test]
@@ -28,7 +28,7 @@ fn smoke_test_2() {
2828
foreign_links { }
2929

3030
errors { }
31-
}
31+
};
3232
}
3333

3434
#[test]
@@ -39,7 +39,7 @@ fn smoke_test_3() {
3939
foreign_links { }
4040

4141
errors { }
42-
}
42+
};
4343
}
4444

4545
#[test]
@@ -55,7 +55,7 @@ fn smoke_test_4() {
5555
display("http request returned an unsuccessful status code: {}", e)
5656
}
5757
}
58-
}
58+
};
5959
}
6060

6161
#[test]
@@ -73,7 +73,7 @@ fn smoke_test_5() {
7373
display("http request returned an unsuccessful status code: {}", e)
7474
}
7575
}
76-
}
76+
};
7777
}
7878

7979
#[test]
@@ -85,7 +85,7 @@ fn smoke_test_6() {
8585
display("http request returned an unsuccessful status code: {}", e)
8686
}
8787
}
88-
}
88+
};
8989
}
9090

9191
#[test]
@@ -101,12 +101,12 @@ fn smoke_test_7() {
101101
display("http request returned an unsuccessful status code: {}", e)
102102
}
103103
}
104-
}
104+
};
105105
}
106106

107107
#[test]
108108
fn empty() {
109-
error_chain! { }
109+
error_chain! { };
110110
}
111111

112112
#[cfg(test)]

0 commit comments

Comments
 (0)