Skip to content
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

Disallow double trailing newlines in tidy #60172

Merged
merged 3 commits into from
Apr 23, 2019
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
1 change: 0 additions & 1 deletion src/ci/docker/scripts/android-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,3 @@ abi="$(echo "${details}" | awk '{print($2)}')"
echo no | avdmanager create avd \
-n "$abi-$api" \
-k "system-images;android-$api;default;$abi"

1 change: 0 additions & 1 deletion src/ci/docker/scripts/musl-toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ cmake ../libunwind-release_$LLVM \
hide_output make -j$(nproc)
cp lib/libunwind.a $OUTPUT/$TARGET/lib
cd - && rm -rf libunwind-build

1 change: 0 additions & 1 deletion src/liballoc/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,4 +573,3 @@ impl str {
pub unsafe fn from_boxed_utf8_unchecked(v: Box<[u8]>) -> Box<str> {
Box::from_raw(Box::into_raw(v) as *mut str)
}

1 change: 0 additions & 1 deletion src/libcore/iter/adapters/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,3 @@ impl<A, B> FusedIterator for Chain<A, B>
unsafe impl<A, B> TrustedLen for Chain<A, B>
where A: TrustedLen, B: TrustedLen<Item=A::Item>,
{}

1 change: 0 additions & 1 deletion src/libcore/iter/traits/exact_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,3 @@ impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for &mut I {
(**self).is_empty()
}
}

1 change: 0 additions & 1 deletion src/libcore/num/flt2dec/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,3 @@ pub fn decode<T: DecodableFloat>(v: T) -> (/*negative?*/ bool, FullDecoded) {
};
(sign < 0, decoded)
}

1 change: 0 additions & 1 deletion src/libcore/ops/unsize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,3 @@ impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*const U> for *const T {}
// *mut T -> *mut U
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
impl<T: ?Sized+Unsize<U>, U: ?Sized> DispatchFromDyn<*mut U> for *mut T {}

1 change: 0 additions & 1 deletion src/libcore/tests/num/bignum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,4 +236,3 @@ fn test_fmt() {
assert_eq!(format!("{:?}", Big::from_u64(0x12345)), "0x1_23_45");
assert_eq!(format!("{:?}", Big::from_u64(0x123456)), "0x12_34_56");
}

1 change: 0 additions & 1 deletion src/libcore/tests/num/flt2dec/estimator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,3 @@ fn test_estimate_scaling_factor() {
assert_almost_eq!(estimate_scaling_factor(1, i as i16), expected as i16);
}
}

1 change: 0 additions & 1 deletion src/libcore/tests/num/flt2dec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1107,4 +1107,3 @@ pub fn to_exact_fixed_str_test<F>(mut f_: F)
format!("0.0000000000000000000099999999999999994515327145420957165172950370\
2787392447107715776066783064379706047475337982177734375{:0>79881}", ""));
}

1 change: 0 additions & 1 deletion src/libcore/tests/num/flt2dec/random.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,3 @@ fn exact_f64_random_equivalence_test() {
|d, buf| fallback(d, buf, i16::MIN), k, 1_000);
}
}

1 change: 0 additions & 1 deletion src/libcore/tests/num/flt2dec/strategy/dragon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,3 @@ fn test_to_exact_exp_str() {
fn test_to_exact_fixed_str() {
to_exact_fixed_str_test(format_exact);
}

1 change: 0 additions & 1 deletion src/libcore/tests/num/flt2dec/strategy/grisu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,3 @@ fn test_to_exact_exp_str() {
fn test_to_exact_fixed_str() {
to_exact_fixed_str_test(format_exact);
}

1 change: 0 additions & 1 deletion src/librustc/ich/hcx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,3 @@ pub fn hash_stable_trait_impls<'a, 'gcx, W>(
}
}
}

