Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 7 pull requests #84545

Closed
wants to merge 31 commits into from

Conversation

Dylan-DPC-zz
Copy link

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

klensy and others added 30 commits April 16, 2021 03:14
refactor StyledBuffer

Refactors StyledBuffer `text` and `styles` fields content into StyledChar and touches some other stuff.
…es, r=varkor

various const parameter defaults improvements

Actually resolve names in const parameter defaults, fixing `struct Foo<const N: usize = { usize::MAX }>`.

---
Split generic parameter ban rib for types and consts, allowing
```rust
#![feature(const_generics_defaults)]
struct Q;
struct Foo<T = Q, const Q: usize = 3>(T);
```

---
Remove the type/const ordering restriction if `const_generics_defaults` is active, even if `const_generics` is not. allowing us to stabilize and test const param defaults separately.

---
Check well formedness of const parameter defaults, eagerly emitting an error for `struct Foo<const N: usize = { 0 - 1 }>`

---
Do not forbid const parameters in param defaults, allowing `struct Foo<const N: usize, T = [u8; N]>(T)` and `struct Foo<const N: usize, const M: usize = N>`. Note that this should not change anything which is stabilized, as on stable, type parameters must be in front of const parameters, which means that type parameter defaults are only allowed if no const parameters exist.

We still forbid generic parameters inside of const param types.

r? ```@varkor``` ```@petrochenkov```
update Miri

Cc ```@rust-lang/miri``` r? ```@ghost```
…nt, r=petrochenkov

Handle pretty printing of `else if let` clauses without ICEing

When pretty printing the HIR of `if ... {} else if let ... {}` clauses, this displays it the `else if let` part as `match` it gets desugared to, the same way normal `if let` statements are currently displayed, instead of ICEing.

```rust
pub fn main() {
    if true {
        // 1
    } else if let a = 1 {
        // 2
    } else {
        // 3
    }
}
```

now gets desugared (via `rustc -Zunpretty=hir,typed src/x.rs`) to:

```rust
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
pub fn main() ({
                   (if (true as bool)
                       ({
                            // 1
                        } as
                           ()) else {match (1 as i32) {
                                         a => {
                                             // 2
                                         }
                                         _ => {
                                             // 3
                                         }
                                     }} as ())
                    } as ())
```

For comparison, this code gets HIR prettyprinted the same way before and after this change:

```rust
pub fn main() {
    if let a = 1 {
        // 2
    } else {
        // 3
    }
}
```
turns into
```rust
#[prelude_import]
use ::std::prelude::rust_2015::*;
#[macro_use]
extern crate std;
pub fn main() ({
                   (match (1 as i32) {
                        a => {
                            // 2
                        }
                        _ => {
                            // 3
                        }
                    } as ())
               } as ())
```

This closes rust-lang#82329. It closes rust-lang#84434 as well, due to having the same root cause.
Add suggestion to "use break" when attempting to implicit-break a loop

Fixes rust-lang#84114
Always reject `const fn` in `trait` during parsing.

'const fn' in trait are rejected in the AST:
https://github.com/rust-lang/rust/blob/b78c0d8a4d5af91a4a55d029293e3ecb879ec142/compiler/rustc_ast_passes/src/ast_validation.rs#L1411
So this feature gate check is a NOP and we can just remove it.

The src/test/ui/feature-gates/feature-gate-min_const_fn.rs and src/test/ui/feature-gates/feature-gate-const_fn.rs tests ensure that we still reject `const fn` in `trait`

Cc rust-lang#84510
r? `@oli-obk`
@rustbot rustbot added the rollup A PR which is a rollup label Apr 25, 2021
@Dylan-DPC-zz
Copy link
Author

@bors r+ rollup=never p=5

@bors
Copy link
Contributor

bors commented Apr 25, 2021

📌 Commit 7f721eb has been approved by Dylan-DPC

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Apr 25, 2021
@bors
Copy link
Contributor

bors commented Apr 25, 2021

⌛ Testing commit 7f721eb with merge eab5295177c45dc75e00b9c4b5b1fa3015b3b981...

@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)



