In #28864, @aarzee submitted some whitespace fixes. I r+'d it. But
@retp998 noticed[1] that this file is explicitly a test of this kind of
whitespace, and so I shouldn't have changed it. This restores the old
line endings.
1: https://github.com/rust-lang/rust/pull/28864#discussion_r41332279
// ignore-tidy-cr ignore-license\r
// ignore-tidy-cr (repeated again because of tidy bug)\r
// license is ignored because tidy can't handle the CRLF here properly.\r
// ignore-tidy-cr ignore-license\r
// ignore-tidy-cr (repeated again because of tidy bug)\r
// license is ignored because tidy can't handle the CRLF here properly.\r
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r
// file at the top-level directory of this distribution and at\r
// http://rust-lang.org/COPYRIGHT.\r
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT\r
// file at the top-level directory of this distribution and at\r
// http://rust-lang.org/COPYRIGHT.\r
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\r
// option. This file may not be copied, modified, or distributed\r
// except according to those terms.\r
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your\r
// option. This file may not be copied, modified, or distributed\r
// except according to those terms.\r
// NB: this file needs CRLF line endings. The .gitattributes file in\r
// this directory should enforce it.\r
// NB: this file needs CRLF line endings. The .gitattributes file in\r
// this directory should enforce it.\r
/// Doc comment that ends in CRLF\r
pub fn foo() {}\r
/// Doc comment that ends in CRLF\r
pub fn foo() {}\r
/** Block doc comment that\r
* contains CRLF characters\r
*/\r
pub fn bar() {}\r
/** Block doc comment that\r
* contains CRLF characters\r
*/\r
pub fn bar() {}\r
fn main() {\r
let s = "string\r
literal";\r
assert_eq!(s, "string\nliteral");\r
fn main() {\r
let s = "string\r
literal";\r
assert_eq!(s, "string\nliteral");\r
let s = "literal with \\r
escaped newline";\r
assert_eq!(s, "literal with escaped newline");\r
let s = "literal with \\r
escaped newline";\r
assert_eq!(s, "literal with escaped newline");\r
let s = r"string\r
literal";\r
assert_eq!(s, "string\nliteral");\r
let s = r"string\r
literal";\r
assert_eq!(s, "string\nliteral");\r
// validate that our source file has CRLF endings\r
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs");\r
assert!(source.contains("string\r\nliteral"));\r
// validate that our source file has CRLF endings\r
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs");\r
assert!(source.contains("string\r\nliteral"));\r