blob: 950ee9d9e0b1cee041ed5b61151a2350762a421a [file]
//! Regression test for <https://github.com/rust-lang/rust/issues/21332>.
//! Ensure multi-line error formatting for "method has incompatible type for trait" diagnostics.
struct S;
impl Iterator for S {
type Item = i32;
fn next(&mut self) -> Result<i32, i32> { Ok(7) }
//~^ ERROR method `next` has an incompatible type for trait
//~| NOTE expected `Option<i32>`, found `Result<i32, i32>`
//~| NOTE expected signature `fn(&mut S) -> Option<i32>`
}
fn main() {}