fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0015]: cannot call non-const fn `<i32 as Plus>::plus` in constant functions 2 --> $DIR/call-const-trait-method-pass.rs:36:7 3 | 4LL | a.plus(b) 5 | ^^^^^^^ 6 | 7 = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants 8 9error[E0015]: cannot call non-const operator in constants 10 --> $DIR/call-const-trait-method-pass.rs:39:22 11 | 12LL | const ADD_INT: Int = Int(1i32) + Int(2i32); 13 | ^^^^^^^^^^^^^^^^^^^^^ 14 | 15note: impl defined here, but it is not `const` 16 --> $DIR/call-const-trait-method-pass.rs:7:1 17 | 18LL | impl const std::ops::Add for Int { 19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 20 = note: calls in constants are limited to constant functions, tuple structs and tuple variants 21 22error: aborting due to 2 previous errors 23 24For more information about this error, try `rustc --explain E0015`.