4951e3ad9e
When evaluating an `ExprKind::Call`, we first have to `check_expr` on it's callee. When this one is a `ExprKind::Path`, we had to evaluate the bounds introduced for its arguments, but by the time we evaluated them we no longer had access to the argument spans. Now we special case this so that we can point at the right place on unsatisfied bounds. This also allows the E0277 deduplication to kick in correctly, so we now emit fewer errors.
8 lines
173 B
Rust
8 lines
173 B
Rust
// Test that moves of unsized values within closures are caught
|
|
// and rejected.
|
|
|
|
fn main() {
|
|
(|| Box::new(*(&[0][..])))();
|
|
//~^ ERROR the size for values of type
|
|
}
|