Closed
Description
Given the following code: Playground link
use std::sync::{Arc, Mutex};
pub struct Foo {
a: Mutex<usize>,
b: Arc<Mutex<usize>, // an not-ok line
c: Arc<Mutex<usize>>, // an ok line
}
The current output is:
error: expected one of `>`, a const expression, lifetime, or type, found `}`
--> src/lib.rs:7:1
|
6 | c: Arc<Mutex<usize>>, // an ok line
| - expected one of `>`, a const expression, lifetime, or type
7 | }
| ^ unexpected token
Ideally the output should look like:
error: expected one of `>`, a const expression, lifetime, or type, found `}`
--> src/lib.rs:6:1
|
5 | b: Arc<Mutex<usize>, // an not-ok line
| - expected one of `>`, a const expression, lifetime, or type
6 | }
| ^ unexpected token