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

impl From<[T; N]> for Box<[T]> #71095

Merged
merged 1 commit into from
May 30, 2020
Merged

Conversation

pickfire
Copy link
Contributor

Based on #68692

@rust-highfive
Copy link
Collaborator

r? @LukasKalbertodt

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 13, 2020
@rust-highfive
Copy link
Collaborator

Your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-04-13T13:54:41.8997285Z ========================== Starting Command Output ===========================
2020-04-13T13:54:41.8999937Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/535deaea-3ee1-44d9-aef2-9173afb8bda2.sh
2020-04-13T13:54:41.9000294Z 
2020-04-13T13:54:41.9004164Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-13T13:54:41.9017900Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-13T13:54:41.9020196Z Task         : Get sources
2020-04-13T13:54:41.9020423Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-13T13:54:41.9020632Z Version      : 1.0.0
2020-04-13T13:54:41.9020772Z Author       : Microsoft
---
2020-04-13T13:54:42.8931128Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-13T13:54:42.8940694Z ##[command]git config gc.auto 0
2020-04-13T13:54:42.8946874Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-13T13:54:42.8949495Z ##[command]git config --get-all http.proxy
2020-04-13T13:54:42.8954381Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71095/merge:refs/remotes/pull/71095/merge
---
2020-04-13T13:56:55.2274844Z E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2020-04-13T13:56:55.2307058Z 
2020-04-13T13:56:55.2364247Z ##[error]Bash exited with code '100'.
2020-04-13T13:56:55.2375509Z ##[section]Finishing: Install awscli
2020-04-13T13:56:55.2421844Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-13T13:56:55.2426499Z Task         : Get sources
2020-04-13T13:56:55.2426839Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-13T13:56:55.2427172Z Version      : 1.0.0
2020-04-13T13:56:55.2427396Z Author       : Microsoft
2020-04-13T13:56:55.2427396Z Author       : Microsoft
2020-04-13T13:56:55.2427741Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-13T13:56:55.2428275Z ==============================================================================
2020-04-13T13:56:55.4683852Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-13T13:56:55.4728911Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-13T13:56:55.4808998Z Cleaning up task key
2020-04-13T13:56:55.4810164Z Start cleaning up orphan processes.
2020-04-13T13:56:55.4945475Z Terminate orphan process: pid (3660) (python)
2020-04-13T13:56:55.5025959Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@jonas-schievink jonas-schievink added needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Apr 13, 2020
@jonas-schievink jonas-schievink added this to the 1.44 milestone Apr 13, 2020
src/liballoc/boxed.rs Outdated Show resolved Hide resolved
@pickfire pickfire marked this pull request as draft April 13, 2020 16:23
@pickfire pickfire changed the title impl From<&[T; N]> for Box<[T]> impl From<[T; N]> for Box<[T]> Apr 14, 2020
@pickfire pickfire marked this pull request as ready for review April 14, 2020 01:50
@pickfire
Copy link
Contributor Author

