Skip to content

Commit 67d8b6e

Browse files
committed
add test
1 parent 1e3486f commit 67d8b6e

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

tests/ui/const-generics/generic_const_exprs/const-generics-closure.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// compile-fail
21
// Regression test for issue #127424
32

43
fn bar() -> impl Into<

tests/ui/const-generics/generic_const_exprs/const-generics-closure.stderr

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0425]: cannot find function `f_t` in this scope
2-
--> $DIR/const-generics-closure.rs:7:9
2+
--> $DIR/const-generics-closure.rs:6:9
33
|
44
LL | f_t(&*s);
55
| ^^^ not found in this scope
@@ -10,7 +10,7 @@ LL | fn bar<const f_t: /* Type */>() -> impl Into<
1010
| +++++++++++++++++++++++
1111

1212
error[E0425]: cannot find value `s` in this scope
13-
--> $DIR/const-generics-closure.rs:7:15
13+
--> $DIR/const-generics-closure.rs:6:15
1414
|
1515
LL | f_t(&*s);
1616
| ^
@@ -29,7 +29,7 @@ LL | fn bar<const s: /* Type */>() -> impl Into<
2929
| +++++++++++++++++++++
3030

3131
error[E0425]: cannot find function `c` in this scope
32-
--> $DIR/const-generics-closure.rs:11:9
32+
--> $DIR/const-generics-closure.rs:10:9
3333
|
3434
LL | c(&*s);
3535
| ^
@@ -48,7 +48,7 @@ LL | fn bar<const c: /* Type */>() -> impl Into<
4848
| +++++++++++++++++++++
4949

5050
error[E0425]: cannot find value `s` in this scope
51-
--> $DIR/const-generics-closure.rs:11:13
51+
--> $DIR/const-generics-closure.rs:10:13
5252
|
5353
LL | c(&*s);
5454
| ^
@@ -67,7 +67,7 @@ LL | fn bar<const s: /* Type */>() -> impl Into<
6767
| +++++++++++++++++++++
6868

6969
error[E0425]: cannot find function `c` in this scope
70-
--> $DIR/const-generics-closure.rs:15:9
70+
--> $DIR/const-generics-closure.rs:14:9
7171
|
7272
LL | c(&*s);
7373
| ^
@@ -86,7 +86,7 @@ LL | fn bar<const c: /* Type */>() -> impl Into<
8686
| +++++++++++++++++++++
8787

8888
error[E0425]: cannot find value `s` in this scope
89-
--> $DIR/const-generics-closure.rs:15:13
89+
--> $DIR/const-generics-closure.rs:14:13
9090
|
9191
LL | c(&*s);
9292
| ^
@@ -105,7 +105,7 @@ LL | fn bar<const s: /* Type */>() -> impl Into<
105105
| +++++++++++++++++++++
106106

107107
error[E0425]: cannot find function `c1` in this scope
108-
--> $DIR/const-generics-closure.rs:21:9
108+
--> $DIR/const-generics-closure.rs:20:9
109109
|
110110
LL | c1(*x);
111111
| ^^ not found in this scope
@@ -116,7 +116,7 @@ LL | fn bar<const c1: /* Type */>() -> impl Into<
116116
| ++++++++++++++++++++++
117117

118118
error[E0425]: cannot find value `x` in this scope
119-
--> $DIR/const-generics-closure.rs:21:13
119+
--> $DIR/const-generics-closure.rs:20:13
120120
|
121121
LL | struct X;
122122
| --------- similarly named unit struct `X` defined here
@@ -135,7 +135,7 @@ LL | fn bar<const x: /* Type */>() -> impl Into<
135135
| +++++++++++++++++++++
136136

137137
error[E0658]: `for<...>` binders for closures are experimental
138-
--> $DIR/const-generics-closure.rs:25:17
138+
--> $DIR/const-generics-closure.rs:24:17
139139
|
140140
LL | let _ = for<'a, 'b> |x: &'a &'a Vec<&'b u32>, b: bool| -> &'a Vec<&'b u32> { *x };
141141
| ^^^^^^^^^^^
@@ -146,13 +146,13 @@ LL | let _ = for<'a, 'b> |x: &'a &'a Vec<&'b u32>, b: bool| -> &'a Vec<&
146146
= help: consider removing `for<...>`
147147

148148
error[E0601]: `main` function not found in crate `const_generics_closure`
149-
--> $DIR/const-generics-closure.rs:30:2
149+
--> $DIR/const-generics-closure.rs:29:2
150150
|
151151
LL | }
152152
| ^ consider adding a `main` function to `$DIR/const-generics-closure.rs`
153153

154154
error[E0308]: mismatched types
155-
--> $DIR/const-generics-closure.rs:5:10
155+
--> $DIR/const-generics-closure.rs:4:10
156156
|
157157
LL | [u8; {
158158
| __________^

0 commit comments

Comments
 (0)