-
```rust
fn foo(_: &mut String) {}
fn bug1() {
let _ = |a: &mut String| for _ in 0..0 {
foo(a)
}; //works fine
let _ = |a| for _ in 0..0 {
foo(a)
}; //fails
}…
-
```rust
pub trait Constant: From + Into + Copy + Eq + Ord {
type Value;
}
```
([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=21e235bb28d5fe4e17898e344…
-
The current syntax rules do not allow for trait functions to destructure parameters:
```
#![allow(unused)]
// This works
fn foo((x, y): (i32, i32)) {
}
trait Bar {
// This does not work…
-
(moved (again) from https://github.com/rust-lang/rust/issues/79405)
With the following code:
```rust
fn f(vec: &Vec) {
vec.push(5);
}
```
I get a suggestion to "change this to a mutable r…
-
In , jonh discovered that this code
([Godbolt](https://godbolt.org/z/ddnrPGsrz), [playground](https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=f0dabcb9596b56a48463648c72248…
-
Feature gate: `#![feature(hint_must_use)]`
This is a tracking issue for the function `core::hint::must_use`
### Public API
```rust
// core::hint
#[must_use]
pub const fn must_use(value: …
-
# ⭐ Suggestion
It'd be really nice to be able to have some sort of interactive REPL where the program pauses on each node traversed and drops into a simple REPL console that lets you print out attr…
-
Given the following code:
```rust
async fn my_async_fn() {}
async fn foo() {
tokio::select! {
_ = &my_async_fn() => {},
}
}
```
[playground](https://play.rust-lang.org/?ve…
-
The following program, when compiled, gives rise to a misleading and unhelpful error message:
```
use std::io;
enum Error),
Value(usize)
}
impl Thing {
fn new() -> Self {
S…
-
Once `std::any::type_name` is stabilized, add the name to the message to be used for debugging.