Skip to content

Make diff conflict marker error higher priority than unclosed delimeter #116252

Closed
@joshka

Description

@joshka

I tried this code:

mod tests {
    #[test]
<<<<<<< HEAD
    fn test1() {
=======
    fn test2() {
>>>>>>> 7a4f13c blah blah blah
    }
}

I expected to see this happen: explanation
error: encountered diff marker

Instead, this happened: explanation
error: this file contains an unclosed delimiter

Meta

rustc --version --verbose:

rustc 1.72.1 (d5c2e9c34 2023-09-13)
binary: rustc
commit-hash: d5c2e9c342b358556da91d61ed4133f6f50fc0c3
commit-date: 2023-09-13
host: aarch64-apple-darwin
release: 1.72.1
LLVM version: 16.0.5

Metadata

Metadata

Assignees

Labels

A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.D-terseDiagnostics: An error or lint that doesn't give enough information about the problem at hand.E-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions