Top "Rust" questions

Rust is a systems programming language without a garbage collector focused on three goals: safety, speed, and concurrency.

What is the r#""# operator in Rust?

I saw the operator r#"" in Rust but I can't find what it does. It came in handy for creating …

string rust syntax string-literals
What is the difference between Copy and Clone?

This issue seems to imply it's just an implementation detail (memcpy vs ???), but I can't find any explicit description of …

rust
How do I create a Vec from a range and shuffle it?

I have the following code: extern crate rand; use rand::{thread_rng, Rng}; fn main() { let mut vec: Vec<…

iterator immutability rust mutability
Cargo build hangs with " Blocking waiting for file lock on the registry index" after building parity from source

I followed the readme instructions for building Parity from source and then I execute this command: cargo build --release and …

rust rust-cargo
The trait cannot be made into an object

I have the following code: extern crate futures; // 0.1.24 use futures::Future; use std::io; struct Context; pub trait MyTrait { fn …

generics rust traits dynamic-dispatch trait-objects
PostgreSQL authentication method 10 not supported

I'm trying to follow the diesel.rs tutorial using PostgreSQL. When I get to the Diesel setup step, I get …

postgresql rust rust-diesel
How to execute cargo test using the nightly channel?

I'm trying to run my tests with nightly Rust using Windows Powershell. I run cargo test in the directory, and …

rust rust-cargo
How to read an integer input from the user in Rust 1.0?

Existing answers I've found are all based on from_str (such as Reading in user input from console once efficiently), …

input integer rust user-input
When does a closure implement Fn, FnMut and FnOnce?

What are the specific conditions for a closure to implement the Fn, FnMut and FnOnce traits? That is: When does …

rust closures
How to raise a number to a power?

I was trying to raise an integer to a power using the caret operator (^), but I am getting surprising results, …

rust operators exponentiation