Skip to content

Commit 56ebd57

Browse files
committed
Remove meaningless comments in src/test
1 parent f7af19c commit 56ebd57

17 files changed

+0
-81
lines changed

src/test/pretty/stmt_expr_attributes.rs

-2
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,6 @@ fn _12() {
259259
}
260260
}
261261

262-
/////////////////
263-
264262
fn foo() { }
265263
fn foo3(_: i32, _: (), _: ()) { }
266264
fn qux(_: i32) { }

src/test/ui/associated-type/associated-type-projection-from-supertrait.rs

-8
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,22 @@ pub trait Car : Vehicle {
1212
fn chip_paint(&self, c: Self::Color) { }
1313
}
1414

15-
///////////////////////////////////////////////////////////////////////////
16-
1715
struct Black;
1816
struct ModelT;
1917
impl Vehicle for ModelT { type Color = Black; }
2018
impl Car for ModelT { }
2119

22-
///////////////////////////////////////////////////////////////////////////
23-
2420
struct Blue;
2521
struct ModelU;
2622
impl Vehicle for ModelU { type Color = Blue; }
2723
impl Car for ModelU { }
2824

29-
///////////////////////////////////////////////////////////////////////////
30-
3125
fn dent<C:Car>(c: C, color: C::Color) { c.chip_paint(color) }
3226
fn a() { dent(ModelT, Black); }
3327
fn b() { dent(ModelT, Blue); } //~ ERROR mismatched types
3428
fn c() { dent(ModelU, Black); } //~ ERROR mismatched types
3529
fn d() { dent(ModelU, Blue); }
3630

37-
///////////////////////////////////////////////////////////////////////////
38-
3931
fn e() { ModelT.chip_paint(Black); }
4032
fn f() { ModelT.chip_paint(Blue); } //~ ERROR mismatched types
4133
fn g() { ModelU.chip_paint(Black); } //~ ERROR mismatched types

src/test/ui/associated-types/associated-types-binding-to-type-defined-in-supertrait.rs

-6
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,16 @@ pub trait Car : Vehicle {
1111
fn honk(&self) { }
1212
}
1313

14-
///////////////////////////////////////////////////////////////////////////
15-
1614
struct Black;
1715
struct ModelT;
1816
impl Vehicle for ModelT { type Color = Black; }
1917
impl Car for ModelT { }
2018

21-
///////////////////////////////////////////////////////////////////////////
22-
2319
struct Blue;
2420
struct ModelU;
2521
impl Vehicle for ModelU { type Color = Blue; }
2622
impl Car for ModelU { }
2723

28-
///////////////////////////////////////////////////////////////////////////
29-
3024
fn black_car<C:Car<Color=Black>>(c: C) {
3125
}
3226

src/test/ui/associated-types/associated-types-ref-from-struct.rs

-4
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ trait Test {
99
fn test(&self, value: &Self::V) -> bool;
1010
}
1111

12-
///////////////////////////////////////////////////////////////////////////
13-
1412
struct TesterPair<T:Test> {
1513
tester: T,
1614
value: T::V,
@@ -26,8 +24,6 @@ impl<T:Test> TesterPair<T> {
2624
}
2725
}
2826

