Warning
This post was published 111 days ago. The information described in this article may have changed.
Label ’b
fails. I suspect it's quite simple. I tried different variations, none of them worked - I don't have a plan. Because of this crate I get even more gray hair.
use num_bigint::BigInt;
#[allow(unused_labels, unused_variables)]
fn main() {
'a: {
let gizmo = vec![1, 2, 3, 4, 5];
for i in gizmo {
match i {
3 => println!("gotcha!"),
_ => eprintln!("fuba!"),
}
}
println!();
}
'b: {
let gizmo: Vec<BigInt> = vec![
BigInt::from(1),
BigInt::from(2),
BigInt::from(3),
BigInt::from(4),
BigInt::from(3),
];
// for i in gizmo {
// match i {
// 3 => println!("gotcha!"),
// _ => eprintln!("fuba!"),
// }
// }
// println!();
}
}
4 posts - 3 participants
🏷️ rust_feed