1 change: 0 additions & 1 deletion src/librustc/ich/impls_hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,4 +435,3 @@ impl<'hir> HashStable<StableHashingContext<'hir>> for attr::OptimizeAttr {
mem::discriminant(self).hash_stable(hcx, hasher);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,3 @@ impl<'a, 'gcx, 'tcx> NiceRegionError<'a, 'gcx, 'tcx> {
None
}
}

1 change: 0 additions & 1 deletion src/librustc/infer/type_variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,4 +444,3 @@ impl ut::UnifyKey for ty::TyVid {
fn from_index(i: u32) -> ty::TyVid { ty::TyVid { index: i } }
fn tag() -> &'static str { "TyVid" }
}

1 change: 0 additions & 1 deletion src/librustc/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,3 @@ macro_rules! EnumTypeFoldableImpl {
)
};
}

1 change: 0 additions & 1 deletion src/librustc/middle/free_region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,3 @@ impl<'a, 'gcx, 'tcx> RegionRelations<'a, 'gcx, 'tcx> {
self.free_regions.lub_free_regions(self.tcx, r_a, r_b)
}
}

1 change: 0 additions & 1 deletion src/librustc/session/search_paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ impl SearchPath {
SearchPath { kind, dir, files }
}
}

1 change: 0 additions & 1 deletion src/librustc/ty/inhabitedness/def_id_forest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,3 @@ impl<'a, 'gcx, 'tcx> DefIdForest {
ret
}
}

1 change: 0 additions & 1 deletion src/librustc/ty/inhabitedness/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,3 @@ impl<'a, 'gcx, 'tcx> TyS<'tcx> {
}
}
}

1 change: 0 additions & 1 deletion src/librustc_codegen_llvm/va_arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,3 @@ pub(super) fn emit_va_arg(
}
}
}

1 change: 0 additions & 1 deletion src/librustc_mir/borrow_check/nll/invalidation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,4 +502,3 @@ impl<'cg, 'cx, 'tcx, 'gcx> InvalidationGenerator<'cx, 'tcx, 'gcx> {
}
}
}

1 change: 0 additions & 1 deletion src/librustc_mir/borrow_check/nll/region_infer/dump_mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,3 @@ impl<'tcx> RegionInferenceContext<'tcx> {
Ok(())
}
}

1 change: 0 additions & 1 deletion src/libstd/os/android/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_blocks as u64
}
}

1 change: 0 additions & 1 deletion src/libstd/os/android/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,4 +217,3 @@ mod arch {
__unused: [c_long; 3],
}
}

1 change: 0 additions & 1 deletion src/libstd/os/bitrig/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_flags as u32
}
}

1 change: 0 additions & 1 deletion src/libstd/os/dragonfly/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,4 +131,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_lspare as u32
}
}

1 change: 0 additions & 1 deletion src/libstd/os/freebsd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_lspare as u32
}
}

1 change: 0 additions & 1 deletion src/libstd/os/ios/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_lspare as u32
}
}

1 change: 0 additions & 1 deletion src/libstd/os/macos/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,3 @@ impl MetadataExt for Metadata {
[qspare[0] as u64, qspare[1] as u64]
}
}

1 change: 0 additions & 1 deletion src/libstd/os/netbsd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_flags as u32
}
}

1 change: 0 additions & 1 deletion src/libstd/os/openbsd/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,3 @@ impl MetadataExt for Metadata {
self.as_inner().as_inner().st_flags as u32
}
}

1 change: 0 additions & 1 deletion src/libstd/sys_common/backtrace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,3 @@ fn output_fileline(w: &mut dyn Write,

w.write_all(b"\n")
}

1 change: 0 additions & 1 deletion src/libsyntax/test_snippet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1162,4 +1162,3 @@ error: foo

"#);
}

