rust/tests/ui/lint/unused/unused-supertrait.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
233 B
Rust
Raw Normal View History

#![deny(unused_must_use)]
fn it() -> impl ExactSizeIterator<Item = ()> {
let x: Box<dyn ExactSizeIterator<Item = ()>> = todo!();
x
}
fn main() {
it();
//~^ ERROR unused implementer of `Iterator` that must be used
}