Answers to StackOverflow's top Rust programming questions explained

Опубликовано: 14 Апрель 2026
на канале: timClicks
3,243
101

If you're learning Rust, you've probably wanted answers to these questions. The video is a recorded live stream with lots of discussion.


Timeline

00:00 Welcome and introduction
02:29 What are the differences between String and &str?
18:40 Why do we need an ampersand (&) when dealing with str?
19:40 Language Server Protocol (LSP) support in Rust
21:40 How to create a function that accepts a String or a str
35:26 Why doesn't println! work in Rust's unit tests?
39:20 Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?
44:40 How to disable unused code warnings in Rust?
47:20 How to I print the type of a variable in Rust?
52:07 Do I have any tips for starting with Rust programming from scratch?
55:50 What are "generics"?
58:17 What is a "trait"?



Here are direct links to the questions


SO questions tagged rust https://stackoverflow.com/questions/t...
What are the differences between String and &str? https://stackoverflow.com/q/24158114/...
Why doesn't println! work in Rust's unit tests? https://stackoverflow.com/q/25106554/...
Why does the Rust compiler not optimize code assuming that two mutable references cannot alias? https://stackoverflow.com/q/57259126/...
How to disable unused code warnings in Rust? https://stackoverflow.com/q/25877285/...
How do I print the type of a variable in Rust? https://stackoverflow.com/q/21747136/...







About the speaker

Tim McNamara is the author of Rust in Action https://manning.com/books/rust-in-action. Follow Tim on Twitter   / timclicks   and watch future tutorials live on Twitch   / timclicks