3
我的代码:“特征绑定std :: fmt :: Display不满意”是什么意思?
extern crate time;
fn main() {
println!("{}", time::get_time());
}
我的错误是:
Error 'the trait bound time::Timespec: std::fmt::Display is not satisfied
我的代码:“特征绑定std :: fmt :: Display不满意”是什么意思?
extern crate time;
fn main() {
println!("{}", time::get_time());
}
我的错误是:
Error 'the trait bound time::Timespec: std::fmt::Display is not satisfied
非常感谢您的解释 –
@ДмитрийКомар也尝试阅读整个编译器错误。这不仅仅是噪声,它通常是非常有用的:'''注意:'time :: Timespec'不能使用默认的格式化程序进行格式化;如果您使用的是格式字符串,请尝试使用':?' –