Skip to content

Commit dba5ba0

Browse files
committed
Update a test's diagnostics
1 parent 4d2bed9 commit dba5ba0

File tree

2 files changed

+6
-39
lines changed

2 files changed

+6
-39
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![feature(const_fn)]
12-
1311
const fn x() {
1412
let t = true;
15-
//~^ ERROR let bindings in constant functions are unstable
16-
//~| ERROR statements in constant functions are unstable
17-
let x = || t;
18-
//~^ ERROR let bindings in constant functions are unstable
19-
//~| ERROR statements in constant functions are unstable
13+
let x = || t; //~ ERROR function pointers in const fn are unstable
2014
}
2115

2216
fn main() {}

src/test/ui/issues/issue-37550.stderr

Lines changed: 5 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,8 @@
1-
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
2-
--> $DIR/issue-37550.rs:14:13
1+
error: function pointers in const fn are unstable
2+
--> $DIR/issue-37550.rs:13:9
33
|
4-
LL | let t = true;
5-
| ^^^^
6-
|
7-
= help: add #![feature(const_let)] to the crate attributes to enable
8-
9-
error[E0658]: statements in constant functions are unstable (see issue #48821)
10-
--> $DIR/issue-37550.rs:14:13
11-
|
12-
LL | let t = true;
13-
| ^^^^
14-
|
15-
= help: add #![feature(const_let)] to the crate attributes to enable
16-
17-
error[E0658]: let bindings in constant functions are unstable (see issue #48821)
18-
--> $DIR/issue-37550.rs:17:13
19-
|
20-
LL | let x = || t;
21-
| ^^^^
22-
|
23-
= help: add #![feature(const_let)] to the crate attributes to enable
24-
25-
error[E0658]: statements in constant functions are unstable (see issue #48821)
26-
--> $DIR/issue-37550.rs:17:13
27-
|
28-
LL | let x = || t;
29-
| ^^^^
30-
|
31-
= help: add #![feature(const_let)] to the crate attributes to enable
4+
LL | let x = || t; //~ ERROR function pointers in const fn are unstable
5+
| ^
326

33-
error: aborting due to 4 previous errors
7+
error: aborting due to previous error
348

35-
For more information about this error, try `rustc --explain E0658`.

0 commit comments

Comments
 (0)