29-
///////////////////////////////////////////////////////////////////////////
30-
3127
struct EqU32(u32);
3228
impl Test for EqU32 {
3329
type V = u32;

src/test/ui/higher-rank-trait-bounds/hrtb-type-outlives.rs

-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ fn want_foo<T>()
1414
{
1515
}
1616

17-
///////////////////////////////////////////////////////////////////////////
1817
// Expressed as a where clause
1918

2019
struct SomeStruct<X> {
@@ -30,7 +29,6 @@ fn one() {
3029
want_foo::<SomeStruct<usize>>();
3130
}
3231

33-
///////////////////////////////////////////////////////////////////////////
3432
// Expressed as shorthand
3533

3634
struct AnotherStruct<X> {

src/test/ui/hrtb/hrtb-conflate-regions.rs

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ fn want_foo1<T>()
1515
{
1616
}
1717

18-
///////////////////////////////////////////////////////////////////////////
1918
// Expressed as a where clause
2019

2120
struct SomeStruct;

src/test/ui/impl-trait/bound-normalization-fail.rs

-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
// See issue 60414
1010

11-
/////////////////////////////////////////////
1211
// Reduction to `impl Trait`
1312

1413
struct Foo<T>(T);
@@ -33,7 +32,6 @@ mod impl_trait {
3332
}
3433
}
3534

36-
/////////////////////////////////////////////
3735
// Same with lifetimes in the trait
3836

3937
mod lifetimes {

src/test/ui/impl-trait/bound-normalization-pass.rs

-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
// See issue 60414
1010

11-
/////////////////////////////////////////////
1211
// Reduction to `impl Trait`
1312

1413
struct Foo<T>(T);
@@ -32,7 +31,6 @@ mod impl_trait {
3231
}
3332
}
3433

35-
/////////////////////////////////////////////
3634
// Same with lifetimes in the trait
3735

3836
mod lifetimes {
@@ -59,7 +57,6 @@ mod lifetimes {
5957
}
6058
}
6159

62-
/////////////////////////////////////////////
6360
// Reduction using `impl Trait` in bindings
6461

6562
mod impl_trait_in_bindings {
@@ -80,7 +77,6 @@ mod impl_trait_in_bindings {
8077
}
8178
}
8279

83-
/////////////////////////////////////////////
8480
// The same applied to `type Foo = impl Bar`s
8581

8682
mod opaque_types {

src/test/ui/issues/issue-12028.rs

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ trait StreamHasher {
1717
fn stream(&self) -> Self::S;
1818
}
1919

20-
//////////////////////////////////////////////////////////////////////////////
21-
2220
trait StreamHash<H: StreamHasher>: Hash<H> {
2321
fn input_stream(&self, stream: &mut H::S);
2422
}

src/test/ui/issues/issue-16739.rs

-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ impl FnOnce<()> for Foo {
1616
extern "rust-call" fn call_once(mut self, _: ()) -> u32 { self.call_mut(()) }
1717
}
1818

19-
/////////////////////////////////////////////////////////////////////////
20-
2119
impl FnMut<(u32,)> for Foo {
2220
extern "rust-call" fn call_mut(&mut self, (x,): (u32,)) -> u32 { self.foo + x }
2321
}
@@ -27,8 +25,6 @@ impl FnOnce<(u32,)> for Foo {
2725
extern "rust-call" fn call_once(mut self, args: (u32,)) -> u32 { self.call_mut(args) }
2826
}
2927

30-
/////////////////////////////////////////////////////////////////////////
31-
3228
impl FnMut<(u32,u32)> for Foo {
3329
extern "rust-call" fn call_mut(&mut self, (x, y): (u32, u32)) -> u32 { self.foo + x + y }
3430
}

src/test/ui/methods/method-projection.rs

-9
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
// Test that we can use method notation to call methods based on a
33
// projection bound from a trait. Issue #20469.
44

5-
///////////////////////////////////////////////////////////////////////////
6-
7-
85
trait MakeString {
96
fn make_string(&self) -> String;
107
}
@@ -21,8 +18,6 @@ impl MakeString for usize {
2118
}
2219
}
2320

24-
///////////////////////////////////////////////////////////////////////////
25-
2621
trait Foo {
2722
type F: MakeString;
2823

@@ -33,8 +28,6 @@ fn foo<F:Foo>(f: &F) -> String {
3328
f.get().make_string()
3429
}
3530

36-
///////////////////////////////////////////////////////////////////////////
37-
3831
struct SomeStruct {
3932
field: isize,
4033
}
@@ -47,8 +40,6 @@ impl Foo for SomeStruct {
4740
}
4841
}
4942

50-
///////////////////////////////////////////////////////////////////////////
51-
5243
struct SomeOtherStruct {
5344
field: usize,
5445
}

src/test/ui/regions/regions-outlives-projection-container-hrtb.rs

-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66

77
#![allow(dead_code)]
88

9-
10-
///////////////////////////////////////////////////////////////////////////
11-
129
pub trait TheTrait<'b> {
1310
type TheAssocType;
1411
}
@@ -21,8 +18,6 @@ impl<'a,'b> TheTrait<'a> for TheType<'b> {
2118
type TheAssocType = &'b ();
2219
}
2320

24-
///////////////////////////////////////////////////////////////////////////
25-
2621
pub struct WithHrAssoc<T>
2722
where for<'a> T : TheTrait<'a>
2823
{
@@ -37,8 +32,6 @@ fn with_assoc<'a,'b>() {
3732
//[nll]~^^ ERROR lifetime may not live long enough
3833
}
3934

40-
///////////////////////////////////////////////////////////////////////////
41-
4235
pub trait TheSubTrait : for<'a> TheTrait<'a> {
4336
}
4437

src/test/ui/regions/regions-outlives-projection-container-wc.rs

-4
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
#![allow(dead_code)]
1010

11-
///////////////////////////////////////////////////////////////////////////
12-
1311
pub trait TheTrait {
1412
type TheAssocType;
1513
}
@@ -22,8 +20,6 @@ impl<'b> TheTrait for TheType<'b> {
2220
type TheAssocType = &'b ();
2321
}
2422

25-
///////////////////////////////////////////////////////////////////////////
26-
2723
pub struct WithAssoc<T> where T : TheTrait {
2824
m: [T; 0]
2925
}

src/test/ui/regions/regions-outlives-projection-container.rs

-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#![allow(dead_code)]
66
#![feature(rustc_attrs)]
77

8-
///////////////////////////////////////////////////////////////////////////
9-
108
pub trait TheTrait {
119
type TheAssocType;
1210
}
@@ -19,8 +17,6 @@ impl<'b> TheTrait for TheType<'b> {
1917
type TheAssocType = &'b ();
2018
}
2119

22-
///////////////////////////////////////////////////////////////////////////
23-
2420
pub struct WithAssoc<T:TheTrait> {
2521
m: [T; 0]
2622
}

src/test/ui/specialization/defaultimpl/specialization-no-default.rs

-8
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// Check a number of scenarios in which one impl tries to override another,
44
// without correctly using `default`.
55

6-
////////////////////////////////////////////////////////////////////////////////
76
// Test 1: one layer of specialization, multiple methods, missing `default`
8-
////////////////////////////////////////////////////////////////////////////////
97

108
trait Foo {
119
fn foo(&self);
@@ -25,9 +23,7 @@ impl Foo for u32 {
2523
fn bar(&self) {} //~ ERROR E0520
2624
}
2725

28-
////////////////////////////////////////////////////////////////////////////////
2926
// Test 2: one layer of specialization, missing `default` on associated type
30-
////////////////////////////////////////////////////////////////////////////////
3127

3228
trait Bar {
3329
type T;
@@ -41,9 +37,7 @@ impl Bar for u8 {
4137
type T = (); //~ ERROR E0520
4238
}
4339

44-
////////////////////////////////////////////////////////////////////////////////
4540
// Test 3a: multiple layers of specialization, missing interior `default`
46-
////////////////////////////////////////////////////////////////////////////////
4741

4842
trait Baz {
4943
fn baz(&self);
@@ -61,10 +55,8 @@ impl Baz for i32 {
6155
fn baz(&self) {} //~ ERROR E0520
6256
}
6357

64-
////////////////////////////////////////////////////////////////////////////////
6558
// Test 3b: multiple layers of specialization, missing interior `default`,
6659
// redundant `default` in bottom layer.
67-
////////////////////////////////////////////////////////////////////////////////
6860

6961
trait Redundant {
7062
fn redundant(&self);

src/test/ui/specialization/specialization-no-default.rs

-8
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
// Check a number of scenarios in which one impl tries to override another,
44
// without correctly using `default`.
55

6-
////////////////////////////////////////////////////////////////////////////////
76
// Test 1: one layer of specialization, multiple methods, missing `default`
8-
////////////////////////////////////////////////////////////////////////////////
97

108
trait Foo {
119
fn foo(&self);
@@ -25,9 +23,7 @@ impl Foo for u32 {
2523
fn bar(&self) {} //~ ERROR E0520
2624
}
2725

28-
////////////////////////////////////////////////////////////////////////////////
2926
// Test 2: one layer of specialization, missing `default` on associated type
30-
////////////////////////////////////////////////////////////////////////////////
3127

3228
trait Bar {
3329
type T;
@@ -41,9 +37,7 @@ impl Bar for u8 {
4137
type T = (); //~ ERROR E0520
4238
}
4339

44-
////////////////////////////////////////////////////////////////////////////////
4540
// Test 3a: multiple layers of specialization, missing interior `default`
46-
////////////////////////////////////////////////////////////////////////////////
4741

4842
trait Baz {
4943
fn baz(&self);
@@ -61,10 +55,8 @@ impl Baz for i32 {
6155
fn baz(&self) {} //~ ERROR E0520
6256
}
6357

64-
////////////////////////////////////////////////////////////////////////////////
6558
// Test 3b: multiple layers of specialization, missing interior `default`,
6659
// redundant `default` in bottom layer.
67-
////////////////////////////////////////////////////////////////////////////////
6860

6961
trait Redundant {
7062
fn redundant(&self);

src/test/ui/traits/traits-conditional-model-fn.rs

-6
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ use go_trait::{Go, GoMut, GoOnce, go, go_mut, go_once};
1414
use std::rc::Rc;
1515
use std::cell::Cell;
1616

17-
///////////////////////////////////////////////////////////////////////////
18-
1917
struct SomeGoableThing {
2018
counter: Rc<Cell<isize>>
2119
}
@@ -26,8 +24,6 @@ impl Go for SomeGoableThing {
2624
}
2725
}
2826

29-
///////////////////////////////////////////////////////////////////////////
30-
3127
struct SomeGoOnceableThing {
3228
counter: Rc<Cell<isize>>
3329
}
@@ -38,8 +34,6 @@ impl GoOnce for SomeGoOnceableThing {
3834
}
3935
}
4036

41-
///////////////////////////////////////////////////////////////////////////
42-
4337
fn main() {
4438
let counter = Rc::new(Cell::new(0));
4539
let mut x = SomeGoableThing { counter: counter.clone() };

0 commit comments

Comments
 (0)