-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
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
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTD-confusingDiagnostics: Confusing error or lint that should be reworked.Diagnostics: Confusing error or lint that should be reworked.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.