mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 23:34:48 +00:00
21 lines
378 B
Rust
21 lines
378 B
Rust
pub enum ErrorHandled {
|
|
Reported,
|
|
TooGeneric,
|
|
}
|
|
|
|
impl ErrorHandled {
|
|
pub fn assert_reported(self) {
|
|
match self {
|
|
ErrorHandled::Reported => {}
|
|
ErrorHandled::TooGeneric => panic!(),
|
|
}
|
|
}
|
|
}
|
|
|
|
fn struct_generic(x: Vec<i32>) {
|
|
for v in x {
|
|
println!("{}", v);
|
|
}
|
|
}
|
|
} //~ ERROR unexpected closing delimiter: `}`
|