Skip to content

Commit edac3ce

Browse files
committed
Auto merge of #23877 - richo:gardening, r=Manishearth
I also wanted to unignore https://github.com/rust-lang/rust/blob/master/src/libsyntax/ext/expand.rs#L1768-L1777 since the issue it references is closed, but the test fails, and it's internals aren't super clear to me.
2 parents 9854143 + 85c74c6 commit edac3ce

File tree

2 files changed

+23
-13
lines changed

2 files changed

+23
-13
lines changed

src/libstd/old_io/net/addrinfo.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,10 @@ mod test {
127127
assert!(found_local);
128128
}
129129

130-
#[ignore]
131130
#[test]
132131
fn issue_10663() {
133132
// Something should happen here, but this certainly shouldn't cause
134133
// everything to die. The actual outcome we don't care too much about.
135-
get_host_addresses("example.com").unwrap();
134+
let _ = get_host_addresses("example.com");
136135
}
137136
}

src/libsyntax/ext/expand.rs

+22-11
Original file line numberDiff line numberDiff line change
@@ -1770,7 +1770,8 @@ mod test {
17701770
// suggests that this can only occur in the presence of local-expand, which
17711771
// we have no plans to support. ... unless it's needed for item hygiene....
17721772
#[ignore]
1773-
#[test] fn issue_8062(){
1773+
#[test]
1774+
fn issue_8062(){
17741775
run_renaming_test(
17751776
&("fn main() {let hrcoo = 19; macro_rules! getx(()=>(hrcoo)); getx!();}",
17761777
vec!(vec!(0)), true), 0)
@@ -1781,7 +1782,8 @@ mod test {
17811782
// (just g) along the other, so the result of the whole thing should
17821783
// be "let z_123 = 3; z_123"
17831784
#[ignore]
1784-
#[test] fn issue_6994(){
1785+
#[test]
1786+
fn issue_6994(){
17851787
run_renaming_test(
17861788
&("macro_rules! g (($x:ident) =>
17871789
({macro_rules! f(($y:ident)=>({let $y=3;$x}));f!($x)}));
@@ -1792,7 +1794,8 @@ mod test {
17921794

17931795
// match variable hygiene. Should expand into
17941796
// fn z() {match 8 {x_1 => {match 9 {x_2 | x_2 if x_2 == x_1 => x_2 + x_1}}}}
1795-
#[test] fn issue_9384(){
1797+
#[test]
1798+
fn issue_9384(){
17961799
run_renaming_test(
17971800
&("macro_rules! bad_macro (($ex:expr) => ({match 9 {x | x if x == $ex => x + $ex}}));
17981801
fn z() {match 8 {x => bad_macro!(x)}}",
@@ -1805,7 +1808,8 @@ mod test {
18051808
// interpolated nodes weren't getting labeled.
18061809
// should expand into
18071810
// fn main(){let g1_1 = 13; g1_1}}
1808-
#[test] fn pat_expand_issue_15221(){
1811+
#[test]
1812+
fn pat_expand_issue_15221(){
18091813
run_renaming_test(
18101814
&("macro_rules! inner ( ($e:pat ) => ($e));
18111815
macro_rules! outer ( ($e:pat ) => (inner!($e)));
@@ -1821,7 +1825,8 @@ mod test {
18211825

18221826
// method arg hygiene
18231827
// method expands to fn get_x(&self_0, x_1: i32) {self_0 + self_2 + x_3 + x_1}
1824-
#[test] fn method_arg_hygiene(){
1828+
#[test]
1829+
fn method_arg_hygiene(){
18251830
run_renaming_test(
18261831
&("macro_rules! inject_x (()=>(x));
18271832
macro_rules! inject_self (()=>(self));
@@ -1834,7 +1839,8 @@ mod test {
18341839

18351840
// ooh, got another bite?
18361841
// expands to struct A; impl A {fn thingy(&self_1) {self_1;}}
1837-
#[test] fn method_arg_hygiene_2(){
1842+
#[test]
1843+
fn method_arg_hygiene_2(){
18381844
run_renaming_test(
18391845
&("struct A;
18401846
macro_rules! add_method (($T:ty) =>
@@ -1847,7 +1853,8 @@ mod test {
18471853

18481854
// item fn hygiene
18491855
// expands to fn q(x_1: i32){fn g(x_2: i32){x_2 + x_1};}
1850-
#[test] fn issue_9383(){
1856+
#[test]
1857+
fn issue_9383(){
18511858
run_renaming_test(
18521859
&("macro_rules! bad_macro (($ex:expr) => (fn g(x: i32){ x + $ex }));
18531860
fn q(x: i32) { bad_macro!(x); }",
@@ -1857,7 +1864,8 @@ mod test {
18571864

18581865
// closure arg hygiene (ExprClosure)
18591866
// expands to fn f(){(|x_1 : i32| {(x_2 + x_1)})(3);}
1860-
#[test] fn closure_arg_hygiene(){
1867+
#[test]
1868+
fn closure_arg_hygiene(){
18611869
run_renaming_test(
18621870
&("macro_rules! inject_x (()=>(x));
18631871
fn f(){(|x : i32| {(inject_x!() + x)})(3);}",
@@ -1867,7 +1875,8 @@ mod test {
18671875
}
18681876

18691877
// macro_rules in method position. Sadly, unimplemented.
1870-
#[test] fn macro_in_method_posn(){
1878+
#[test]
1879+
fn macro_in_method_posn(){
18711880
expand_crate_str(
18721881
"macro_rules! my_method (() => (fn thirteen(&self) -> i32 {13}));
18731882
struct A;
@@ -1877,7 +1886,8 @@ mod test {
18771886

18781887
// another nested macro
18791888
// expands to impl Entries {fn size_hint(&self_1) {self_1;}
1880-
#[test] fn item_macro_workaround(){
1889+
#[test]
1890+
fn item_macro_workaround(){
18811891
run_renaming_test(
18821892
&("macro_rules! item { ($i:item) => {$i}}
18831893
struct Entries;
@@ -1961,7 +1971,8 @@ mod test {
19611971
}
19621972
}
19631973

1964-
#[test] fn fmt_in_macro_used_inside_module_macro() {
1974+
#[test]
1975+
fn fmt_in_macro_used_inside_module_macro() {
19651976
let crate_str = "macro_rules! fmt_wrap(($b:expr)=>($b.to_string()));
19661977
macro_rules! foo_module (() => (mod generated { fn a() { let xx = 147; fmt_wrap!(xx);}}));
19671978
foo_module!();

0 commit comments

Comments
 (0)