Skip to content

Commit bb62270

Browse files
authored
Rollup merge of rust-lang#63487 - sd234678:remove-meaningless-comments-in-src/test-2, r=Centril
Remove meaningless comments in src/test Moved from rust-lang#63411
2 parents aa3f542 + 5f50c4a commit bb62270

29 files changed

+61
-142
lines changed

src/test/pretty/stmt_expr_attributes.rs

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 8 deletions
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-type/associated-type-projection-from-supertrait.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/associated-type-projection-from-supertrait.rs:33:23
2+
--> $DIR/associated-type-projection-from-supertrait.rs:27:23
33
|
44
LL | fn b() { dent(ModelT, Blue); }
55
| ^^^^ expected struct `Black`, found struct `Blue`
@@ -8,7 +8,7 @@ LL | fn b() { dent(ModelT, Blue); }
88
found type `Blue`
99

1010
error[E0308]: mismatched types
11-
--> $DIR/associated-type-projection-from-supertrait.rs:34:23
11+
--> $DIR/associated-type-projection-from-supertrait.rs:28:23
1212
|
1313
LL | fn c() { dent(ModelU, Black); }
1414
| ^^^^^ expected struct `Blue`, found struct `Black`
@@ -17,7 +17,7 @@ LL | fn c() { dent(ModelU, Black); }
1717
found type `Black`
1818

1919
error[E0308]: mismatched types
20-
--> $DIR/associated-type-projection-from-supertrait.rs:40:28
20+
--> $DIR/associated-type-projection-from-supertrait.rs:32:28
2121
|
2222
LL | fn f() { ModelT.chip_paint(Blue); }
2323
| ^^^^ expected struct `Black`, found struct `Blue`
@@ -26,7 +26,7 @@ LL | fn f() { ModelT.chip_paint(Blue); }
2626
found type `Blue`
2727

2828
error[E0308]: mismatched types
29-
--> $DIR/associated-type-projection-from-supertrait.rs:41:28
29+
--> $DIR/associated-type-projection-from-supertrait.rs:33:28
3030
|
3131
LL | fn g() { ModelU.chip_paint(Black); }
3232
| ^^^^^ expected struct `Blue`, found struct `Black`

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

Lines changed: 0 additions & 6 deletions
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-binding-to-type-defined-in-supertrait.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
error[E0271]: type mismatch resolving `<ModelT as Vehicle>::Color == Blue`
2-
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:37:10
2+
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:31:10
33
|
44
LL | fn b() { blue_car(ModelT); }
55
| ^^^^^^^^ expected struct `Black`, found struct `Blue`
66
|
77
= note: expected type `Black`
88
found type `Blue`
99
note: required by `blue_car`
10-
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:33:1
10+
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:27:1
1111
|
1212
LL | fn blue_car<C:Car<Color=Blue>>(c: C) {
1313
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1414

1515
error[E0271]: type mismatch resolving `<ModelU as Vehicle>::Color == Black`
16-
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:38:10
16+
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:32:10
1717
|
1818
LL | fn c() { black_car(ModelU); }
1919
| ^^^^^^^^^ expected struct `Blue`, found struct `Black`
2020
|
2121
= note: expected type `Blue`
2222
found type `Black`
2323
note: required by `black_car`
24-
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:30:1
24+
--> $DIR/associated-types-binding-to-type-defined-in-supertrait.rs:24:1
2525
|
2626
LL | fn black_car<C:Car<Color=Black>>(c: C) {
2727
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

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

Lines changed: 0 additions & 4 deletions
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

Lines changed: 0 additions & 2 deletions
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

Lines changed: 0 additions & 1 deletion
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/hrtb/hrtb-conflate-regions.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `for<'a, 'b> SomeStruct: Foo<(&'a isize, &'b isize)>` is not satisfied
2-
--> $DIR/hrtb-conflate-regions.rs:28:10
2+
--> $DIR/hrtb-conflate-regions.rs:27:10
33
|
44
LL | fn b() { want_foo2::<SomeStruct>(); }
55
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `for<'a, 'b> Foo<(&'a isize, &'b isize)>` is not implemented for `SomeStruct`

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

Lines changed: 0 additions & 2 deletions
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 {

0 commit comments

Comments
 (0)