-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-documenting-cargo-itselfArea: Cargo's documentationArea: Cargo's documentationC-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: Easy
Description
The code is obviously silly, but I did run into the essential problem genuinely:
fn foo(f: impl Fn()) {
f();
foo(&f);
}
fn main() {
foo(|| {});
}
cargo check
does mention unconditional recursion although that's not the real problem and that warning can be dodged (without fixing cargo build
) by making the code a little more complicated.
I had assumed that cargo check
passing where cargo build
failed was a bug, but I've been told by @dtolnay that that's not quite true. He did say to file the bug anyway?
cargo 1.42.1, rustc 1.42.0
Metadata
Metadata
Assignees
Labels
A-documenting-cargo-itselfArea: Cargo's documentationArea: Cargo's documentationC-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: Easy