Comment

Comment by finnyspade

22:34 error: the trait `core::fmt::Debug` is not implemented for the type `T` [E0277]

22 println!("trait: {:?}", i);

This error message is fantastic! On line 22, i is of type T which does not implement Debug. The hint is off, but the actual error is super useful.

Turns out if you google "Rust e0277" which is the error code he got, this is the top result: https://users.rust-lang.org/t/generics-or-how-do-i-solve-an-...

Which contains the same solution to his problem.

TL;DR Nothing to see here, just a case of "let me google that for you"

parent finnyspade 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton