]> git.lizzy.rs Git - rust.git/commitdiff
Remove meaningless comments in src/test
authorsd234678 <sd234678@protonmail.com>
Fri, 9 Aug 2019 14:14:05 +0000 (15:14 +0100)
committersd234678 <sd234678@protonmail.com>
Fri, 16 Aug 2019 09:54:20 +0000 (10:54 +0100)
17 files changed:
src/test/pretty/stmt_expr_attributes.rs
src/test/ui/associated-type/associated-type-projection-from-supertrait.rs
src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.rs
src/test/ui/associated-types/associated-types-ref-from-struct.rs
src/test/ui/higher-rank-trait-bounds/hrtb-type-outlives.rs
src/test/ui/hrtb/hrtb-conflate-regions.rs
src/test/ui/impl-trait/bound-normalization-fail.rs
src/test/ui/impl-trait/bound-normalization-pass.rs
src/test/ui/issues/issue-12028.rs
src/test/ui/issues/issue-16739.rs
src/test/ui/methods/method-projection.rs
src/test/ui/regions/regions-outlives-projection-container-hrtb.rs
src/test/ui/regions/regions-outlives-projection-container-wc.rs
src/test/ui/regions/regions-outlives-projection-container.rs
src/test/ui/specialization/defaultimpl/specialization-no-default.rs
src/test/ui/specialization/specialization-no-default.rs
src/test/ui/traits/traits-conditional-model-fn.rs

index 02d93238dd6435497b797b9939c5b31bce5305f4..619cce685d75f581a9c204f7bfefba50c9e55dde 100644 (file)
@@ -259,8 +259,6 @@ fn _12() {
     }
 }
 
-/////////////////
-
 fn foo() { }
 fn foo3(_: i32, _: (), _: ()) { }
 fn qux(_: i32) { }
index 06dfe490b8bd328fd76bf2347001f2ac5366343e..7e05bcd309a4ff3efa52d1da6c915a0f58d67736 100644 (file)
@@ -12,30 +12,22 @@ fn honk(&self) { }
     fn chip_paint(&self, c: Self::Color) { }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct Black;
 struct ModelT;
 impl Vehicle for ModelT { type Color = Black; }
 impl Car for ModelT { }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct Blue;
 struct ModelU;
 impl Vehicle for ModelU { type Color = Blue; }
 impl Car for ModelU { }
 
-///////////////////////////////////////////////////////////////////////////
-
 fn dent<C:Car>(c: C, color: C::Color) { c.chip_paint(color) }
 fn a() { dent(ModelT, Black); }
 fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types
 fn c() { dent(ModelU, Black); } //~ ERROR mismatched types
 fn d() { dent(ModelU, Blue); }
 
-///////////////////////////////////////////////////////////////////////////
-
 fn e() { ModelT.chip_paint(Black); }
 fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types
 fn g() { ModelU.chip_paint(Black); } //~ ERROR mismatched types
index 653130843c8de94d580114ceafa87f3cbdcfeba6..6b2bbbe2e4fb971632055ec1740587d66bd6c6ef 100644 (file)
@@ -11,22 +11,16 @@ pub trait Car : Vehicle {
     fn honk(&self) { }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct Black;
 struct ModelT;
 impl Vehicle for ModelT { type Color = Black; }
 impl Car for ModelT { }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct Blue;
 struct ModelU;
 impl Vehicle for ModelU { type Color = Blue; }
 impl Car for ModelU { }
 
-///////////////////////////////////////////////////////////////////////////
-
 fn black_car<C:Car<Color=Black>>(c: C) {
 }
 
index 3ccba289e4b0a55a49ca161599242c8c478442b4..c89f6046e6bf2cae138912276c9110d60ea44cd1 100644 (file)
@@ -9,8 +9,6 @@ trait Test {
     fn test(&self, value: &Self::V) -> bool;
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct TesterPair<T:Test> {
     tester: T,
     value: T::V,
@@ -26,8 +24,6 @@ fn test(&self) -> bool {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct EqU32(u32);
 impl Test for EqU32 {
     type V = u32;
index a8f38180cc29def852fa507da663fda483c1b359..88d396101dba23106de9a1daf0e6e3c325e9f8f6 100644 (file)
@@ -14,7 +14,6 @@ fn want_foo<T>()
 {
 }
 
-///////////////////////////////////////////////////////////////////////////
 // Expressed as a where clause
 
 struct SomeStruct<X> {
@@ -30,7 +29,6 @@ fn one() {
     want_foo::<SomeStruct<usize>>();
 }
 
-///////////////////////////////////////////////////////////////////////////
 // Expressed as shorthand
 
 struct AnotherStruct<X> {
index 391303676d7845de2ead323c58a016e1ad74f0c0..004d62ac513ffe86bfc0917c1844cc4dd69284d1 100644 (file)
@@ -15,7 +15,6 @@ fn want_foo1<T>()
 {
 }
 
-///////////////////////////////////////////////////////////////////////////
 // Expressed as a where clause
 
 struct SomeStruct;
index 9ba7c91fc7201d6834e86bf139905ebd8aa479cd..ce1550568c19dd4c53a5f8273c58b7415ac7b068 100644 (file)
@@ -8,7 +8,6 @@
 
 // See issue 60414
 
-/////////////////////////////////////////////
 // Reduction to `impl Trait`
 
 struct Foo<T>(T);
@@ -33,7 +32,6 @@ fn foo_fail<T: Trait>() -> impl FooLike<Output=T::Assoc> {
     }
 }
 
-/////////////////////////////////////////////
 // Same with lifetimes in the trait
 
 mod lifetimes {
index 5b634e3106e3b85ff2eb0e77ceaaa7f795ac5831..b0ed4be54b8999cd8487396ba6482cfffc8a2cc6 100644 (file)
@@ -8,7 +8,6 @@
 
 // See issue 60414
 
-/////////////////////////////////////////////
 // Reduction to `impl Trait`
 
 struct Foo<T>(T);
@@ -32,7 +31,6 @@ fn foo_pass<T: Trait<Assoc=()>>() -> impl FooLike<Output=T::Assoc> {
     }
 }
 
-/////////////////////////////////////////////
 // Same with lifetimes in the trait
 
 mod lifetimes {
@@ -59,7 +57,6 @@ fn foo2_pass2<'a, T: Trait<'a, Assoc=&'a ()> + 'a>(
     }
 }
 
-/////////////////////////////////////////////
 // Reduction using `impl Trait` in bindings
 
 mod impl_trait_in_bindings {
@@ -80,7 +77,6 @@ fn foo<T: Trait<Assoc=u32>>() {
     }
 }
 
-/////////////////////////////////////////////
 // The same applied to `type Foo = impl Bar`s
 
 mod opaque_types {
index d55354529a9b4071a518ab59b234b1368bc7a587..7c2b0d69c8b2568de550058321ddd25a69600b8b 100644 (file)
@@ -17,8 +17,6 @@ trait StreamHasher {
     fn stream(&self) -> Self::S;
 }
 
-//////////////////////////////////////////////////////////////////////////////
-
 trait StreamHash<H: StreamHasher>: Hash<H> {
     fn input_stream(&self, stream: &mut H::S);
 }
index 54ad8fd076e4e871ccf601daa2671551b7018764..94da2ca5cab815e2bc2251f8e7a7d8666633dc74 100644 (file)
@@ -16,8 +16,6 @@ impl FnOnce<()> for Foo {
     extern "rust-call" fn call_once(mut self, _: ()) -> u32 { self.call_mut(()) }
 }
 
-/////////////////////////////////////////////////////////////////////////
-
 impl FnMut<(u32,)> for Foo {
     extern "rust-call" fn call_mut(&mut self, (x,): (u32,)) -> u32 { self.foo + x }
 }
@@ -27,8 +25,6 @@ impl FnOnce<(u32,)> for Foo {
     extern "rust-call" fn call_once(mut self, args: (u32,)) -> u32 { self.call_mut(args) }
 }
 
-/////////////////////////////////////////////////////////////////////////
-
 impl FnMut<(u32,u32)> for Foo {
     extern "rust-call" fn call_mut(&mut self, (x, y): (u32, u32)) -> u32 { self.foo + x + y }
 }
index cf33d53968b724e643c4dc5692db67f9b131c2a5..21d983f192ab6b490ffc34fdeab5165056665714 100644 (file)
@@ -2,9 +2,6 @@
 // Test that we can use method notation to call methods based on a
 // projection bound from a trait. Issue #20469.
 
-///////////////////////////////////////////////////////////////////////////
-
-
 trait MakeString {
     fn make_string(&self) -> String;
 }
@@ -21,8 +18,6 @@ fn make_string(&self) -> String {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 trait Foo {
     type F: MakeString;
 
@@ -33,8 +28,6 @@ fn foo<F:Foo>(f: &F) -> String {
     f.get().make_string()
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct SomeStruct {
     field: isize,
 }
@@ -47,8 +40,6 @@ fn get(&self) -> &isize {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct SomeOtherStruct {
     field: usize,
 }
index 407a4fdf59bb7b5e2ed809a43cd919717d768b64..cee741184ca2ab68a0ddb8b35bf7864274b13533 100644 (file)
@@ -6,9 +6,6 @@
 
 #![allow(dead_code)]
 
-
-///////////////////////////////////////////////////////////////////////////
-
 pub trait TheTrait<'b> {
     type TheAssocType;
 }
@@ -21,8 +18,6 @@ impl<'a,'b> TheTrait<'a> for TheType<'b> {
     type TheAssocType = &'b ();
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 pub struct WithHrAssoc<T>
     where for<'a> T : TheTrait<'a>
 {
@@ -37,8 +32,6 @@ fn with_assoc<'a,'b>() {
     //[nll]~^^ ERROR lifetime may not live long enough
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 pub trait TheSubTrait : for<'a> TheTrait<'a> {
 }
 
index 5037ea536dae93a91d20f7df29030ae482b4c3bd..99965f333907bff77772640989900ecc090fc93d 100644 (file)
@@ -8,8 +8,6 @@
 
 #![allow(dead_code)]
 
-///////////////////////////////////////////////////////////////////////////
-
 pub trait TheTrait {
     type TheAssocType;
 }
@@ -22,8 +20,6 @@ impl<'b> TheTrait for TheType<'b> {
     type TheAssocType = &'b ();
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 pub struct WithAssoc<T> where T : TheTrait {
     m: [T; 0]
 }
index 78305c0693905b9ce36ba3baa8bd050c318c5ef1..3afc600becb6e4c7309b65b5d2e7ef251b24c1cf 100644 (file)
@@ -5,8 +5,6 @@
 #![allow(dead_code)]
 #![feature(rustc_attrs)]
 
-///////////////////////////////////////////////////////////////////////////
-
 pub trait TheTrait {
     type TheAssocType;
 }
@@ -19,8 +17,6 @@ impl<'b> TheTrait for TheType<'b> {
     type TheAssocType = &'b ();
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 pub struct WithAssoc<T:TheTrait> {
     m: [T; 0]
 }
index 7ea79a9a7bf824e7b6c36a614856877ba78b2691..37005f839d4889225f682689417af88a55fc234d 100644 (file)
@@ -3,9 +3,7 @@
 // Check a number of scenarios in which one impl tries to override another,
 // without correctly using `default`.
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 1: one layer of specialization, multiple methods, missing `default`
-////////////////////////////////////////////////////////////////////////////////
 
 trait Foo {
     fn foo(&self);
@@ -25,9 +23,7 @@ impl Foo for u32 {
     fn bar(&self) {} //~ ERROR E0520
 }
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 2: one layer of specialization, missing `default` on associated type
-////////////////////////////////////////////////////////////////////////////////
 
 trait Bar {
     type T;
@@ -41,9 +37,7 @@ impl Bar for u8 {
     type T = (); //~ ERROR E0520
 }
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 3a: multiple layers of specialization, missing interior `default`
-////////////////////////////////////////////////////////////////////////////////
 
 trait Baz {
     fn baz(&self);
@@ -61,10 +55,8 @@ impl Baz for i32 {
     fn baz(&self) {} //~ ERROR E0520
 }
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 3b: multiple layers of specialization, missing interior `default`,
 // redundant `default` in bottom layer.
-////////////////////////////////////////////////////////////////////////////////
 
 trait Redundant {
     fn redundant(&self);
index 29afbbd9bf26731f80b8cae4dd75080ca1f8e453..57346b26d24ec2d8e85544aee516d8261e75dd1d 100644 (file)
@@ -3,9 +3,7 @@
 // Check a number of scenarios in which one impl tries to override another,
 // without correctly using `default`.
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 1: one layer of specialization, multiple methods, missing `default`
-////////////////////////////////////////////////////////////////////////////////
 
 trait Foo {
     fn foo(&self);
@@ -25,9 +23,7 @@ impl Foo for u32 {
     fn bar(&self) {} //~ ERROR E0520
 }
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 2: one layer of specialization, missing `default` on associated type
-////////////////////////////////////////////////////////////////////////////////
 
 trait Bar {
     type T;
@@ -41,9 +37,7 @@ impl Bar for u8 {
     type T = (); //~ ERROR E0520
 }
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 3a: multiple layers of specialization, missing interior `default`
-////////////////////////////////////////////////////////////////////////////////
 
 trait Baz {
     fn baz(&self);
@@ -61,10 +55,8 @@ impl Baz for i32 {
     fn baz(&self) {} //~ ERROR E0520
 }
 
-////////////////////////////////////////////////////////////////////////////////
 // Test 3b: multiple layers of specialization, missing interior `default`,
 // redundant `default` in bottom layer.
-////////////////////////////////////////////////////////////////////////////////
 
 trait Redundant {
     fn redundant(&self);
index 27ce6d93a8195a29da8f5d1281a58f020aee9f6c..afdfb96394bd0d8e1c4bc13d1c137ee46ec2760a 100644 (file)
@@ -14,8 +14,6 @@
 use std::rc::Rc;
 use std::cell::Cell;
 
-///////////////////////////////////////////////////////////////////////////
-
 struct SomeGoableThing {
     counter: Rc<Cell<isize>>
 }
@@ -26,8 +24,6 @@ fn go(&self, arg: isize) {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 struct SomeGoOnceableThing {
     counter: Rc<Cell<isize>>
 }
@@ -38,8 +34,6 @@ fn go_once(self, arg: isize) {
     }
 }
 
-///////////////////////////////////////////////////////////////////////////
-
 fn main() {
     let counter = Rc::new(Cell::new(0));
     let mut x = SomeGoableThing { counter: counter.clone() };