1 change: 0 additions & 1 deletion src/test/assembly/nvptx-internalizing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ pub unsafe extern "ptx-kernel" fn top_kernel(a: *const u32, b: *mut u32) {
// Verify that no extra function definitions are here.
// CHECK-NOT: .func
// CHECK-NOT: .entry

Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ pub fn exported_but_not_generic(x: i32) -> i64 {
fn not_exported_and_not_generic(x: u32) -> u64 {
x as u64
}

Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ pub fn exported_but_not_generic(x: i32) -> i64 {
fn not_exported_and_not_generic(x: u32) -> u64 {
x as u64
}

1 change: 0 additions & 1 deletion src/test/codegen/likely.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ pub fn check_unlikely(x: i32, y: i32) -> Option<i32> {
}
}
}

1 change: 0 additions & 1 deletion src/test/codegen/nounwind.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ pub fn foo() {
// CHECK: @bar() unnamed_addr #0
// CHECK: attributes #0 = { {{.*}}nounwind{{.*}} }
}

1 change: 0 additions & 1 deletion src/test/codegen/packed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,4 +152,3 @@ pub fn pkd2_nested_pair(pair1: &mut Packed2NestedPair, pair2: &mut Packed2Nested
// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 2 %{{.*}}, i8* align 2 %{{.*}}, i{{[0-9]+}} 8, i1 false)
*pair2 = *pair1;
}

1 change: 0 additions & 1 deletion src/test/codegen/union-abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,3 @@ pub union UnionBool { b:bool }
#[no_mangle]
pub fn test_UnionBool(b: UnionBool) -> bool { unsafe { b.b } }
// CHECK: %0 = trunc i8 %b to i1

1 change: 0 additions & 1 deletion src/test/debuginfo/should-fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ fn main() {
}

fn zzz() {()}

1 change: 0 additions & 1 deletion src/test/debuginfo/unreachable-locals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,3 @@ fn diverge() -> ! {
}

fn some_predicate() -> bool { true || false }

1 change: 0 additions & 1 deletion src/test/incremental/change_crate_order/auxiliary/a.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![crate_type="rlib"]

pub static A : u32 = 32;

1 change: 0 additions & 1 deletion src/test/incremental/change_crate_order/auxiliary/b.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![crate_type="rlib"]

pub static B: u32 = 32;

1 change: 0 additions & 1 deletion src/test/incremental/hashes/exported_vs_not.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ pub fn body_exported_to_metadata_because_of_generic() -> u32 {
pub fn body_exported_to_metadata_because_of_generic() -> u32 {
2
}

1 change: 0 additions & 1 deletion src/test/incremental/issue-39569.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ fn main() {
let x: Arc<FooX> = Arc::new(FooX { x: 22 });
let y: Arc<FooX> = x;
}

1 change: 0 additions & 1 deletion src/test/incremental/krate-inherent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ pub mod x {

#[cfg(cfail1)]
pub fn bar() { } // remove this unrelated fn in cfail2, which should not affect `x::method`

1 change: 0 additions & 1 deletion src/test/incremental/krate_reassign_34991/auxiliary/a.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![crate_type="rlib"]

pub type X = u32;

1 change: 0 additions & 1 deletion src/test/incremental/span_hash_stable/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ fn main() {
b: 3,
};
}

1 change: 0 additions & 1 deletion src/test/run-fail/call-fn-never-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ fn foo(x: !) -> ! {
fn main() {
foo(panic!("wowzers!"))
}

1 change: 0 additions & 1 deletion src/test/run-fail/cast-never.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ fn main() {
let x: ! = panic!();
let y: u32 = x as u32;
}

1 change: 0 additions & 1 deletion src/test/run-fail/never-associated-type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,3 @@ impl Foo for Blah {
fn main() {
Blah.smeg();
}

1 change: 0 additions & 1 deletion src/test/run-fail/never-type-arg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ impl PartialEq<!> for Wub {
fn main() {
let _ = Wub == panic!("oh no!");
}

1 change: 0 additions & 1 deletion src/test/run-make-fulldeps/issue-18943/foo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ trait Foo { }
trait Bar { }

impl<'a> Foo for Bar + 'a { }

1 change: 0 additions & 1 deletion src/test/run-make-fulldeps/issue-28595/b.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ extern void a(void);
void b(void) {
a();
}

1 change: 0 additions & 1 deletion src/test/run-make-fulldeps/libtest-json/f.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ fn c() {
fn d() {
assert!(false);
}

1 change: 0 additions & 1 deletion src/test/run-make-fulldeps/lto-no-link-whole-rlib/lib2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ extern {
pub fn foo2() -> i32 {
unsafe { foo() }
}

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ int main() {
overflow();
return 0;
}

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ pub fn trait_impl_test_function() {
use stable_symbol_names1::*;
Bar::generic_method::<Bar>();
}

1 change: 0 additions & 1 deletion src/test/run-make-fulldeps/windows-subsystem/console.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#![windows_subsystem = "console"]

fn main() {}

1 change: 0 additions & 1 deletion src/test/run-pass/asm-concat-src.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
pub fn main() {
unsafe { asm!(concat!("", "")) };
}

1 change: 0 additions & 1 deletion src/test/run-pass/binding/empty-types-in-patterns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ fn main() {

bar(&[]);
}

1 change: 0 additions & 1 deletion src/test/run-pass/consts/const-fn-feature-flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ fn main() {

assert_eq!(CELL.get(), v);
}

1 change: 0 additions & 1 deletion src/test/run-pass/deriving/auxiliary/derive-no-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,3 @@ pub struct Empty;
#[derive(Clone, Hash, PartialEq, Eq, PartialOrd, Ord,
Debug, Copy)]
pub struct AlsoEmpty {}

1 change: 0 additions & 1 deletion src/test/run-pass/deriving/derive-no-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ fn main() {

assert!(Bar::Qux < Bar::Quux(42));
}

1 change: 0 additions & 1 deletion src/test/run-pass/discriminant_value-wrapper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ pub fn main() {
let _ = mem::discriminant(&10);
let _ = mem::discriminant(&"test");
}

1 change: 0 additions & 1 deletion src/test/run-pass/fat-lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
fn main() {
println!("hello!");
}

1 change: 0 additions & 1 deletion src/test/run-pass/impl-for-never.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,3 @@ fn main() {
println!("! is {}", <!>::stringify_type());
println!("None is {}", maybe_stringify(None::<!>));
}

1 change: 0 additions & 1 deletion src/test/run-pass/inc-range-pat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ fn main() {
assert!(match 'x' { 'a' ... 'z' => true, _ => false });
assert!(match 'x' { 'a' ..= 'z' => true, _ => false });
}

1 change: 0 additions & 1 deletion src/test/run-pass/inherit-env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ fn main() {
k, v, output);
}
}

1 change: 0 additions & 1 deletion src/test/run-pass/issues/auxiliary/issue-17718-aux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ pub const C5: &'static usize = &C4;

pub static S1: usize = 3;
pub static S2: atomic::AtomicUsize = atomic::AtomicUsize::new(0);

5 changes: 2 additions & 3 deletions src/test/run-pass/issues/issue-16278.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

// this file has some special \r\n endings (use xxd to see them)

fn main() {assert_eq!(b"", b"\
fn main() {assert_eq!(b"", b"\
");
assert_eq!(b"\n", b"
assert_eq!(b"\n", b"
");
}

1 change: 0 additions & 1 deletion src/test/run-pass/issues/issue-21400.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ impl GitConnect {
Ok(out)
}
}

1 change: 0 additions & 1 deletion src/test/run-pass/issues/issue-23699.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ fn main() {
let t = test as fn (i32);
t(0i32);
}

1 change: 0 additions & 1 deletion src/test/run-pass/issues/issue-24313.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,3 @@ fn main() {
}).join().unwrap();
}
}

Loading