Skip to content

Clean newlines #28864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 6, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Read ["Installing Rust"] from [The Book].
```sh
# Update package mirrors (may be needed if you have a fresh install of MSYS2)
$ pacman -Sy pacman-mirrors

# Choose one based on platform:
$ pacman -S mingw-w64-i686-toolchain
$ pacman -S mingw-w64-x86_64-toolchain
Expand Down
1 change: 0 additions & 1 deletion src/doc/nomicon/ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ does in fact live as long as we needed. However it was *changed* while we had
a reference into it. This is why Rust requires any references to freeze the
referent and its owners.


10 changes: 0 additions & 10 deletions src/doc/trpl/ownership.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,3 @@ complicated.
Luckily, Rust offers a feature, borrowing, which helps us solve this problem.
It’s the topic of the next section!











4 changes: 2 additions & 2 deletions src/doc/trpl/references-and-borrowing.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,15 +363,15 @@ note: reference must be valid for the block suffix following statement 0 at
let y: &i32;
let x = 5;
y = &x;

println!("{}", y);
}

note: ...but borrowed value is only valid for the block suffix following
statement 1 at 3:14
let x = 5;
y = &x;

println!("{}", y);
}
```
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/ChangeLog.jit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

* configure.ac: Add --enable-host-shared.
* configure: Regenerate.

Copyright (C) 2013-2014 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/backtrace-supported.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ met:
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/backtrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/backtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/btest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.

# (3) The name of the author may not be used to
# endorse or promote products derived from this software without
# specific prior written permission.
Expand Down
6 changes: 3 additions & 3 deletions src/libbacktrace/dwarf.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down Expand Up @@ -1605,7 +1605,7 @@ read_line_header (struct backtrace_state *state, struct unit *u,

if (!advance (line_buf, hdrlen))
return 0;

hdr->min_insn_len = read_byte (&hdr_buf);
if (hdr->version < 4)
hdr->max_ops_per_insn = 1;
Expand All @@ -1614,7 +1614,7 @@ read_line_header (struct backtrace_state *state, struct unit *u,

/* We don't care about default_is_stmt. */
read_byte (&hdr_buf);

hdr->line_base = read_sbyte (&hdr_buf);
hdr->line_range = read_byte (&hdr_buf);

Expand Down
14 changes: 7 additions & 7 deletions src/libbacktrace/dwarf2.def
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,27 @@

/* This file declares various DWARF-related constants using a set of
macros which can be redefined by the including file.

The macros are in sections. Each section corresponds to a single
set of DWARF constants and has a corresponding key. The key is
used in all the macro names.

The sections are TAG (for DW_TAG_ constants), FORM (DW_FORM_), AT
(DW_AT_), OP (DW_OP_), ATE (DW_ATE_), and CFA (DW_CFA_).

Using TAG as an example, the following macros may be used for each
key:

DW_FIRST_TAG(name, value) - Introduce the first DW_TAG constant.

DW_TAG(name, value) - Define a subsequent constant.

DW_TAG_DUP(name, value) - Define a subsequent constant whose value
is a duplicate of some other constant. Not all keys use the _DUP
macro form. If more than one name shares a value, then the base
(DW_TAG) form will be the preferred name and DW_TAG_DUP will hold
any alternate names.

DW_END_TAG - Invoked at the end of the DW_TAG constants. */

DW_FIRST_TAG (DW_TAG_padding, 0x00)
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/dwarf2.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ enum dwarf_macro_record_type
DW_MACRO_GNU_lo_user = 0xe0,
DW_MACRO_GNU_hi_user = 0xff
};

/* @@@ For use with GNU frame unwind information. */

#define DW_EH_PE_absptr 0x00
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/fileline.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/mmapio.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/nounwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/read.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/state.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/stest.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
2 changes: 1 addition & 1 deletion src/libbacktrace/unknown.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ modification, are permitted provided that the following conditions are
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.

(3) The name of the author may not be used to
endorse or promote products derived from this software without
specific prior written permission.
Expand Down
1 change: 0 additions & 1 deletion src/libstd/os/freebsd/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,3 @@ mod arch {
}
}


1 change: 0 additions & 1 deletion src/test/compile-fail/transmute-imut-to-mut.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ fn main() {
//~^ ERROR mutating transmuted &mut T from &T may cause undefined behavior
}


1 change: 0 additions & 1 deletion src/test/run-pass/issue-11577.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ignore-tidy-cr ignore-license
// ignore-tidy-cr (repeated again because of tidy bug)
// license is ignored because tidy can't handle the CRLF here properly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No! Not this file! This test is specifically supposed to use crlf! This is changing the blank lines from \r\n to \n!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhhhh eff. @Aarzee can you send a PR fixing this?

// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
Expand All @@ -11,33 +11,33 @@
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// NB: this file needs CRLF line endings. The .gitattributes file in
// this directory should enforce it.

// ignore-pretty

/// Doc comment that ends in CRLF
pub fn foo() {}

/** Block doc comment that
* contains CRLF characters
*/
pub fn bar() {}

fn main() {
let s = "string
literal";
assert_eq!(s, "string\nliteral");

let s = "literal with \
escaped newline";
assert_eq!(s, "literal with escaped newline");

let s = r"string
literal";
assert_eq!(s, "string\nliteral");

// validate that our source file has CRLF endings
let source = include_str!("lexer-crlf-line-endings-string-literal-doc-comment.rs");
assert!(source.contains("string\r\nliteral"));
Expand Down