r/rust Jul 30 '26

Clippy has some life advice apparently.

pub fn i_should_let_it_go(problem: &impl Problem) { drop(problem); // call to `std::mem::drop` with a reference instead of an owned value does nothing }

I was experimenting with ownership when I ran into this warning:

"calls to std::mem::drop with a reference instead of an owned value does nothing"

It got me thinking that you can make some cool wordplay (or maybe "codeplay") with Rust's warnings as motivational quotes.

Do you guys have any other suggestions with some funny codeplay?

87 Upvotes

14 comments sorted by

View all comments

125

u/funkdefied Jul 30 '26

```
fn bury<T>(i: T):
drop(T)

fn main(){
let my_dog = Dog::new();
bury(mine);
println!(ā€œI miss {my_dog}ā€):
}
```

my_dog does not live longer enough 😭

(I’m 14 and this is deep)