EG
Size: a a a
EG
p
EG
fn foo() -> impl std::fmt::Debug {
todo!()
}
p
fn foo() -> impl std::fmt::Debug {
todo!()
}
p
rust
fn foo() -> impl std::fmt::Debug {
unimplemented!()
}
fn main() {}
warning: function is never used: `foo`
--> 488091232/source.rs:1:1
|
1 | fn foo() -> impl std::fmt::Debug {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
EG
EG
EG
EG
rust
fn foo() -> impl std::fmt::Display {
unimplemented!()
}
fn main() {}
error[E0277]: `()` doesn't implement `std::fmt::Display`
--> 1789598808/source.rs:1:13
|
1 | fn foo() -> impl std::fmt::Display {
| ^^^^^^^^^^^^^^^^^^^^^^ `()` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `()`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: the return type of a function must have a statically known size
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
p
p
EG
EG
p
p
p
p
EG
EG