{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/36879","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/36879/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/36879/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/36879/events","html_url":"https://github.com/rust-lang/rust/issues/36879","id":180427847,"number":36879,"title":"Detect Merge Conflict Text","user":{"login":"Havvy","id":731722,"avatar_url":"https://avatars.githubusercontent.com/u/731722?v=3","gravatar_id":"","url":"https://api.github.com/users/Havvy","html_url":"https://github.com/Havvy","followers_url":"https://api.github.com/users/Havvy/followers","following_url":"https://api.github.com/users/Havvy/following{/other_user}","gists_url":"https://api.github.com/users/Havvy/gists{/gist_id}","starred_url":"https://api.github.com/users/Havvy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Havvy/subscriptions","organizations_url":"https://api.github.com/users/Havvy/orgs","repos_url":"https://api.github.com/users/Havvy/repos","events_url":"https://api.github.com/users/Havvy/events{/privacy}","received_events_url":"https://api.github.com/users/Havvy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-diagnostics","name":"A-diagnostics","color":"d7e102"},{"url":"https://api.github.com/repos/rust-lang/rust/labels/A-parser","name":"A-parser","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-10-01T00:36:24Z","updated_at":"2016-10-09T17:29:34Z","closed_at":null,"body":"I saw a tweet about [git merge conflict text](https://twitter.com/badedgecases/status/781928309059969029) in source code, and wondered what the Rust compiler does. As such, I created a [play.rust-lang.org sample](https://is.gd/mrisrn).\r\n\r\nIt currently detects more than two equals in a row, doesn't know what it means, and bails. Specifically, it looks like this:\r\n\r\n```\r\nrustc 1.12.0 (3191fbae9 2016-09-23)\r\nerror: expected one of `!`, `+`, `->`, `::`, `>`, or `as`, found `==`\r\n --> <anon>:4:1\r\n  |\r\n4 | =======\r\n  | ^^\r\n\r\nerror: aborting due to previous error\r\n```\r\n\r\nI propose that when this happens, the compiler should look for the git merge conflict issues, and if it finds it, give a specific error message related to what is actually happening.\r\n\r\nThe error message could show the start and end of the merge sections, and actually give searchable text for what this strange textual artifact is for those who've never seen it before.\r\n\r\nFor an example of how it'd look:\r\n\r\n```\r\nerror: Merge conflict detected.\r\n --> <anon>:2:1\r\n  |\r\n2 |<<<<<<< HEAD\r\n  |^^^^^^^^^^^^ Note: Beginning of commit HEAD here.\r\n  |\r\n4 | =======\r\n  | ^^^^^^^ Note: Divider between commits HEAD and ab890fb here.\r\n  |\r\n5 |>>>>>>> ab890fb\r\n  |^^^^^^^^^^^^^^^ Note: End of commit ab890fb here.\r\n\r\nerror: aborting due to previous error\r\n```\r\n\r\nThe only con I can think of is that we're specifically caring about the semantics of one tool that isn't really related to Rust. But at the same time, git is widely used."},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/252499866","html_url":"https://github.com/rust-lang/rust/issues/36879#issuecomment-252499866","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/36879","id":252499866,"user":{"login":"jfirebaugh","id":98601,"avatar_url":"https://avatars.githubusercontent.com/u/98601?v=3","gravatar_id":"","url":"https://api.github.com/users/jfirebaugh","html_url":"https://github.com/jfirebaugh","followers_url":"https://api.github.com/users/jfirebaugh/followers","following_url":"https://api.github.com/users/jfirebaugh/following{/other_user}","gists_url":"https://api.github.com/users/jfirebaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/jfirebaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfirebaugh/subscriptions","organizations_url":"https://api.github.com/users/jfirebaugh/orgs","repos_url":"https://api.github.com/users/jfirebaugh/repos","events_url":"https://api.github.com/users/jfirebaugh/events{/privacy}","received_events_url":"https://api.github.com/users/jfirebaugh/received_events","type":"User","site_admin":false},"created_at":"2016-10-09T17:29:34Z","updated_at":"2016-10-09T17:29:34Z","body":"Duplicate of #32059."}}
{"actor":{"display_login":"jfirebaugh"}}