mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-16 14:07:04 +00:00
Add a test for issue 1211, showing it's no longer an issue.
Since rustfmt has moved away from syntex the overflow seen in issue 1211 is no longer a problem. This commit adds a test to verify that.
This commit is contained in:
parent
6c9ee313a2
commit
f3ceb54d3a
15
tests/source/issue-1211.rs
Normal file
15
tests/source/issue-1211.rs
Normal file
@ -0,0 +1,15 @@
|
||||
fn main() {
|
||||
for iface in &ifaces {
|
||||
match iface.addr {
|
||||
get_if_addrs::IfAddr::V4(ref addr) => {
|
||||
match addr.broadcast {
|
||||
Some(ip) => {
|
||||
sock.send_to(&buf, (ip, 8765)).expect("foobar");
|
||||
}
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
_ => ()
|
||||
};
|
||||
}
|
||||
}
|
13
tests/target/issue-1211.rs
Normal file
13
tests/target/issue-1211.rs
Normal file
@ -0,0 +1,13 @@
|
||||
fn main() {
|
||||
for iface in &ifaces {
|
||||
match iface.addr {
|
||||
get_if_addrs::IfAddr::V4(ref addr) => match addr.broadcast {
|
||||
Some(ip) => {
|
||||
sock.send_to(&buf, (ip, 8765)).expect("foobar");
|
||||
}
|
||||
_ => (),
|
||||
},
|
||||
_ => (),
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user