{"push_id":936293377,"size":2,"distinct_size":0,"ref":"refs/heads/master","head":"a70a60a02bca4c1fb75a0eb0ecf80acb73972f66","before":"d8869d3487a569b4a6b86c1b585cc15db48abc4a","commits":[{"sha":"acc9428c6a99d199f35032ec7f794385e4c9fd24","author":{"email":"0c8c03ff20efd38c335b4009534673cbd5bd5bf3@gmail.com","name":"Greg Chapple"},"message":"Display better snippet for invalid char literal\n\nGiven this code:\n\n    fn main() {\n        let _ = 'abcd';\n    }\n\nThe compiler would give a message like:\n\n    error: character literal may only contain one codepoint: ';\n    let _ = 'abcd';\n                 ^~\n\nWith this change, the message now displays:\n\n    error: character literal may only contain one codepoint: 'abcd'\n    let _ = 'abcd'\n            ^~~~~~\n\nFixes #30033","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/acc9428c6a99d199f35032ec7f794385e4c9fd24"},{"sha":"a70a60a02bca4c1fb75a0eb0ecf80acb73972f66","author":{"email":"3a2c29237f73c7cf88424b80e427b1884f346b35@rust-lang.org","name":"bors"},"message":"Auto merge of #30763 - gchp:issue/30033, r=nagisa\n\nThis is achieved by adding the scan_back method. This method looks back\nthrough the source_text of the StringReader until it finds the target\nchar, returning it's offset in the source. We use this method to find\nthe offset of the opening single quote, and use that offset as the start\nof the error.\n\nGiven this code:\n\n```rust\nfn main() {\n    let _ = 'abcd';\n}\n```\n\nThe compiler would give a message like:\n\n```\nerror: character literal may only contain one codepoint: ';\nlet _ = 'abcd';\n             ^~\n```\nWith this change, the message now displays:\n\n```\nerror: character literal may only contain one codepoint: 'abcd';\nlet _ = 'abcd';\n        ^~~~~~~\n```\n\nFixes #30033","distinct":false,"url":"https://api.github.com/repos/rust-lang/rust/commits/a70a60a02bca4c1fb75a0eb0ecf80acb73972f66"}]}