mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
a9841936fe
Change the implicit `Sized` `Obligation` `Span` for call expressions to include the whole expression. This aids the existing deduplication machinery to reduce the number of errors caused by a single unsized expression.
27 lines
608 B
Rust
27 lines
608 B
Rust
fn main() {
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
for _ in false {}
|
|
//~^ ERROR `bool` is not an iterator
|
|
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
|
|
other()
|
|
}
|
|
|
|
pub fn other() {
|
|
// check errors are still reported globally
|
|
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
//~| ERROR `()` is not an iterator
|
|
|
|
let _ = Iterator::next(&mut ());
|
|
//~^ ERROR `()` is not an iterator
|
|
|
|
for _ in false {}
|
|
//~^ ERROR `bool` is not an iterator
|
|
}
|