Skip to content

Commit 22696f8

Browse files
committed
test: make compatible with the latest rustc
1 parent 69751d0 commit 22696f8

2 files changed

Lines changed: 16 additions & 18 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ anyhow = { version = "1.0.38", default-features = false }
5656
colored = "2.0.0"
5757
criterion = "0.3.3"
5858
derive_more = "0.99.9"
59-
trybuild = "1.0.39"
59+
trybuild = "1.0.85"
6060
serde_json = "1"
6161
proptest = "1.0.0"
6262
rust_decimal = "1.22.0"

tests/const_fn/01_fixnum_const_bad_str_with_too_long_fractional_part.stderr

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1-
error[E0080]: evaluation of constant value failed
2-
--> src/const_fn.rs
3-
|
4-
| const_assert!(exp <= coef);
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ exceeded interpreter step limit (see `#[const_eval_limit]`)
6-
|
7-
note: inside `fixnum::_priv::parse_fixed`
8-
--> src/const_fn.rs
9-
|
10-
| const_assert!(exp <= coef);
11-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
12-
note: inside `VALUE_INNER`
13-
--> tests/const_fn/01_fixnum_const_bad_str_with_too_long_fractional_part.rs:7:36
14-
|
15-
7 | const VALUE: FixedPoint<i64, U9> = fixnum_const!(0.1234567891, 9);
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17-
= note: this error originates in the macro `const_assert` which comes from the expansion of the macro `fixnum_const` (in Nightly builds, run with -Z macro-backtrace for more info)
1+
error: constant evaluation is taking a long time
2+
--> src/const_fn.rs
3+
|
4+
| const_assert!(exp <= coef);
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: this lint makes sure the compiler doesn't get stuck due to infinite loops in const eval.
8+
If your compilation actually takes a long time, you can safely allow the lint.
9+
help: the constant being evaluated
10+
--> tests/const_fn/01_fixnum_const_bad_str_with_too_long_fractional_part.rs:7:36
11+
|
12+
7 | const VALUE: FixedPoint<i64, U9> = fixnum_const!(0.1234567891, 9);
13+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
14+
= note: `#[deny(long_running_const_eval)]` on by default
15+
= note: this error originates in the macro `const_assert` which comes from the expansion of the macro `fixnum_const` (in Nightly builds, run with -Z macro-backtrace for more info)
1816

1917
note: erroneous constant used
2018
--> tests/const_fn/01_fixnum_const_bad_str_with_too_long_fractional_part.rs:7:36

0 commit comments

Comments
 (0)