@sfackler Can you please help to review again?

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-04-14T01:52:23.5255490Z ========================== Starting Command Output ===========================
2020-04-14T01:52:23.5258283Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/956b826e-0b27-4433-b37c-d1c172e7392a.sh
2020-04-14T01:52:23.5258573Z 
2020-04-14T01:52:23.5262800Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-14T01:52:23.5283769Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-14T01:52:23.5287324Z Task         : Get sources
2020-04-14T01:52:23.5287673Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-14T01:52:23.5287991Z Version      : 1.0.0
2020-04-14T01:52:23.5288209Z Author       : Microsoft
---
2020-04-14T01:52:24.5285112Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-14T01:52:24.5294449Z ##[command]git config gc.auto 0
2020-04-14T01:52:24.5303974Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-14T01:52:24.5309729Z ##[command]git config --get-all http.proxy
2020-04-14T01:52:24.5320127Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71095/merge:refs/remotes/pull/71095/merge
---
2020-04-14T01:54:45.0896259Z  ---> f58a2bb1e753
2020-04-14T01:54:45.0896965Z Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-7       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
2020-04-14T01:54:45.0899197Z  ---> Using cache
2020-04-14T01:54:45.0899509Z  ---> d079cc6b6db8
2020-04-14T01:54:45.0900385Z Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
2020-04-14T01:54:45.0903040Z  ---> 4183ca46ee56
2020-04-14T01:54:45.0903223Z Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
2020-04-14T01:54:45.0905795Z  ---> Using cache
2020-04-14T01:54:45.0906065Z  ---> 69e7f8a2a2fb
---
2020-04-14T01:54:45.1297402Z Looks like docker image is the same as before, not uploading
2020-04-14T01:54:49.4784346Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-14T01:54:49.5024646Z [CI_JOB_NAME=x86_64-gnu-llvm-7]
2020-04-14T01:54:49.5051555Z == clock drift check ==
2020-04-14T01:54:49.5056845Z   local time: Tue Apr 14 01:54:49 UTC 2020
2020-04-14T01:54:49.8471443Z   network time: Tue, 14 Apr 2020 01:54:49 GMT
2020-04-14T01:54:49.8496704Z Starting sccache server...
2020-04-14T01:54:49.9300367Z configure: processing command line
2020-04-14T01:54:49.9301134Z configure: 
2020-04-14T01:54:49.9302190Z configure: rust.dist-src        := False
---
2020-04-14T01:59:31.3489871Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-14T01:59:32.6728405Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-14T01:59:34.0925023Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-14T01:59:34.8273998Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-14T01:59:42.8847766Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-14T01:59:44.6683457Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-14T01:59:48.4663955Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-14T01:59:52.0022812Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-14T02:00:00.9398709Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-14T02:18:50.3361165Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-14T02:18:51.8750720Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-14T02:18:53.6561135Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-14T02:18:55.0775232Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-14T02:19:04.0675678Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-14T02:19:06.3758186Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-14T02:19:10.8190741Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-14T02:19:15.4088240Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-14T02:19:24.9734752Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-14T02:41:18.2847229Z .................................................................................................... 1700/9891
2020-04-14T02:41:22.1066094Z .................................................................................................... 1800/9891
2020-04-14T02:41:29.5835333Z .................................................................................................... 1900/9891
2020-04-14T02:41:36.6680174Z ....i............................................................................................... 2000/9891
2020-04-14T02:41:42.3894414Z ..............................................................................................iiiii. 2100/9891
2020-04-14T02:42:00.3700827Z .................................................................................................... 2300/9891
2020-04-14T02:42:02.2192588Z .................................................................................................... 2400/9891
2020-04-14T02:42:04.1021095Z .................................................................................................... 2500/9891
2020-04-14T02:42:09.0822940Z .................................................................................................... 2600/9891
---
2020-04-14T02:44:49.3622894Z .................................................................................................... 5100/9891
2020-04-14T02:44:55.9042127Z .................................................................................................... 5200/9891
2020-04-14T02:45:00.5317366Z ..............i..................................................................................... 5300/9891
2020-04-14T02:45:09.0214079Z ....i............................................................................................... 5400/9891
2020-04-14T02:45:13.5561293Z ....ii.ii........i...i.............................................................................. 5500/9891
2020-04-14T02:45:20.2194199Z ..................................................i................................................. 5700/9891
2020-04-14T02:45:29.1047939Z ......................................................................ii............................ 5800/9891
2020-04-14T02:45:34.9702389Z .........i.......................................................................................... 5900/9891
2020-04-14T02:45:40.0375368Z .................................................................................................... 6000/9891
2020-04-14T02:45:40.0375368Z .................................................................................................... 6000/9891
2020-04-14T02:45:48.9666803Z .................................................................................................... 6100/9891
2020-04-14T02:45:58.5213847Z ...ii...i..ii...........i........................................................................... 6200/9891
2020-04-14T02:46:11.0911625Z .................................................................................................... 6400/9891
2020-04-14T02:46:14.0233247Z .................................................................................................... 6500/9891
2020-04-14T02:46:14.0233247Z .................................................................................................... 6500/9891
2020-04-14T02:46:24.7503265Z .................................i..ii.............................................................. 6600/9891
2020-04-14T02:46:43.6231655Z .................................................................................................... 6800/9891
2020-04-14T02:46:45.3577576Z .................................i.................................................................. 6900/9891
2020-04-14T02:46:47.1400238Z .................................................................................................... 7000/9891
2020-04-14T02:46:49.0312391Z ........................................................................i........................... 7100/9891
---
2020-04-14T02:48:14.4834593Z .................................................................................................... 7800/9891
2020-04-14T02:48:18.3065098Z .................................................................................................... 7900/9891
2020-04-14T02:48:24.0568917Z .................................................................................................... 8000/9891
2020-04-14T02:48:29.7944665Z ......................................i............................................................. 8100/9891
2020-04-14T02:48:37.8969212Z ......................................................................................iiiiii.iiiii.i 8200/9891
2020-04-14T02:48:51.5595531Z ................................i......i............................................................ 8400/9891
2020-04-14T02:48:54.5828391Z .................................................................................................... 8500/9891
2020-04-14T02:49:03.4966655Z .................................................................................................... 8600/9891
2020-04-14T02:49:14.7641047Z .................................................................................................... 8700/9891
---
2020-04-14T02:50:54.1855128Z 
2020-04-14T02:50:54.1856039Z ---- [ui] ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs stdout ----
2020-04-14T02:50:54.1856435Z diff of stderr:
2020-04-14T02:50:54.1856658Z 
2020-04-14T02:50:54.1857468Z 18              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<&str>>
2020-04-14T02:50:54.1858357Z 19              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::borrow::Cow<'a, str>>>
2020-04-14T02:50:54.1859224Z 20              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::string::String>>
2020-04-14T02:50:54.1860147Z +            and 17 others
2020-04-14T02:50:54.1860673Z 22    = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
2020-04-14T02:50:54.1860673Z 22    = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
2020-04-14T02:50:54.1861419Z 23    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>`
2020-04-14T02:50:54.1862095Z 
2020-04-14T02:50:54.1862279Z 
2020-04-14T02:50:54.1862565Z The actual stderr differed from the expected stderr.
2020-04-14T02:50:54.1862565Z The actual stderr differed from the expected stderr.
2020-04-14T02:50:54.1863728Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33/alloc-types-no-impls-length-33.stderr
2020-04-14T02:50:54.1866032Z To update references, rerun the tests and pass the `--bless` flag
2020-04-14T02:50:54.1867537Z To only update this specific test, also pass `--test-args const-generics/array-impls/alloc-types-no-impls-length-33.rs`
2020-04-14T02:50:54.1868939Z error: 1 errors occurred comparing output.
2020-04-14T02:50:54.1869222Z status: exit code: 1
2020-04-14T02:50:54.1869222Z status: exit code: 1
2020-04-14T02:50:54.1872127Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33/auxiliary"
2020-04-14T02:50:54.1876523Z ------------------------------------------
2020-04-14T02:50:54.1876653Z 
2020-04-14T02:50:54.1876941Z ------------------------------------------
2020-04-14T02:50:54.1877095Z stderr:
2020-04-14T02:50:54.1877095Z stderr:
2020-04-14T02:50:54.1877402Z ------------------------------------------
2020-04-14T02:50:54.1877643Z error[E0277]: arrays only have std trait implementations for lengths 0..=32
2020-04-14T02:50:54.1878149Z   --> /checkout/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs:6:29
2020-04-14T02:50:54.1878388Z    |
2020-04-14T02:50:54.1878540Z LL |     let v: Vec<_> = [0; 33].into();
2020-04-14T02:50:54.1878859Z    |                             ^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[{integer}; 33]`
2020-04-14T02:50:54.1879133Z    |
2020-04-14T02:50:54.1879437Z    = note: required because of the requirements on the impl of `std::convert::From<[{integer}; 33]>` for `std::vec::Vec<{integer}>`
2020-04-14T02:50:54.1879944Z    = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<{integer}>>` for `[{integer}; 33]`
2020-04-14T02:50:54.1880211Z 
2020-04-14T02:50:54.1880487Z error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied
2020-04-14T02:50:54.1881407Z    |
2020-04-14T02:50:54.1881407Z    |
2020-04-14T02:50:54.1881638Z LL |     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
2020-04-14T02:50:54.1882141Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
2020-04-14T02:50:54.1882670Z    = help: the following implementations were found:
2020-04-14T02:50:54.1882670Z    = help: the following implementations were found:
2020-04-14T02:50:54.1883352Z              <std::boxed::Box<(dyn std::error::Error + 'a)> as std::convert::From<E>>
2020-04-14T02:50:54.1883979Z              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<&str>>
2020-04-14T02:50:54.1884678Z              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::borrow::Cow<'a, str>>>
2020-04-14T02:50:54.1885411Z              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::string::String>>
2020-04-14T02:50:54.1886145Z    = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
2020-04-14T02:50:54.1886145Z    = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
2020-04-14T02:50:54.1886781Z    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>`
2020-04-14T02:50:54.1887119Z 
2020-04-14T02:50:54.1887439Z error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
2020-04-14T02:50:54.1888384Z    |
2020-04-14T02:50:54.1888384Z    |
2020-04-14T02:50:54.1888609Z LL |     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
2020-04-14T02:50:54.1889278Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
2020-04-14T02:50:54.1889996Z    = help: the following implementations were found:
2020-04-14T02:50:54.1889996Z    = help: the following implementations were found:
2020-04-14T02:50:54.1890367Z              <std::boxed::Box<[T; _]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
2020-04-14T02:50:54.1890603Z 
2020-04-14T02:50:54.1892838Z error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
2020-04-14T02:50:54.1894049Z    |
2020-04-14T02:50:54.1894049Z    |
2020-04-14T02:50:54.1894273Z LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2020-04-14T02:50:54.1894778Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
2020-04-14T02:50:54.1895360Z    = help: the following implementations were found:
2020-04-14T02:50:54.1895360Z    = help: the following implementations were found:
2020-04-14T02:50:54.1895761Z              <std::rc::Rc<T> as std::convert::From<T>>
2020-04-14T02:50:54.1896054Z              <std::rc::Rc<T> as std::convert::From<std::boxed::Box<T>>>
2020-04-14T02:50:54.1896348Z              <std::rc::Rc<[T]> as std::convert::From<&[T]>>
2020-04-14T02:50:54.1896661Z              <std::rc::Rc<[T]> as std::convert::From<std::vec::Vec<T>>>
2020-04-14T02:50:54.1896893Z            and 8 others
2020-04-14T02:50:54.1897221Z    = note: required because of the requirements on the impl of `std::convert::Into<std::rc::Rc<[i32; 33]>>` for `std::rc::Rc<[i32]>`
2020-04-14T02:50:54.1897747Z    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>`
2020-04-14T02:50:54.1898028Z 
2020-04-14T02:50:54.1898295Z error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
2020-04-14T02:50:54.1899114Z    |
2020-04-14T02:50:54.1899114Z    |
2020-04-14T02:50:54.1899394Z LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2020-04-14T02:50:54.1899840Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
2020-04-14T02:50:54.1900400Z    = help: the following implementations were found:
2020-04-14T02:50:54.1900400Z    = help: the following implementations were found:
2020-04-14T02:50:54.1900718Z              <std::rc::Rc<[T; _]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
2020-04-14T02:50:54.1900912Z 
2020-04-14T02:50:54.1901182Z error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
2020-04-14T02:50:54.1902008Z    |
2020-04-14T02:50:54.1902008Z    |
2020-04-14T02:50:54.1902202Z LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
2020-04-14T02:50:54.1902654Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
2020-04-14T02:50:54.1903174Z    = help: the following implementations were found:
2020-04-14T02:50:54.1903174Z    = help: the following implementations were found:
2020-04-14T02:50:54.1903454Z              <std::sync::Arc<T> as std::convert::From<T>>
2020-04-14T02:50:54.1903755Z              <std::sync::Arc<T> as std::convert::From<std::boxed::Box<T>>>
2020-04-14T02:50:54.1904057Z              <std::sync::Arc<[T]> as std::convert::From<&[T]>>
2020-04-14T02:50:54.1904375Z              <std::sync::Arc<[T]> as std::convert::From<std::vec::Vec<T>>>
2020-04-14T02:50:54.1904607Z            and 8 others
2020-04-14T02:50:54.1904947Z    = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<[i32; 33]>>` for `std::sync::Arc<[i32]>`
2020-04-14T02:50:54.1905494Z    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>`
2020-04-14T02:50:54.1905955Z 
2020-04-14T02:50:54.1906276Z error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
2020-04-14T02:50:54.1908278Z    |
2020-04-14T02:50:54.1908278Z    |
2020-04-14T02:50:54.1908528Z LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
2020-04-14T02:50:54.1909091Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
2020-04-14T02:50:54.1909740Z    = help: the following implementations were found:
2020-04-14T02:50:54.1909740Z    = help: the following implementations were found:
2020-04-14T02:50:54.1910134Z              <std::sync::Arc<[T; _]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
2020-04-14T02:50:54.1910560Z error: aborting due to 7 previous errors
2020-04-14T02:50:54.1910715Z 
2020-04-14T02:50:54.1911147Z For more information about this error, try `rustc --explain E0277`.
2020-04-14T02:50:54.1911343Z 
---
2020-04-14T02:50:54.1914843Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-04-14T02:50:54.1915238Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-04-14T02:50:54.1915447Z 
2020-04-14T02:50:54.1915537Z 
2020-04-14T02:50:54.1919082Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-04-14T02:50:54.1921472Z 
2020-04-14T02:50:54.1921566Z 
2020-04-14T02:50:54.1925229Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-14T02:50:54.1925584Z Build completed unsuccessfully in 0:54:32
2020-04-14T02:50:54.1925584Z Build completed unsuccessfully in 0:54:32
2020-04-14T02:50:54.1951479Z == clock drift check ==
2020-04-14T02:50:54.1970457Z   local time: Tue Apr 14 02:50:54 UTC 2020
2020-04-14T02:50:54.3640956Z   network time: Tue, 14 Apr 2020 02:50:54 GMT
2020-04-14T02:50:54.7691001Z 
2020-04-14T02:50:54.7691001Z 
2020-04-14T02:50:54.7759159Z ##[error]Bash exited with code '1'.
2020-04-14T02:50:54.7771721Z ##[section]Finishing: Run build
2020-04-14T02:50:54.7810427Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-14T02:50:54.7815350Z Task         : Get sources
2020-04-14T02:50:54.7815640Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-14T02:50:54.7815918Z Version      : 1.0.0
2020-04-14T02:50:54.7816112Z Author       : Microsoft
2020-04-14T02:50:54.7816112Z Author       : Microsoft
2020-04-14T02:50:54.7816418Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-14T02:50:54.7816768Z ==============================================================================
2020-04-14T02:50:55.0632784Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-14T02:50:55.0677368Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-14T02:50:55.0807720Z Cleaning up task key
2020-04-14T02:50:55.0808740Z Start cleaning up orphan processes.
2020-04-14T02:50:55.0993571Z Terminate orphan process: pid (3571) (python)
2020-04-14T02:50:55.1131863Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-8 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-04-19T15:36:23.0971458Z ========================== Starting Command Output ===========================
2020-04-19T15:36:23.0976809Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/1abf3e9a-3271-4d06-ae56-d9166c025e45.sh
2020-04-19T15:36:23.0977253Z 
2020-04-19T15:36:23.0982334Z ##[section]Finishing: Disable git automatic line ending conversion
2020-04-19T15:36:23.0999864Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-19T15:36:23.1003019Z Task         : Get sources
2020-04-19T15:36:23.1003290Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-19T15:36:23.1003554Z Version      : 1.0.0
2020-04-19T15:36:23.1003753Z Author       : Microsoft
---
2020-04-19T15:36:24.2708092Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-04-19T15:36:24.2717398Z ##[command]git config gc.auto 0
2020-04-19T15:36:24.2724415Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-04-19T15:36:24.2731431Z ##[command]git config --get-all http.proxy
2020-04-19T15:36:24.2742502Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71095/merge:refs/remotes/pull/71095/merge
---
2020-04-19T15:38:42.8414670Z  ---> 318032b5f0e2
2020-04-19T15:38:42.8415631Z Step 5/8 : ENV RUST_CONFIGURE_ARGS       --build=x86_64-unknown-linux-gnu       --llvm-root=/usr/lib/llvm-8       --enable-llvm-link-shared       --set rust.thin-lto-import-instr-limit=10
2020-04-19T15:38:42.8420266Z  ---> Using cache
2020-04-19T15:38:42.8420615Z  ---> d44a858fd1ce
2020-04-19T15:38:42.8435295Z Step 6/8 : ENV SCRIPT python2.7 ../x.py test --exclude src/tools/tidy &&            python2.7 ../x.py test src/test/mir-opt --pass=build                                   --target=armv5te-unknown-linux-gnueabi &&            python2.7 ../x.py test src/tools/tidy
2020-04-19T15:38:42.8439611Z  ---> 58b910f50f5a
2020-04-19T15:38:42.8440021Z Step 7/8 : ENV NO_DEBUG_ASSERTIONS=1
2020-04-19T15:38:42.8484393Z  ---> Using cache
2020-04-19T15:38:42.8485002Z  ---> ee7702aadba1
---
2020-04-19T15:38:42.8817241Z Looks like docker image is the same as before, not uploading
2020-04-19T15:38:50.8178747Z [CI_JOB_NAME=x86_64-gnu-llvm-8]
2020-04-19T15:38:50.8425176Z [CI_JOB_NAME=x86_64-gnu-llvm-8]
2020-04-19T15:38:50.8451594Z == clock drift check ==
2020-04-19T15:38:50.8474419Z   local time: Sun Apr 19 15:38:50 UTC 2020
2020-04-19T15:38:50.9072033Z   network time: Sun, 19 Apr 2020 15:38:50 GMT
2020-04-19T15:38:50.9095816Z Starting sccache server...
2020-04-19T15:38:50.9887511Z configure: processing command line
2020-04-19T15:38:50.9887711Z configure: 
2020-04-19T15:38:50.9888653Z configure: rust.dist-src        := False
---
2020-04-19T15:44:17.0477759Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-19T15:44:18.5778357Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-19T15:44:20.2150998Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-19T15:44:22.4184415Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-19T15:44:30.7834014Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-19T15:44:34.7383743Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-19T15:44:39.3902913Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-19T15:44:43.7399300Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-19T15:44:52.5337809Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-19T16:08:19.2762043Z    Compiling rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2020-04-19T16:08:21.0240887Z    Compiling fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2020-04-19T16:08:22.9344242Z    Compiling rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
2020-04-19T16:08:24.2130695Z    Compiling rustc_hir v0.0.0 (/checkout/src/librustc_hir)
2020-04-19T16:08:34.0869859Z    Compiling rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
2020-04-19T16:08:37.8836042Z    Compiling rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
2020-04-19T16:08:42.8778842Z    Compiling rustc_attr v0.0.0 (/checkout/src/librustc_attr)
2020-04-19T16:08:47.5821097Z    Compiling rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2020-04-19T16:08:57.1977059Z    Compiling rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
2020-04-19T16:32:43.9278937Z .................................................................................................... 1700/9907
2020-04-19T16:32:47.9380599Z .................................................................................................... 1800/9907
2020-04-19T16:32:56.4620388Z ..................................................................................................i. 1900/9907
2020-04-19T16:33:04.0631632Z .................................................................................................... 2000/9907
2020-04-19T16:33:10.2705628Z ........................................................................................iiiii....... 2100/9907
2020-04-19T16:33:30.0602885Z .................................................................................................... 2300/9907
2020-04-19T16:33:32.2368406Z .................................................................................................... 2400/9907
2020-04-19T16:33:34.4726104Z .................................................................................................... 2500/9907
2020-04-19T16:33:40.4131973Z .................................................................................................... 2600/9907
---
2020-04-19T16:36:28.2187245Z ................................................................i...............i................... 5000/9907
2020-04-19T16:36:35.4116231Z .................................................................................................... 5100/9907
2020-04-19T16:36:42.4502655Z .................................................................................................... 5200/9907
2020-04-19T16:36:47.5483684Z ..........i......................................................................................... 5300/9907
2020-04-19T16:36:57.1446465Z i................................................................................................... 5400/9907
2020-04-19T16:37:01.8105935Z ii.ii........i...i.................................................................................. 5500/9907
2020-04-19T16:37:09.3773399Z ...............................................i.................................................... 5700/9907
2020-04-19T16:37:18.4103260Z ...............................................................................ii................... 5800/9907
2020-04-19T16:37:25.3058659Z ..................i................................................................................. 5900/9907
2020-04-19T16:37:30.5599033Z .................................................................................................... 6000/9907
2020-04-19T16:37:30.5599033Z .................................................................................................... 6000/9907
2020-04-19T16:37:41.0299747Z .................................................................................................... 6100/9907
2020-04-19T16:37:51.1973506Z ............ii...i..ii...........i.................................................................. 6200/9907
2020-04-19T16:38:06.3287331Z .................................................................................................... 6400/9907
2020-04-19T16:38:13.0050554Z .................................................................................................... 6500/9907
2020-04-19T16:38:13.0050554Z .................................................................................................... 6500/9907
2020-04-19T16:38:28.0756228Z ..........................................i..ii..................................................... 6600/9907
2020-04-19T16:38:49.4652083Z .................................................................................................... 6800/9907
2020-04-19T16:38:51.5900113Z ...........................................i........................................................ 6900/9907
2020-04-19T16:38:53.6912577Z .................................................................................................... 7000/9907
2020-04-19T16:38:55.8036187Z ...................................................................................i................ 7100/9907
---
2020-04-19T16:40:28.8107965Z .................................................................................................... 7800/9907
2020-04-19T16:40:33.2768441Z .................................................................................................... 7900/9907
2020-04-19T16:40:39.7335495Z .................................................................................................... 8000/9907
2020-04-19T16:40:45.5716097Z ..................................................i................................................. 8100/9907
2020-04-19T16:40:55.3412892Z ..................................................................................................ii 8200/9907
2020-04-19T16:41:00.6158925Z iiii.iiiii.i........................................................................................ 8300/9907
2020-04-19T16:41:13.9573428Z .................................................................................................... 8500/9907
2020-04-19T16:41:21.9921464Z .................................................................................................... 8600/9907
2020-04-19T16:41:35.6263912Z .................................................................................................... 8700/9907
2020-04-19T16:41:42.3295337Z .................................................................................................... 8800/9907
---
2020-04-19T16:43:29.7733444Z 
2020-04-19T16:43:29.7734657Z ---- [ui] ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs stdout ----
2020-04-19T16:43:29.7736109Z diff of stderr:
2020-04-19T16:43:29.7736427Z 
2020-04-19T16:43:29.7736859Z 32              <std::boxed::Box<[T; _]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
2020-04-19T16:43:29.7737290Z 33 
2020-04-19T16:43:29.7737754Z 34 error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7739575Z +   --> $DIR/alloc-types-no-impls-length-33.rs:21:23
2020-04-19T16:43:29.7739948Z 36    |
2020-04-19T16:43:29.7739948Z 36    |
2020-04-19T16:43:29.7740348Z 37 LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7741040Z 38    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
2020-04-19T16:43:29.7741552Z 
2020-04-19T16:43:29.7742087Z 47    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>`
2020-04-19T16:43:29.7742589Z 48 
2020-04-19T16:43:29.7743040Z 49 error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7744646Z +   --> $DIR/alloc-types-no-impls-length-33.rs:21:23
2020-04-19T16:43:29.7745045Z 51    |
2020-04-19T16:43:29.7745045Z 51    |
2020-04-19T16:43:29.7745424Z 52 LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7746094Z 53    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
2020-04-19T16:43:29.7746858Z 
2020-04-19T16:43:29.7747278Z 56              <std::rc::Rc<[T; _]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
2020-04-19T16:43:29.7747665Z 57 
2020-04-19T16:43:29.7748154Z 58 error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7749676Z +   --> $DIR/alloc-types-no-impls-length-33.rs:28:23
2020-04-19T16:43:29.7750055Z 60    |
2020-04-19T16:43:29.7750055Z 60    |
2020-04-19T16:43:29.7750430Z 61 LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7751114Z 62    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
2020-04-19T16:43:29.7751608Z 
2020-04-19T16:43:29.7752127Z 71    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>`
2020-04-19T16:43:29.7752674Z 72 
2020-04-19T16:43:29.7753141Z 73 error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7754832Z +   --> $DIR/alloc-types-no-impls-length-33.rs:28:23
2020-04-19T16:43:29.7755205Z 75    |
2020-04-19T16:43:29.7755205Z 75    |
2020-04-19T16:43:29.7755606Z 76 LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7756295Z 77    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
2020-04-19T16:43:29.7757047Z 
2020-04-19T16:43:29.7757353Z The actual stderr differed from the expected stderr.
2020-04-19T16:43:29.7757353Z The actual stderr differed from the expected stderr.
2020-04-19T16:43:29.7758257Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33/alloc-types-no-impls-length-33.stderr
2020-04-19T16:43:29.7759181Z To update references, rerun the tests and pass the `--bless` flag
2020-04-19T16:43:29.7760044Z To only update this specific test, also pass `--test-args const-generics/array-impls/alloc-types-no-impls-length-33.rs`
2020-04-19T16:43:29.7762838Z error: 1 errors occurred comparing output.
2020-04-19T16:43:29.7763197Z status: exit code: 1
2020-04-19T16:43:29.7763197Z status: exit code: 1
2020-04-19T16:43:29.7765490Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33" "-A" "unused" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33/auxiliary"
2020-04-19T16:43:29.7767514Z ------------------------------------------
2020-04-19T16:43:29.7767825Z 
2020-04-19T16:43:29.7768348Z ------------------------------------------
2020-04-19T16:43:29.7768708Z stderr:
2020-04-19T16:43:29.7768708Z stderr:
2020-04-19T16:43:29.7769286Z ------------------------------------------
2020-04-19T16:43:29.7770807Z error[E0277]: arrays only have std trait implementations for lengths 0..=32
2020-04-19T16:43:29.7771545Z   --> /checkout/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs:6:29
2020-04-19T16:43:29.7771828Z    |
2020-04-19T16:43:29.7772035Z LL |     let v: Vec<_> = [0; 33].into();
2020-04-19T16:43:29.7772434Z    |                             ^^^^ the trait `std::array::LengthAtMost32` is not implemented for `[{integer}; 33]`
2020-04-19T16:43:29.7772763Z    |
2020-04-19T16:43:29.7773163Z    = note: required because of the requirements on the impl of `std::convert::From<[{integer}; 33]>` for `std::vec::Vec<{integer}>`
2020-04-19T16:43:29.7776396Z    = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<{integer}>>` for `[{integer}; 33]`
2020-04-19T16:43:29.7776757Z 
2020-04-19T16:43:29.7777247Z error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied
2020-04-19T16:43:29.7778449Z    |
2020-04-19T16:43:29.7778449Z    |
2020-04-19T16:43:29.7778713Z LL |     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7779273Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
2020-04-19T16:43:29.7779957Z    = help: the following implementations were found:
2020-04-19T16:43:29.7779957Z    = help: the following implementations were found:
2020-04-19T16:43:29.7780589Z              <std::boxed::Box<(dyn std::error::Error + 'a)> as std::convert::From<E>>
2020-04-19T16:43:29.7781276Z              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<&str>>
2020-04-19T16:43:29.7782178Z              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::borrow::Cow<'a, str>>>
2020-04-19T16:43:29.7783009Z              <std::boxed::Box<(dyn std::error::Error + 'static)> as std::convert::From<std::string::String>>
2020-04-19T16:43:29.7783829Z    = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
2020-04-19T16:43:29.7783829Z    = note: required because of the requirements on the impl of `std::convert::Into<std::boxed::Box<[i32; 33]>>` for `std::boxed::Box<[i32]>`
2020-04-19T16:43:29.7784626Z    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::boxed::Box<[i32]>>` for `std::boxed::Box<[i32; 33]>`
2020-04-19T16:43:29.7785007Z 
2020-04-19T16:43:29.7785343Z error[E0277]: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
2020-04-19T16:43:29.7786354Z    |
2020-04-19T16:43:29.7786354Z    |
2020-04-19T16:43:29.7786595Z LL |     let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7787279Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::boxed::Box<[i32]>>` is not implemented for `std::boxed::Box<[i32; 33]>`
2020-04-19T16:43:29.7787957Z    = help: the following implementations were found:
2020-04-19T16:43:29.7787957Z    = help: the following implementations were found:
2020-04-19T16:43:29.7788343Z              <std::boxed::Box<[T; _]> as std::convert::TryFrom<std::boxed::Box<[T]>>>
2020-04-19T16:43:29.7788606Z 
2020-04-19T16:43:29.7788950Z error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::From<std::rc::Rc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7790087Z    |
2020-04-19T16:43:29.7790087Z    |
2020-04-19T16:43:29.7790329Z LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7790828Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
2020-04-19T16:43:29.7791458Z    = help: the following implementations were found:
2020-04-19T16:43:29.7791458Z    = help: the following implementations were found:
2020-04-19T16:43:29.7791773Z              <std::rc::Rc<T> as std::convert::From<T>>
2020-04-19T16:43:29.7792119Z              <std::rc::Rc<T> as std::convert::From<std::boxed::Box<T>>>
2020-04-19T16:43:29.7792493Z              <std::rc::Rc<[T]> as std::convert::From<&[T]>>
2020-04-19T16:43:29.7792848Z              <std::rc::Rc<[T]> as std::convert::From<std::vec::Vec<T>>>
2020-04-19T16:43:29.7793142Z            and 8 others
2020-04-19T16:43:29.7793543Z    = note: required because of the requirements on the impl of `std::convert::Into<std::rc::Rc<[i32; 33]>>` for `std::rc::Rc<[i32]>`
2020-04-19T16:43:29.7794258Z    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::rc::Rc<[i32]>>` for `std::rc::Rc<[i32; 33]>`
2020-04-19T16:43:29.7794606Z 
2020-04-19T16:43:29.7794946Z error[E0277]: the trait bound `std::rc::Rc<[i32; 33]>: std::convert::TryFrom<std::rc::Rc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7795957Z    |
2020-04-19T16:43:29.7795957Z    |
2020-04-19T16:43:29.7796209Z LL |     let boxed_array = <Rc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7796732Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::rc::Rc<[i32]>>` is not implemented for `std::rc::Rc<[i32; 33]>`
2020-04-19T16:43:29.7797369Z    = help: the following implementations were found:
2020-04-19T16:43:29.7797369Z    = help: the following implementations were found:
2020-04-19T16:43:29.7797728Z              <std::rc::Rc<[T; _]> as std::convert::TryFrom<std::rc::Rc<[T]>>>
2020-04-19T16:43:29.7797972Z 
2020-04-19T16:43:29.7798315Z error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::From<std::sync::Arc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7799369Z    |
2020-04-19T16:43:29.7799369Z    |
2020-04-19T16:43:29.7799624Z LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7800156Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::From<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
2020-04-19T16:43:29.7800802Z    = help: the following implementations were found:
2020-04-19T16:43:29.7800802Z    = help: the following implementations were found:
2020-04-19T16:43:29.7801252Z              <std::sync::Arc<T> as std::convert::From<T>>
2020-04-19T16:43:29.7801625Z              <std::sync::Arc<T> as std::convert::From<std::boxed::Box<T>>>
2020-04-19T16:43:29.7802020Z              <std::sync::Arc<[T]> as std::convert::From<&[T]>>
2020-04-19T16:43:29.7802404Z              <std::sync::Arc<[T]> as std::convert::From<std::vec::Vec<T>>>
2020-04-19T16:43:29.7802696Z            and 8 others
2020-04-19T16:43:29.7803142Z    = note: required because of the requirements on the impl of `std::convert::Into<std::sync::Arc<[i32; 33]>>` for `std::sync::Arc<[i32]>`
2020-04-19T16:43:29.7803809Z    = note: required because of the requirements on the impl of `std::convert::TryFrom<std::sync::Arc<[i32]>>` for `std::sync::Arc<[i32; 33]>`
2020-04-19T16:43:29.7804185Z 
2020-04-19T16:43:29.7804542Z error[E0277]: the trait bound `std::sync::Arc<[i32; 33]>: std::convert::TryFrom<std::sync::Arc<[i32]>>` is not satisfied
2020-04-19T16:43:29.7805592Z    |
2020-04-19T16:43:29.7805592Z    |
2020-04-19T16:43:29.7805855Z LL |     let boxed_array = <Arc<[i32; 33]>>::try_from(boxed_slice);
2020-04-19T16:43:29.7806414Z    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::convert::TryFrom<std::sync::Arc<[i32]>>` is not implemented for `std::sync::Arc<[i32; 33]>`
2020-04-19T16:43:29.7807078Z    = help: the following implementations were found:
2020-04-19T16:43:29.7807078Z    = help: the following implementations were found:
2020-04-19T16:43:29.7807512Z              <std::sync::Arc<[T; _]> as std::convert::TryFrom<std::sync::Arc<[T]>>>
2020-04-19T16:43:29.7807962Z error: aborting due to 7 previous errors
2020-04-19T16:43:29.7808121Z 
2020-04-19T16:43:29.7808550Z For more information about this error, try `rustc --explain E0277`.
2020-04-19T16:43:29.7808750Z 
---
2020-04-19T16:43:29.7811658Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-04-19T16:43:29.7812165Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-04-19T16:43:29.7812422Z 
2020-04-19T16:43:29.7812536Z 
2020-04-19T16:43:29.7818431Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-8/bin/FileCheck" "--nodejs" "/usr/bin/node" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "8.0.0" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-04-19T16:43:29.7821699Z 
2020-04-19T16:43:29.7821797Z 
2020-04-19T16:43:29.7822465Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --exclude src/tools/tidy
2020-04-19T16:43:29.7822819Z Build completed unsuccessfully in 1:03:02
2020-04-19T16:43:29.7822819Z Build completed unsuccessfully in 1:03:02
2020-04-19T16:43:29.7843725Z == clock drift check ==
2020-04-19T16:43:29.7864319Z   local time: Sun Apr 19 16:43:29 UTC 2020
2020-04-19T16:43:29.8572788Z   network time: Sun, 19 Apr 2020 16:43:29 GMT
2020-04-19T16:43:30.2560315Z 
2020-04-19T16:43:30.2560315Z 
2020-04-19T16:43:30.2637088Z ##[error]Bash exited with code '1'.
2020-04-19T16:43:30.2648895Z ##[section]Finishing: Run build
2020-04-19T16:43:30.2712195Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-19T16:43:30.2716478Z Task         : Get sources
2020-04-19T16:43:30.2716763Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-04-19T16:43:30.2717040Z Version      : 1.0.0
2020-04-19T16:43:30.2717232Z Author       : Microsoft
2020-04-19T16:43:30.2717232Z Author       : Microsoft
2020-04-19T16:43:30.2717534Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-04-19T16:43:30.2717902Z ==============================================================================
2020-04-19T16:43:30.6182647Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-04-19T16:43:30.6232767Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/71095/merge to s
2020-04-19T16:43:30.6330780Z Cleaning up task key
2020-04-19T16:43:30.6331975Z Start cleaning up orphan processes.
2020-04-19T16:43:30.6534982Z Terminate orphan process: pid (5598) (python)
2020-04-19T16:43:30.6707257Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@jyn514
Copy link
Member

jyn514 commented Apr 19, 2020

@pickfire
Copy link
Contributor Author

pickfire commented Apr 20, 2020

@jyn514 I got this error running --bless. Code

pub fn no_box() {
    let boxed_slice = Box::new([0; 33]) as Box<[i32]>;
    let boxed_array = <Box<[i32; 33]>>::try_from(boxed_slice);
    //~^ ERROR the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<std::boxed::Box<[i32]>>` is not satisfied
    //~^^ ERROR the trait bound `std::boxed::Box<[i32; 33]>: std::convert::TryFrom<std::boxed::Box<[i32]>>` is not satisfied
    // XXX below is new
    let boxed_array = <Box<[i32; 33]>>::from([0; 33]);
    //~^ ERROR the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<[i32; 33]>` is not satisfied
}
Error log.
failures:

---- [ui] ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs stdout ----

The actual stderr differed from the expected stderr.
Actual stderr saved to /home/pickfire/rust/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33/alloc-types-no-impls-length-33.stderr
Actual stderr saved to /home/pickfire/rust/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.stderr

error: /home/pickfire/rust/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs:15: expected error not found: the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<[i32; 33]>` is not satisfied

error: 0 unexpected errors found, 1 expected errors not found
status: exit code: 1
command: "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/home/pickfire/rust/src/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs""-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir""/home/pickfire/rust/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33" "-A" "unused" "-Crpath" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/home/pickfire/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/test/ui/const-generics/array-impls/alloc-types-no-impls-length-33/auxiliary"
not found errors (from test file): [
    Error {
        line_num: 15,
        kind: Some(
            Error,
        ),
        msg: "the trait bound `std::boxed::Box<[i32; 33]>: std::convert::From<[i32; 33]>` is not satisfied",
    },
]

thread '[ui] ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs' panickedat 'explicit panic', src/tools/compiletest/src/runtest.rs:1459:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
    [ui] ui/const-generics/array-impls/alloc-types-no-impls-length-33.rs

test result: FAILED. 9831 passed; 1 failed; 59 ignored; 0 measured; 0 filtered out

thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22


command did not execute successfully: "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/home/pickfire/rust/src/test/ui" "--build-base" "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/home/pickfire/rust/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--bless" "--host-rustcflags" "-Crpath -Cdebuginfo=0 -Zunstable-options  -Lnative=/home/pickfire/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -Cdebuginfo=0 -Zunstable-options  -Lnative=/home/pickfire/rust/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python" "--lldb-python" "/usr/bin/python" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "9.0.1-rust-dev" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" ""
expected success, got: exit code: 101


failed to run: /home/pickfire/rust/build/bootstrap/debug/bootstrap test --bless
Build completed unsuccessfully in 0:24:57

I believe it wasn't found. What should I do?

@jyn514
Copy link
Member

jyn514 commented Apr 20, 2020

I don't think that tests what you want to test, let boxed_array = <Box<[i32; 33]>>::from([0; 33]); already compiles on stable: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bf9b13edb514098ec1906985fbea01db

Try let boxed_slice = <Box<[i32]>>::from([0; 33]); instead.

@pickfire
Copy link
Contributor Author

@jyn514 Ah, thanks a lot. I didn't saw that.

@Dylan-DPC-zz Dylan-DPC-zz modified the milestones: 1.44, 1.45 Apr 21, 2020
@crlf0710 crlf0710 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 2, 2020
Copy link
Member

@LukasKalbertodt LukasKalbertodt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. This seems like a useful addition to me. Just a few minor inline comments.

src/liballoc/boxed.rs Outdated Show resolved Hide resolved
src/liballoc/boxed.rs Outdated Show resolved Hide resolved
src/liballoc/boxed.rs Outdated Show resolved Hide resolved
@dtolnay
Copy link
Member

dtolnay commented May 28, 2020

@bors r+

@bors
Copy link
Contributor

bors commented May 28, 2020

📌 Commit a8ed9aa has been approved by dtolnay

@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 May 28, 2020
JohnTitor added a commit to JohnTitor/rust that referenced this pull request May 28, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request May 29, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request May 29, 2020
RalfJung added a commit to RalfJung/rust that referenced this pull request May 29, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request May 29, 2020
@rfcbot rfcbot added the finished-final-comment-period The final comment period is finished for this PR / Issue. label May 29, 2020
@rfcbot
Copy link

rfcbot commented May 29, 2020

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@rfcbot rfcbot removed the final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. label May 29, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request May 29, 2020
Rollup of 9 pull requests

Successful merges:

 - rust-lang#67460 (Tweak impl signature mismatch errors involving `RegionKind::ReVar` lifetimes)
 - rust-lang#71095 (impl From<[T; N]> for Box<[T]>)
 - rust-lang#71500 (Make pointer offset methods/intrinsics const)
 - rust-lang#71804 (linker: Support `-static-pie` and `-static -shared`)
 - rust-lang#71862 (Implement RFC 2585: unsafe blocks in unsafe fn)
 - rust-lang#72103 (borrowck `DefId` -> `LocalDefId`)
 - rust-lang#72407 (Various minor improvements to Ipv6Addr::Display)
 - rust-lang#72413 (impl Step for char (make Range*<char> iterable))
 - rust-lang#72439 (NVPTX support for new asm!)

Failed merges:

r? @ghost
@bors bors merged commit b387a11 into rust-lang:master May 30, 2020
@pickfire pickfire deleted the box-from-array branch May 30, 2020 11:49
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 6, 2020
While here clean up all pkglint warnings.  Changes since 1.44.1:

Version 1.45.2 (2020-08-03)
==========================

* [Fix bindings in tuple struct patterns][74954]
* [Fix track_caller integration with trait objects][74784]

[74954]: rust-lang/rust#74954
[74784]: rust-lang/rust#74784

Version 1.45.1 (2020-07-30)
==========================

* [Fix const propagation with references.][73613]
* [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
* [Avoid spurious implicit region bound.][74509]
* [Install clippy on x.py install][74457]

[73613]: rust-lang/rust#73613
[73078]: rust-lang/rust#73078
[74509]: rust-lang/rust#74509
[74457]: rust-lang/rust#74457

Version 1.45.0 (2020-07-16)
==========================

Language
--------
- [Out of range float to int conversions using `as` has been defined as a saturating
  conversion.][71269] This was previously undefined behaviour, but you can use the
   `{f64, f32}::to_int_unchecked` methods to continue using the current behaviour, which
   may be desirable in rare performance sensitive situations.
- [`mem::Discriminant<T>` now uses `T`'s discriminant type instead of always
  using `u64`.][70705]
- [Function like procedural macros can now be used in expression, pattern, and  statement
  positions.][68717] This means you can now use a function-like procedural macro
  anywhere you can use a declarative (`macro_rules!`) macro.

Compiler
--------
- [You can now override individual target features through the `target-feature`
  flag.][72094] E.g. `-C target-feature=+avx2 -C target-feature=+fma` is now
  equivalent to `-C target-feature=+avx2,+fma`.
- [Added the `force-unwind-tables` flag.][69984] This option allows
  rustc to always generate unwind tables regardless of panic strategy.
- [Added the `embed-bitcode` flag.][71716] This codegen flag allows rustc
  to include LLVM bitcode into generated `rlib`s (this is on by default).
- [Added the `tiny` value to the `code-model` codegen flag.][72397]
- [Added tier 3 support\* for the `mipsel-sony-psp` target.][72062]
- [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133]

\* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.


Libraries
---------
- [`net::{SocketAddr, SocketAddrV4, SocketAddrV6}` now implements `PartialOrd`
  and `Ord`.][72239]
- [`proc_macro::TokenStream` now implements `Default`.][72234]
- [You can now use `char` with
  `ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo}` to iterate over
  a range of codepoints.][72413] E.g.
  you can now write the following;
  ```rust
  for ch in 'a'..='z' {
      print!("{}", ch);
  }
  println!();
  // Prints "abcdefghijklmnopqrstuvwxyz"
  ```
- [`OsString` now implements `FromStr`.][71662]
- [The `saturating_neg` method as been added to all signed integer primitive
  types, and the `saturating_abs` method has been added for all integer
  primitive types.][71886]
- [`Arc<T>`, `Rc<T>` now implement  `From<Cow<'_, T>>`, and `Box` now
  implements `From<Cow>` when `T` is `[T: Copy]`, `str`, `CStr`, `OsStr`,
  or `Path`.][71447]
