Skip to content

Commit 8ec3c92

Browse files
committed
bless tests
1 parent c5690ab commit 8ec3c92

17 files changed

+78
-171
lines changed

tests/ui/associated-types/associated-type-struct-construction.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
// Check that fully qualified syntax can be used in struct expressions in patterns.
22
// In other words, check that structs can constructed and destructed via an associated type.
3+
//
4+
//@ run-pass
35

46
fn main() {
57
let <Type as Trait>::Assoc { field } = <Type as Trait>::Assoc { field: 2 };

tests/ui/associated-types/tuple-struct-expr-pat.stderr

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
2-
--> $DIR/tuple-struct-expr-pat.rs:10:36
2+
--> $DIR/tuple-struct-expr-pat.rs:8:36
33
|
44
LL | let <T<0> as Trait>::Assoc() = <T<0> as Trait>::Assoc();
55
| ^^^^^^^^^^^^^^^^^^^^^^-- help: use struct expression instead: `{}`
66
|
77
= note: can't use a type alias as a constructor
88

99
error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
10-
--> $DIR/tuple-struct-expr-pat.rs:10:9
10+
--> $DIR/tuple-struct-expr-pat.rs:8:9
1111
|
1212
LL | let <T<0> as Trait>::Assoc() = <T<0> as Trait>::Assoc();
1313
| ^^^^^^^^^^^^^^^^^^^^^^-- help: use struct pattern instead: `{}`
1414
|
1515
= note: can't use a type alias as tuple pattern
1616

1717
error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
18-
--> $DIR/tuple-struct-expr-pat.rs:13:38
18+
--> $DIR/tuple-struct-expr-pat.rs:11:38
1919
|
2020
LL | let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
2121
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -28,7 +28,7 @@ LL + let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc { 0: 0 };
2828
|
2929

3030
error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
31-
--> $DIR/tuple-struct-expr-pat.rs:13:9
31+
--> $DIR/tuple-struct-expr-pat.rs:11:9
3232
|
3333
LL | let <T<1> as Trait>::Assoc(_a) = <T<1> as Trait>::Assoc(0);
3434
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL + let <T<1> as Trait>::Assoc { 0: _a } = <T<1> as Trait>::Assoc(0);
4141
|
4242

4343
error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
44-
--> $DIR/tuple-struct-expr-pat.rs:16:42
44+
--> $DIR/tuple-struct-expr-pat.rs:14:42
4545
|
4646
LL | let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
4747
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -54,7 +54,7 @@ LL + let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc { 0: 0, 1:
5454
|
5555

5656
error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
57-
--> $DIR/tuple-struct-expr-pat.rs:16:9
57+
--> $DIR/tuple-struct-expr-pat.rs:14:9
5858
|
5959
LL | let <T<2> as Trait>::Assoc(_a, _b) = <T<2> as Trait>::Assoc(0, 1);
6060
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -67,7 +67,7 @@ LL + let <T<2> as Trait>::Assoc { 0: _a, 1: _b } = <T<2> as Trait>::Assoc(0,
6767
|
6868

6969
error[E0575]: expected method or associated constant, found associated type `Trait::Assoc`
70-
--> $DIR/tuple-struct-expr-pat.rs:19:62
70+
--> $DIR/tuple-struct-expr-pat.rs:17:62
7171
|
7272
LL | let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
7373
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -80,7 +80,7 @@ LL + let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait
8080
|
8181

8282
error[E0575]: expected tuple struct or tuple variant, found associated type `Trait::Assoc`
83-
--> $DIR/tuple-struct-expr-pat.rs:19:9
83+
--> $DIR/tuple-struct-expr-pat.rs:17:9
8484
|
8585
LL | let <T<3> as Trait>::Assoc(ref _a, ref mut _b, mut _c) = <T<3> as Trait>::Assoc(0, 1, 2);
8686
| ^^^^^^^^^^^^^^^^^^^^^^

tests/ui/feature-gates/feature-gate-more-qualified-paths.rs

Lines changed: 0 additions & 27 deletions
This file was deleted.

tests/ui/feature-gates/feature-gate-more-qualified-paths.stderr

Lines changed: 0 additions & 33 deletions
This file was deleted.

tests/ui/inference/need_type_info/incompat-call-after-qualified-path-0.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0282]: type annotations needed
2-
--> $DIR/incompat-call-after-qualified-path-0.rs:21:6
2+
--> $DIR/incompat-call-after-qualified-path-0.rs:19:6
33
|
44
LL | f(|a, b| a.cmp(b));
55
| ^ - type must be known at this point
@@ -10,13 +10,13 @@ LL | f(|a: /* Type */, b| a.cmp(b));
1010
| ++++++++++++
1111

1212
error[E0061]: this function takes 0 arguments but 1 argument was supplied
13-
--> $DIR/incompat-call-after-qualified-path-0.rs:21:3
13+
--> $DIR/incompat-call-after-qualified-path-0.rs:19:3
1414
|
1515
LL | f(|a, b| a.cmp(b));
1616
| ^ --------------- unexpected argument
1717
|
1818
note: function defined here
19-
--> $DIR/incompat-call-after-qualified-path-0.rs:17:4
19+
--> $DIR/incompat-call-after-qualified-path-0.rs:15:4
2020
|
2121
LL | fn f() {}
2222
| ^

tests/ui/inference/need_type_info/incompat-call-after-qualified-path-1.stderr

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0282]: type annotations needed
2-
--> $DIR/incompat-call-after-qualified-path-1.rs:25:6
2+
--> $DIR/incompat-call-after-qualified-path-1.rs:23:6
33
|
44
LL | f(|a, b| a.cmp(b));
55
| ^ - type must be known at this point
@@ -10,13 +10,13 @@ LL | f(|a: /* Type */, b| a.cmp(b));
1010
| ++++++++++++
1111

1212
error[E0061]: this function takes 0 arguments but 1 argument was supplied
13-
--> $DIR/incompat-call-after-qualified-path-1.rs:25:3
13+
--> $DIR/incompat-call-after-qualified-path-1.rs:23:3
1414
|
1515
LL | f(|a, b| a.cmp(b));
1616
| ^ --------------- unexpected argument
1717
|
1818
note: function defined here
19-
--> $DIR/incompat-call-after-qualified-path-1.rs:19:4
19+
--> $DIR/incompat-call-after-qualified-path-1.rs:17:4
2020
|
2121
LL | fn f() {}
2222
| ^

tests/ui/macros/vec-macro-in-pattern.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
fn main() {
66
match Some(vec![42]) {
7-
Some(vec![43]) => {} //~ ERROR expected a pattern, found a function call
7+
Some(vec![43]) => {}
8+
//~^ ERROR expected a pattern, found a function call
89
//~| ERROR found associated function
9-
//~| ERROR usage of qualified paths in this context is experimental
1010
_ => {}
1111
}
1212
}

tests/ui/macros/vec-macro-in-pattern.stderr

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,6 @@ LL | Some(vec![43]) => {}
77
= note: function calls are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
88
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
99

10-
error[E0658]: usage of qualified paths in this context is experimental
11-
--> $DIR/vec-macro-in-pattern.rs:7:14
12-
|
13-
LL | Some(vec![43]) => {}
14-
| ^^^^^^^^
15-
|
16-
= note: see issue #86935 <https://github.com/rust-lang/rust/issues/86935> for more information
17-
= help: add `#![feature(more_qualified_paths)]` to the crate attributes to enable
18-
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
19-
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
20-
2110
error[E0164]: expected tuple struct or tuple variant, found associated function `<[_]>::into_vec`
2211
--> $DIR/vec-macro-in-pattern.rs:7:14
2312
|
@@ -27,7 +16,7 @@ LL | Some(vec![43]) => {}
2716
= help: for more information, visit https://doc.rust-lang.org/book/ch19-00-patterns.html
2817
= note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
2918

30-
error: aborting due to 3 previous errors
19+
error: aborting due to 2 previous errors
3120

32-
Some errors have detailed explanations: E0164, E0532, E0658.
21+
Some errors have detailed explanations: E0164, E0532.
3322
For more information about an error, try `rustc --explain E0164`.

tests/ui/nll/user-annotations/normalization-2.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
// Make sure we honor region constraints when normalizing type annotations.
22

3-
//@ check-fail
4-
53
trait Trait {
64
type Assoc;
75
}

0 commit comments

Comments
 (0)