{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/rust/issues/37369","repository_url":"https://api.github.com/repos/rust-lang/rust","labels_url":"https://api.github.com/repos/rust-lang/rust/issues/37369/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/rust/issues/37369/comments","events_url":"https://api.github.com/repos/rust-lang/rust/issues/37369/events","html_url":"https://github.com/rust-lang/rust/pull/37369","id":184727996,"number":37369,"title":"Show multiline spans in full if short enough","user":{"login":"estebank","id":1606434,"avatar_url":"https://avatars.githubusercontent.com/u/1606434?v=3","gravatar_id":"","url":"https://api.github.com/users/estebank","html_url":"https://github.com/estebank","followers_url":"https://api.github.com/users/estebank/followers","following_url":"https://api.github.com/users/estebank/following{/other_user}","gists_url":"https://api.github.com/users/estebank/gists{/gist_id}","starred_url":"https://api.github.com/users/estebank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estebank/subscriptions","organizations_url":"https://api.github.com/users/estebank/orgs","repos_url":"https://api.github.com/users/estebank/repos","events_url":"https://api.github.com/users/estebank/events{/privacy}","received_events_url":"https://api.github.com/users/estebank/received_events","type":"User","site_admin":false},"labels":[{"id":211668100,"url":"https://api.github.com/repos/rust-lang/rust/labels/T-compiler","name":"T-compiler","color":"bfd4f2","default":false}],"state":"open","locked":false,"assignee":{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false},"assignees":[{"login":"nikomatsakis","id":155238,"avatar_url":"https://avatars.githubusercontent.com/u/155238?v=3","gravatar_id":"","url":"https://api.github.com/users/nikomatsakis","html_url":"https://github.com/nikomatsakis","followers_url":"https://api.github.com/users/nikomatsakis/followers","following_url":"https://api.github.com/users/nikomatsakis/following{/other_user}","gists_url":"https://api.github.com/users/nikomatsakis/gists{/gist_id}","starred_url":"https://api.github.com/users/nikomatsakis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikomatsakis/subscriptions","organizations_url":"https://api.github.com/users/nikomatsakis/orgs","repos_url":"https://api.github.com/users/nikomatsakis/repos","events_url":"https://api.github.com/users/nikomatsakis/events{/privacy}","received_events_url":"https://api.github.com/users/nikomatsakis/received_events","type":"User","site_admin":false}],"milestone":null,"comments":13,"created_at":"2016-10-24T00:43:39Z","updated_at":"2016-11-15T19:42:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rust-lang/rust/pulls/37369","html_url":"https://github.com/rust-lang/rust/pull/37369","diff_url":"https://github.com/rust-lang/rust/pull/37369.diff","patch_url":"https://github.com/rust-lang/rust/pull/37369.patch"},"body":"# When dealing with multiline spans that span few lines, show the complete\n\nspan instead of restricting to the first character of the first line.\n\nFor example, instead of:\n\n```\n% ./rustc file2.rs\nerror[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied\n  --> file2.rs:13:9\n   |\n13 |    foo(1 + bar(x,\n   |        ^ trait `{integer}: std::ops::Add<()>` not satisfied\n   |\n```\n\nshow\n\n```\n% ./rustc file2.rs\nerror[E0277]: the trait bound `{integer}: std::ops::Add<()>` is not satisfied\n  --> file2.rs:13:9\n   |\n13 |      foo(1 + bar(x,\n   |  ________^ starting here...\n14 | |            y),\n   | |_____________^ ...ending here: trait `{integer}: std::ops::Add<()>` not satisfied\n   |\n```\n\nThe [proposal in internals](https://internals.rust-lang.org/t/proposal-for-multiline-span-comments/4242/6) outlines the reasoning behind this.\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/rust/issues/comments/260745174","html_url":"https://github.com/rust-lang/rust/pull/37369#issuecomment-260745174","issue_url":"https://api.github.com/repos/rust-lang/rust/issues/37369","id":260745174,"user":{"login":"estebank","id":1606434,"avatar_url":"https://avatars.githubusercontent.com/u/1606434?v=3","gravatar_id":"","url":"https://api.github.com/users/estebank","html_url":"https://github.com/estebank","followers_url":"https://api.github.com/users/estebank/followers","following_url":"https://api.github.com/users/estebank/following{/other_user}","gists_url":"https://api.github.com/users/estebank/gists{/gist_id}","starred_url":"https://api.github.com/users/estebank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/estebank/subscriptions","organizations_url":"https://api.github.com/users/estebank/orgs","repos_url":"https://api.github.com/users/estebank/repos","events_url":"https://api.github.com/users/estebank/events{/privacy}","received_events_url":"https://api.github.com/users/estebank/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T19:42:32Z","updated_at":"2016-11-15T19:42:32Z","body":"> In particular, you can just cherry-pick this commit\r\n\r\nAwesome!\r\n> Then you put in the expected output. You can see that the nested cases look a bit odd.\r\n\r\nIt actually looks exactly how I expected it to look, as in, failing in the exact ways I expected it to be failing :)\r\n```\r\n--> test.rs:3:3\r\n  |\r\n3 |      X0 Y0\r\n  |  _______- starting here...\r\n  |      |\r\n  |      starting here...\r\n4 | ||   X1 Y1\r\n  | |________- ...ending here: `Y` is a good letter too\r\n  |       |\r\n  |       ...ending here: `X` is a good letter\r\n```\r\n\r\nI would like to arrive with you to what the appropriate output for this case would be, where the multispans start (or end) both on the same line. I'm thinking something along the lines of:\r\n\r\n```\r\n--> test.rs:3:3\r\n  |\r\n3 |      X0 Y0\r\n  |  _______- starting here...\r\n  | | ___|\r\n  | ||   starting here...\r\n4 | ||   X1 Y1\r\n  | |+_______- ...ending here: `Y` is a good letter too\r\n  |  |____|\r\n  |       ...ending here: `X` is a good letter\r\n```\r\nor\r\n\r\n```\r\n--> test.rs:3:3\r\n  |\r\n3 |      X0 Y0\r\n  |  ____-__- starting here...\r\n  | ||   |\r\n  | ||   starting here...\r\n4 | ||   X1 Y1\r\n  | |⊥___-___- ...ending here: `Y` is a good letter too\r\n  |       |\r\n  |       ...ending here: `X` is a good letter\r\n```\r\n\r\nBoth cases seem a bit messy, to honest.\r\n\r\nThis might be not as accurate but more composable:\r\n```\r\n--> test.rs:3:3\r\n  |\r\n3 |      X0 Y0\r\n  | ++   -  - starting here...\r\n  | ||   |\r\n  | ||   starting here...\r\n4 | ||   X1 Y1\r\n  | ++   -   - ...ending here: `Y` is a good letter too\r\n  |       |\r\n  |       ...ending here: `X` is a good letter\r\n```"}}
{"actor":{"display_login":"estebank"}}