The actual stderr differed from the expected stderr.
Actual stderr saved to /tmp/compiletestu2Mdpj/u128.stage-id.stderr
To only update this specific test, also pass `--test-args u128.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/miri" "tests/run-pass/u128.rs" "-L" "/tmp/compiletestu2Mdpj" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/tmp/compiletestu2Mdpj/u128.stage-id" "-A" "unused" "--edition" "2018" "-Astable-features" "--sysroot" "/home/user/.cache/miri/HOST" "-L" "/tmp/compiletestu2Mdpj/u128.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
---

test [ui] run-pass/u128.rs ... FAILED
test [ui] run-pass/transmute_fat2.rs ... ok

error: failed to decode compiler output as json: `EOF while parsing a string at line 1 column 5403`
line: {"message":"use of unstable library feature 'bench_black_box'","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using [rustup]).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n\n[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html\n"},"level":"error","spans":[{"file_name":"tests/run-pass/float.rs","byte_start":15450,"byte_end":15470,"line_start":348,"line_end":348,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16617,"byte_end":16660,"line_start":376,"line_end":376,"column_start":9,"column_end":52,"is_primary":false,"text":[{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":9,"highlight_end":52}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16826,"byte_end":16863,"line_start":383,"line_end":383,"column_start":9,"column_end":46,"is_primary":false,"text":[{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":9,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":17503,"byte_end":17560,"line_start":406,"line_end":406,"column_start":5,"column_end":62,"is_primary":false,"text":[{"text":"    common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);","highlight_start":5,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the l
output: {"message":"use of unstable library feature 'bench_black_box'","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using [rustup]).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n\n[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html\n"},"level":"error","spans":[{"file_name":"tests/run-pass/float.rs","byte_start":96,"byte_end":116,"line_start":4,"line_end":4,"column_start":5,"column_end":25,"is_primary":true,"text":[{"text":"use std::hint::black_box;","highlight_start":5,"highlight_end":25}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(bench_black_box)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'bench_black_box'\n --> tests/run-pass/float.rs:4:5\n  |\n4 | use std::hint::black_box;\n  |     ^^^^^^^^^^^^^^^^^^^^\n  |\n  = note: see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information\n  = help: add `#![feature(bench_black_box)]` to the crate attributes to enable\n\n"}
{"message":"use of unstable library feature 'bench_black_box'","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using [rustup]).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n\n[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html\n"},"level":"error","spans":[{"file_name":"tests/run-pass/float.rs","byte_start":15450,"byte_end":15470,"line_start":348,"line_end":348,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16101,"byte_end":16148,"line_start":368,"line_end":368,"column_start":9,"column_end":56,"is_primary":false,"text":[{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":9,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16826,"byte_end":16863,"line_start":383,"line_end":383,"column_start":9,"column_end":46,"is_primary":false,"text":[{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":9,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":17503,"byte_end":17560,"line_start":406,"line_end":406,"column_start":5,"column_end":62,"is_primary":false,"text":[{"text":"    common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);","highlight_start":5,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"test!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15261,"byte_end":15970,"line_start":345,"line_end":363,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! test {","highlight_start":1,"highlight_end":20},{"text":"    ($val:expr, $src_ty:ident -> $dest_ty:ident, $expected:expr) => (","highlight_start":1,"highlight_end":70},{"text":"        // black_box disables constant evaluation to test run-time conversions:","highlight_start":1,"highlight_end":80},{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":1,"highlight_end":70},{"text":"                    \"run-time {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":85},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        {","highlight_start":1,"highlight_end":10},{"text":"            const X: $src_ty = $val;","highlight_start":1,"highlight_end":37},{"text":"            const Y: $dest_ty = X as $dest_ty;","highlight_start":1,"highlight_end":47},{"text":"            assert_eq!(Y, $expected,","highlight_start":1,"highlight_end":37},{"text":"                        \"const eval {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":91},{"text":"        }","highlight_start":1,"highlight_end":10},{"text":"    );","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    ($fval:expr, f* -> $ity:ident, $ival:expr) => (","highlight_start":1,"highlight_end":52},{"text":"        test!($fval, f32 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"        test!($fval, f64 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"    )","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(bench_black_box)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'bench_black_box'\n   --> tests/run-pass/float.rs:348:20\n    |\n348 |         assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,\n    |                    ^^^^^^^^^^^^^^^^^^^^\n...\n406 |     common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);\n    |     --------------------------------------------------------- in this macro invocation\n    |\n    = note: see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information\n    = help: add `#![feature(bench_black_box)]` to the crate attributes to enable\n    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
{"message":"use of unstable library feature 'bench_black_box'","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using [rustup]).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n\n[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html\n"},"level":"error","spans":[{"file_name":"tests/run-pass/float.rs","byte_start":15450,"byte_end":15470,"line_start":348,"line_end":348,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16157,"byte_end":16208,"line_start":369,"line_end":369,"column_start":9,"column_end":60,"is_primary":false,"text":[{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":9,"highlight_end":60}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16826,"byte_end":16863,"line_start":383,"line_end":383,"column_start":9,"column_end":46,"is_primary":false,"text":[{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":9,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":17503,"byte_end":17560,"line_start":406,"line_end":406,"column_start":5,"column_end":62,"is_primary":false,"text":[{"text":"    common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);","highlight_start":5,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"test!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15261,"byte_end":15970,"line_start":345,"line_end":363,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! test {","highlight_start":1,"highlight_end":20},{"text":"    ($val:expr, $src_ty:ident -> $dest_ty:ident, $expected:expr) => (","highlight_start":1,"highlight_end":70},{"text":"        // black_box disables constant evaluation to test run-time conversions:","highlight_start":1,"highlight_end":80},{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":1,"highlight_end":70},{"text":"                    \"run-time {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":85},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        {","highlight_start":1,"highlight_end":10},{"text":"            const X: $src_ty = $val;","highlight_start":1,"highlight_end":37},{"text":"            const Y: $dest_ty = X as $dest_ty;","highlight_start":1,"highlight_end":47},{"text":"            assert_eq!(Y, $expected,","highlight_start":1,"highlight_end":37},{"text":"                        \"const eval {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":91},{"text":"        }","highlight_start":1,"highlight_end":10},{"text":"    );","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    ($fval:expr, f* -> $ity:ident, $ival:expr) => (","highlight_start":1,"highlight_end":52},{"text":"        test!($fval, f32 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"        test!($fval, f64 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"    )","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(bench_black_box)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'bench_black_box'\n   --> tests/run-pass/float.rs:348:20\n    |\n348 |         assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,\n    |                    ^^^^^^^^^^^^^^^^^^^^\n...\n406 |     common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);\n    |     --------------------------------------------------------- in this macro invocation\n    |\n    = note: see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information\n    = help: add `#![feature(bench_black_box)]` to the crate attributes to enable\n    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
{"message":"use of unstable library feature 'bench_black_box'","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using [rustup]).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n\n[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html\n"},"level":"error","spans":[{"file_name":"tests/run-pass/float.rs","byte_start":15450,"byte_end":15470,"line_start":348,"line_end":348,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16463,"byte_end":16513,"line_start":373,"line_end":373,"column_start":9,"column_end":59,"is_primary":false,"text":[{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":9,"highlight_end":59}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16826,"byte_end":16863,"line_start":383,"line_end":383,"column_start":9,"column_end":46,"is_primary":false,"text":[{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":9,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":17503,"byte_end":17560,"line_start":406,"line_end":406,"column_start":5,"column_end":62,"is_primary":false,"text":[{"text":"    common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);","highlight_start":5,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"test!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15261,"byte_end":15970,"line_start":345,"line_end":363,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! test {","highlight_start":1,"highlight_end":20},{"text":"    ($val:expr, $src_ty:ident -> $dest_ty:ident, $expected:expr) => (","highlight_start":1,"highlight_end":70},{"text":"        // black_box disables constant evaluation to test run-time conversions:","highlight_start":1,"highlight_end":80},{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":1,"highlight_end":70},{"text":"                    \"run-time {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":85},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        {","highlight_start":1,"highlight_end":10},{"text":"            const X: $src_ty = $val;","highlight_start":1,"highlight_end":37},{"text":"            const Y: $dest_ty = X as $dest_ty;","highlight_start":1,"highlight_end":47},{"text":"            assert_eq!(Y, $expected,","highlight_start":1,"highlight_end":37},{"text":"                        \"const eval {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":91},{"text":"        }","highlight_start":1,"highlight_end":10},{"text":"    );","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    ($fval:expr, f* -> $ity:ident, $ival:expr) => (","highlight_start":1,"highlight_end":52},{"text":"        test!($fval, f32 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"        test!($fval, f64 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"    )","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(bench_black_box)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'bench_black_box'\n   --> tests/run-pass/float.rs:348:20\n    |\n348 |         assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,\n    |                    ^^^^^^^^^^^^^^^^^^^^\n...\n406 |     common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);\n    |     --------------------------------------------------------- in this macro invocation\n    |\n    = note: see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information\n    = help: add `#![feature(bench_black_box)]` to the crate attributes to enable\n    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
{"message":"use of unstable library feature 'bench_black_box'","code":{"code":"E0658","explanation":"An unstable feature was used.\n\nErroneous code example:\n\n```compile_fail,E0658\n#[repr(u128)] // error: use of unstable library feature 'repr128'\nenum Foo {\n    Bar(u64),\n}\n```\n\nIf you're using a stable or a beta version of rustc, you won't be able to use\nany unstable features. In order to do so, please switch to a nightly version of\nrustc (by using [rustup]).\n\nIf you're using a nightly version of rustc, just add the corresponding feature\nto be able to use it:\n\n```\n#![feature(repr128)]\n\n#[repr(u128)] // ok!\nenum Foo {\n    Bar(u64),\n}\n```\n\n[rustup]: https://rust-lang.github.io/rustup/concepts/channels.html\n"},"level":"error","spans":[{"file_name":"tests/run-pass/float.rs","byte_start":15450,"byte_end":15470,"line_start":348,"line_end":348,"column_start":20,"column_end":40,"is_primary":true,"text":[{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":20,"highlight_end":40}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16522,"byte_end":16572,"line_start":374,"line_end":374,"column_start":9,"column_end":59,"is_primary":false,"text":[{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":9,"highlight_end":59}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":16826,"byte_end":16863,"line_start":383,"line_end":383,"column_start":9,"column_end":46,"is_primary":false,"text":[{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":9,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":{"span":{"file_name":"tests/run-pass/float.rs","byte_start":17503,"byte_end":17560,"line_start":406,"line_end":406,"column_start":5,"column_end":62,"is_primary":false,"text":[{"text":"    common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);","highlight_start":5,"highlight_end":62}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"common_fptoi_tests!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15972,"byte_end":16918,"line_start":365,"line_end":386,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! common_fptoi_tests {","highlight_start":1,"highlight_end":34},{"text":"    ($fty:ident -> $($ity:ident)+) => ({ $(","highlight_start":1,"highlight_end":44},{"text":"        test!($fty::NAN, $fty -> $ity, 0);","highlight_start":1,"highlight_end":43},{"text":"        test!($fty::INFINITY, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":56},{"text":"        test!($fty::NEG_INFINITY, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":60},{"text":"        // These two tests are not solely float->int tests, in particular the latter relies on","highlight_start":1,"highlight_end":95},{"text":"        // `u128::MAX as f32` not being UB. But that's okay, since this file tests int->float","highlight_start":1,"highlight_end":94},{"text":"        // as well, the test is just slightly misplaced.","highlight_start":1,"highlight_end":57},{"text":"        test!($ity::MIN as $fty, $fty -> $ity, $ity::MIN);","highlight_start":1,"highlight_end":59},{"text":"        test!($ity::MAX as $fty, $fty -> $ity, $ity::MAX);","highlight_start":1,"highlight_end":59},{"text":"        test!(0., $fty -> $ity, 0);","highlight_start":1,"highlight_end":36},{"text":"        test!($fty::MIN_POSITIVE, $fty -> $ity, 0);","highlight_start":1,"highlight_end":52},{"text":"        test!(-0.9, $fty -> $ity, 0);","highlight_start":1,"highlight_end":38},{"text":"        test!(1., $fty -> $ity, 1);","highlight_start":1,"highlight_end":36},{"text":"        test!(42., $fty -> $ity, 42);","highlight_start":1,"highlight_end":38},{"text":"    )+ });","highlight_start":1,"highlight_end":11},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    (f* -> $($ity:ident)+) => ({","highlight_start":1,"highlight_end":33},{"text":"        common_fptoi_tests!(f32 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"        common_fptoi_tests!(f64 -> $($ity)+);","highlight_start":1,"highlight_end":46},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}},"macro_decl_name":"test!","def_site_span":{"file_name":"tests/run-pass/float.rs","byte_start":15261,"byte_end":15970,"line_start":345,"line_end":363,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"macro_rules! test {","highlight_start":1,"highlight_end":20},{"text":"    ($val:expr, $src_ty:ident -> $dest_ty:ident, $expected:expr) => (","highlight_start":1,"highlight_end":70},{"text":"        // black_box disables constant evaluation to test run-time conversions:","highlight_start":1,"highlight_end":80},{"text":"        assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,","highlight_start":1,"highlight_end":70},{"text":"                    \"run-time {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":85},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        {","highlight_start":1,"highlight_end":10},{"text":"            const X: $src_ty = $val;","highlight_start":1,"highlight_end":37},{"text":"            const Y: $dest_ty = X as $dest_ty;","highlight_start":1,"highlight_end":47},{"text":"            assert_eq!(Y, $expected,","highlight_start":1,"highlight_end":37},{"text":"                        \"const eval {} -> {}\", stringify!($src_ty), stringify!($dest_ty));","highlight_start":1,"highlight_end":91},{"text":"        }","highlight_start":1,"highlight_end":10},{"text":"    );","highlight_start":1,"highlight_end":7},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    ($fval:expr, f* -> $ity:ident, $ival:expr) => (","highlight_start":1,"highlight_end":52},{"text":"        test!($fval, f32 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"        test!($fval, f64 -> $ity, $ival);","highlight_start":1,"highlight_end":42},{"text":"    )","highlight_start":1,"highlight_end":6},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}}}],"children":[{"message":"see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"add `#![feature(bench_black_box)]` to the crate attributes to enable","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0658]: use of unstable library feature 'bench_black_box'\n   --> tests/run-pass/float.rs:348:20\n    |\n348 |         assert_eq!(black_box::<$src_ty>($val) as $dest_ty, $expected,\n    |                    ^^^^^^^^^^^^^^^^^^^^\n...\n406 |     common_fptoi_tests!(f* -> i8 i16 i32 i64 u8 u16 u32 u64);\n    |     --------------------------------------------------------- in this macro invocation\n    |\n    = note: see issue #64102 <https://github.com/rust-lang/rust/issues/64102> for more information\n    = help: add `#![feature(bench_black_box)]` to the crate attributes to enable\n    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)\n\n"}
---
{"message":"aborting due to 297 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 297 previous errors\n\n"}
{"message":"For more information about this error, try `rustc --explain E0658`.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0658`.\n"}

status: exit status: 1
command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-tools-bin/miri" "tests/run-pass/float.rs" "-L" "/tmp/compiletestu2Mdpj" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/tmp/compiletestu2Mdpj/float.stage-id" "-A" "unused" "--edition" "2018" "-Astable-features" "--sysroot" "/home/user/.cache/miri/HOST" "-L" "/tmp/compiletestu2Mdpj/float.stage-id.aux"
------------------------------------------

------------------------------------------
stderr:
---
Verifying status of rustfmt...
Verifying status of miri...
This PR updated 'src/tools/miri', verifying if status is 'test-pass'...

We detected that this PR updated 'miri', but its tests failed.

If you do intend to update 'miri', please check the error messages above and
commit another update.

If you do NOT intend to update 'miri', please ensure you did not accidentally
change the submodule at 'src/tools/miri'. You may ask your reviewer for the
proper steps.
{"rls":"build-fail","nomicon":"test-pass","cargo-miri":"test-fail","book":"test-pass","embedded-book":"test-pass","edition-guide":"test-pass","miri":"test-fail","rustfmt":"build-fail","rustbook":"test-fail","rust-by-example":"test-pass","reference":"test-pass"}failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --stage 2 check-tools

@bors
Copy link
Contributor

bors commented Apr 25, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 25, 2021
@Dylan-DPC-zz Dylan-DPC-zz mentioned this pull request Apr 25, 2021
@bors
Copy link
Contributor

bors commented Apr 25, 2021

☔ The latest upstream changes (presumably #84481) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC-zz Dylan-DPC-zz deleted the rollup-5g7sfji branch April 25, 2021 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants