File tree Expand file tree Collapse file tree 2 files changed +6
-39
lines changed Expand file tree Collapse file tree 2 files changed +6
-39
lines changed Original file line number Diff line number Diff line change 8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- #![ feature( const_fn) ]
12
-
13
11
const fn x ( ) {
14
12
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
20
14
}
21
15
22
16
fn main ( ) { }
Original file line number Diff line number Diff line change 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
3
3
|
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
+ | ^
32
6
33
- error: aborting due to 4 previous errors
7
+ error: aborting due to previous error
34
8
35
- For more information about this error, try `rustc --explain E0658`.
You can’t perform that action at this time.
0 commit comments