-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Cargo check panics when attempting to declare static arrays with the .len() of a static slice #52060
Comments
That stacktrace looks very broken. Usually these borrowmut errors are due to calling a lock function in a match value, and thus locking for the entire match, even if we just want the result. Should be fairly easy to fix with a backtrace with line numbers. |
The ICE seems to have moved to stable (cf. original playground link), but isn't present anymore on nightly and beta. Should this issue be closed as it will be fixed on the next rust version, or addressed in stable? |
I don't think this is worth a point release. Let's add a regression test and call it a day |
Add regression test for issue rust-lang#52060 Fix rust-lang#52060
Rollup of 9 pull requests Successful merges: - #53076 (set cfg(rustdoc) when rustdoc is running on a crate) - #53622 (cleanup: Add main functions to some UI tests) - #53769 (Also link Clippy repo in the CONTRIBUTING.md file) - #53774 (Add rust-gdbgui script.) - #53781 (bench: libcore: fix build failure of any.rs benchmark (use "dyn Any")) - #53782 (Make Arc cloning mechanics clearer in module docs) - #53790 (Add regression test for issue #52060) - #53801 (Prevent duplicated impl on foreign types) - #53850 (Nuke the `const_to_allocation` query)
…chenkov Move some tests to more reasonable directories - 5 cc rust-lang#73494 Threshold is 0.95. Next time I promise I will take a look into the special/misclassified directories. - [issues/issue-23208.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-23208.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/23208)</sup>: associated-types 0.951 - [weird-exprs.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/weird-exprs.rs) <sup>unknown</sup>: destructuring-assignment 0.958 - [issues/issue-1701.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-1701.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/1701)</sup>: structs-enums 0.974 - [issues/issue-48508-aux.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-48508-aux.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/48508)</sup>: numbers-arithmetic 0.991 - [fn_must_use.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/fn_must_use.rs) <sup>unknown</sup>: lint 1.000 - [mir_check_nonconst.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/mir_check_nonconst.rs) <sup>unknown</sup>: consts 1.002 - [issues/issue-52060.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52060.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52060)</sup>: consts 1.017 - [issues/issue-45729-unsafe-in-generator.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-45729-unsafe-in-generator.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/45729)</sup>: generator 1.024 - [issues/issue-10392.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10392.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/10392)</sup>: pattern 1.039 - [no-implicit-prelude.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/no-implicit-prelude.rs) <sup>unknown</sup>: resolve 1.071 - [issues/issue-68000-unicode-ident-after-missing-comma.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-68000-unicode-ident-after-missing-comma.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/68000)</sup>: parser 1.079 - [shadow.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/shadow.rs) <sup>unknown</sup>: binding 1.099 - [issues/issue-65611.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-65611.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/65611)</sup>: consts 1.139 - [concat-rpass.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/concat-rpass.rs) <sup>unknown</sup>: macros 1.194 - [issues/issue-31597.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-31597.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/31597)</sup>: associated-types 1.195 - [issues/issue-78372.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-78372.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/78372)</sup>: resolve 1.426 - [impl-trait-in-bindings-issue-73003.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait-in-bindings-issue-73003.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/73003)</sup>: impl-trait 1.471 - [impl-trait-in-bindings.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-trait-in-bindings.rs) <sup>unknown</sup>: impl-trait 2.500 r? `@petrochenkov`
This isn't valid code but it causes a panic none the less. It doesn't cause a panic on stable.
rustc 1.28.0-nightly (e3bf634e0 2018-06-28)
andrustc 1.28.0-beta.6 (915ac6602 2018-06-30)
are affectedExample:
https://play.rust-lang.org/?gist=a08602110a92f1601ccb30e90032bfc8&version=nightly&mode=debug&edition=2015
It affects slices but not arrays on their own, the following does not panic:
And here's a backtrace
The text was updated successfully, but these errors were encountered: