warning: unused import: `cliargs::Cmd`
--> tests/compile_errors/lifetime_of_cmd_args.rs:1:5
|
1 | use cliargs::Cmd;
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
error[E0515]: cannot return value referencing local variable `cmd`
--> tests/compile_errors/lifetime_of_cmd_args.rs:12:9
|
8 | let args = cmd.args();
| --- `cmd` is borrowed here
...
12 | arg1
| ^^^^ returns a value referencing data owned by the current function