]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-90870.stderr
Rollup merge of #106962 - compiler-errors:use-sugg-span, r=oli-obk
[rust.git] / tests / ui / consts / issue-90870.stderr
1 error[E0015]: cannot call non-const operator in constant functions
2   --> $DIR/issue-90870.rs:8:5
3    |
4 LL |     a == b
5    |     ^^^^^^
6    |
7    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
8    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
9 help: consider dereferencing here
10    |
11 LL |     *a == *b
12    |     +     +
13
14 error[E0015]: cannot call non-const operator in constant functions
15   --> $DIR/issue-90870.rs:15:5
16    |
17 LL |     a == b
18    |     ^^^^^^
19    |
20    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
21    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
22 help: consider dereferencing here
23    |
24 LL |     ****a == ****b
25    |     ++++     ++++
26
27 error[E0015]: cannot call non-const operator in constant functions
28   --> $DIR/issue-90870.rs:23:12
29    |
30 LL |         if l == r {
31    |            ^^^^^^
32    |
33    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
34    = help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
35 help: consider dereferencing here
36    |
37 LL |         if *l == *r {
38    |            +     +
39
40 error: aborting due to 3 previous errors
41
42 For more information about this error, try `rustc --explain E0015`.