Closed
Description
I ran across this implementing a one-time-use struct for a diesel query.
I incorrectly get a warning:
warning: struct is never used: `Foo`
when compiling
trait SomeTrait {}
struct Foo {
s: String
}
impl SomeTrait for Foo {}
fn main() {
let Foo { s } = get_thing();
println!("{}", s);
}
fn get_thing<T: SomeTrait>() -> T {
unimplemented!()
}
I got this is on 1.27.0 stable, and verified still exists on 1.29.0-nightly (2018-07-10). I didn't find another issue that looked like the same thing, so hopefully this isn't a duplicate :).
Metadata
Metadata
Assignees
Labels
No labels