|
| 1 | +error[E0015]: cannot call non-const function `std::io::_print` in constant functions |
| 2 | + --> $DIR/no-const-callers.rs:15:14 |
| 3 | + | |
| 4 | +LL | fn b() { println!("hello"); } |
| 5 | + | ^^^^^^^^^^^^^^^^^ |
| 6 | + | |
| 7 | +note: function `_print` is not const |
| 8 | + --> $SRC_DIR/std/src/io/stdio.rs:LL:COL |
| 9 | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
| 10 | + |
1 | 11 | error[E0015]: cannot call non-const associated function `<T as A>::b` in constant functions |
2 | | - --> $DIR/no-const-callers.rs:15:5 |
| 12 | + --> $DIR/no-const-callers.rs:26:5 |
3 | 13 | | |
4 | 14 | LL | T::b(); |
5 | 15 | | ^^^^^^ |
6 | 16 | | |
7 | 17 | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
8 | 18 |
|
9 | 19 | error[E0015]: cannot call non-const associated function `<() as A>::b` in constant functions |
10 | | - --> $DIR/no-const-callers.rs:18:5 |
| 20 | + --> $DIR/no-const-callers.rs:29:5 |
11 | 21 | | |
12 | 22 | LL | <()>::b(); |
13 | 23 | | ^^^^^^^^^ |
14 | 24 | | |
15 | 25 | = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
16 | 26 |
|
17 | | -error: aborting due to 2 previous errors |
| 27 | +error[E0015]: cannot call non-const associated function `<u8 as A>::b` in constant functions |
| 28 | + --> $DIR/no-const-callers.rs:32:5 |
| 29 | + | |
| 30 | +LL | u8::b(); |
| 31 | + | ^^^^^^^ |
| 32 | + | |
| 33 | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
| 34 | + |
| 35 | +error[E0015]: cannot call non-const associated function `<i8 as A>::b` in constant functions |
| 36 | + --> $DIR/no-const-callers.rs:35:5 |
| 37 | + | |
| 38 | +LL | i8::b(); |
| 39 | + | ^^^^^^^ |
| 40 | + | |
| 41 | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
| 42 | + |
| 43 | +error: aborting due to 5 previous errors |
18 | 44 |
|
19 | 45 | For more information about this error, try `rustc --explain E0015`. |
0 commit comments