Closed
Description
trait Abc {
fn abc<'tcx>(&self);
}
struct MyAbc;
impl Abc for MyAbc {
// vv this lifetime parameter doesn't exist in the original trait
fn abc<'a, 'tcx>(&self) {}
}
Errors:
Compiling playground v0.0.1 (/playground)
warning: struct is never constructed: `MyAbc`
--> src/lib.rs:5:1
|
5 | struct MyAbc;
| ^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
Finished dev [unoptimized + debuginfo] target(s) in 0.40s