- [`Box<[T]>` now implements `From<[T; N]>`.][71095]
- [`BitOr` and `BitOrAssign` are implemented for all `NonZero`
  integer types.][69813]
- [The `fetch_min`, and `fetch_max` methods have been added to all atomic
  integer types.][72324]
- [The `fetch_update` method has been added to all atomic integer types.][71843]

Stabilized APIs
---------------
- [`Arc::as_ptr`]
- [`BTreeMap::remove_entry`]
- [`Rc::as_ptr`]
- [`rc::Weak::as_ptr`]
- [`rc::Weak::from_raw`]
- [`rc::Weak::into_raw`]
- [`str::strip_prefix`]
- [`str::strip_suffix`]
- [`sync::Weak::as_ptr`]
- [`sync::Weak::from_raw`]
- [`sync::Weak::into_raw`]
- [`char::UNICODE_VERSION`]
- [`Span::resolved_at`]
- [`Span::located_at`]
- [`Span::mixed_site`]
- [`unix::process::CommandExt::arg0`]

Cargo
-----

Misc
----
- [Rustdoc now supports strikethrough text in Markdown.][71928] E.g.
  `~~outdated information~~` becomes "~~outdated information~~".
- [Added an emoji to Rustdoc's deprecated API message.][72014]

Compatibility Notes
-------------------
- [Trying to self initialize a static value (that is creating a value using
  itself) is unsound and now causes a compile error.][71140]
- [`{f32, f64}::powi` now returns a slightly different value on Windows.][73420]
  This is due to changes in LLVM's intrinsics which `{f32, f64}::powi` uses.
- [Rustdoc's CLI's extra error exit codes have been removed.][71900] These were
  previously undocumented and not intended for public use. Rustdoc still provides
  a non-zero exit code on errors.

Internals Only
--------------
- [Make clippy a git subtree instead of a git submodule][70655]
- [Unify the undo log of all snapshot types][69464]

[73420]: rust-lang/rust#73420
[72324]: rust-lang/rust#72324
[71843]: rust-lang/rust#71843
[71886]: rust-lang/rust#71886
[72234]: rust-lang/rust#72234
[72239]: rust-lang/rust#72239
[72397]: rust-lang/rust#72397
[72413]: rust-lang/rust#72413
[72014]: rust-lang/rust#72014
[72062]: rust-lang/rust#72062
[72094]: rust-lang/rust#72094
[72133]: rust-lang/rust#72133
[71900]: rust-lang/rust#71900
[71928]: rust-lang/rust#71928
[71662]: rust-lang/rust#71662
[71716]: rust-lang/rust#71716
[71447]: rust-lang/rust#71447
[71269]: rust-lang/rust#71269
[71095]: rust-lang/rust#71095
[71140]: rust-lang/rust#71140
[70655]: rust-lang/rust#70655
[70705]: rust-lang/rust#70705
[69984]: rust-lang/rust#69984
[69813]: rust-lang/rust#69813
[69464]: rust-lang/rust#69464
[68717]: rust-lang/rust#68717
[`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr
[`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry
[`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr
[`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr
[`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw
[`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw
[`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr
[`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw
[`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw
[`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix
[`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix
[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html
[`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at
[`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at
[`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site
[`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0
@dtolnay dtolnay assigned dtolnay and unassigned SimonSapin Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.