-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Description
Take code like this:
<<<<<<< HEAD
fn foo() -> Foo { }
=======
pub fn foo() -> Foo { }
>>>>>>> something
Outside macros and strings, this kind of thing will always fail to parse (seven equals signs in a row is always illegal), though the precise errors it will fail with will vary depends on the context.
It’d be nice if the compiler, on detecting a syntax error caused by merge conflict markers, gave a friendlier error message, something like this:
error: file contains merge conflict markers
--> <anon>:1:1
|
1 | <<<<<<< HEAD
| ^^^^^^^ merge conflict marker here
(Inspiration: Perl 5.26.0 produces a syntax error like “Version control conflict marker at line 123” thanks to https://rt.perl.org/Public/Bug/Display.html?id=127993.)
Metadata
Metadata
Assignees
Labels
No labels