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

Add primitive module to libcore #67637

Merged
merged 2 commits into from
Feb 26, 2020
Merged

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Dec 26, 2019

This re-exports the primitive types from libcore at core::primitive to allow
macro authors to have a reliable location to use them from.

Fixes #44865

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 26, 2019
@Mark-Simulacrum
Copy link
Member Author

cc @sgrif since you raised the issue

@rust-highfive
Copy link
Collaborator

The job mingw-check 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.
2019-12-26T17:59:50.3934284Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-26T17:59:50.4235386Z ##[command]git config gc.auto 0
2019-12-26T17:59:50.4316034Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-26T17:59:50.4373937Z ##[command]git config --get-all http.proxy
2019-12-26T17:59:50.4519251Z ##[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/67637/merge:refs/remotes/pull/67637/merge
---
2019-12-26T18:05:29.3618118Z   local time: Thu Dec 26 18:05:29 UTC 2019
2019-12-26T18:05:29.6521844Z   network time: Thu, 26 Dec 2019 18:05:29 GMT
2019-12-26T18:05:29.6525377Z == end clock drift check ==
2019-12-26T18:05:38.4414663Z 
2019-12-26T18:05:38.4483912Z ##[error]Bash exited with code '1'.
2019-12-26T18:05:38.4514819Z ##[section]Starting: Checkout
2019-12-26T18:05:38.4517037Z ==============================================================================
2019-12-26T18:05:38.4517084Z Task         : Get sources
2019-12-26T18:05:38.4517245Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks, this looks good to me.

Do we know how these get rendered by rustdoc? If they appear as pub type u8 = U8 then I think it's worth doing something about that before landing. I think ideally it should appear as pub use u8, similar to how non-doc(inline) reexports normally appear.

src/libcore/primitive.rs Outdated Show resolved Hide resolved
@Mark-Simulacrum
Copy link
Member Author

I've force-pushed an update. It looks like rustdoc currently has a bug (it panics) when it attempts to inline the documentation from a pub use u8;.

To avoid that, we instead directly include the same primitive file twice via #[path = ... ] on the module declaration in std.

The rendering is as follows in both core and std, unfortunately we do not get hyperlinking to the primitive type docs in either location.

image

Copy link
Member

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Nice, r=me once there is a tracking issue.

Could you also file a bug on rustdoc to get these hyperlinked and link to it from the tracking issue? It should work like the following which does get correctly hyperlinked:

#[doc(no_inline)]
pub use String;

Selection_141

@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.
2019-12-26T20:08:14.1172235Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-26T20:08:14.1189107Z ##[command]git config gc.auto 0
2019-12-26T20:08:14.1192513Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-26T20:08:14.1196184Z ##[command]git config --get-all http.proxy
2019-12-26T20:08:14.1198835Z ##[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/67637/merge:refs/remotes/pull/67637/merge
---
2019-12-26T21:03:53.4518510Z .................................................................................................... 1600/9456
2019-12-26T21:03:58.2216570Z .................................................................................................... 1700/9456
2019-12-26T21:04:06.9387904Z .............................................................................................i...... 1800/9456
2019-12-26T21:04:14.5028007Z .................................................................................................... 1900/9456
2019-12-26T21:04:20.6224493Z ...............................................................................iiiii................ 2000/9456
2019-12-26T21:04:40.3142319Z .................................................................................................... 2200/9456
2019-12-26T21:04:42.5206493Z .................................................................................................... 2300/9456
2019-12-26T21:04:44.8338543Z .................................................................................................... 2400/9456
2019-12-26T21:04:50.4424702Z .................................................................................................... 2500/9456
---
2019-12-26T21:07:34.4070946Z ..........i...............i......................................................................... 4900/9456
2019-12-26T21:07:43.7818678Z .................................................................................................... 5000/9456
2019-12-26T21:07:48.4900667Z ......................................................i............................................. 5100/9456
2019-12-26T21:07:57.2712367Z .................................................................................................... 5200/9456
2019-12-26T21:08:03.0293000Z .....................ii.ii...........i.............................................................. 5300/9456
2019-12-26T21:08:11.2806965Z .................................................................................................... 5500/9456
2019-12-26T21:08:21.3339832Z .................................................................................................... 5600/9456
2019-12-26T21:08:27.9238112Z ...i................................................................................................ 5700/9456
2019-12-26T21:08:33.0867268Z .................................................................................................... 5800/9456
2019-12-26T21:08:33.0867268Z .................................................................................................... 5800/9456
2019-12-26T21:08:42.3050036Z ...........................................................................................ii...i..i 5900/9456
2019-12-26T21:08:53.8728540Z i...........i....................................................................................... 6000/9456
2019-12-26T21:09:09.7154580Z .................................................................................................... 6200/9456
2019-12-26T21:09:16.4082290Z .................................................................................................... 6300/9456
2019-12-26T21:09:16.4082290Z .................................................................................................... 6300/9456
2019-12-26T21:09:31.8639371Z ..................i..ii............................................................................. 6400/9456
2019-12-26T21:09:50.0025069Z ...............................................................................................i.... 6600/9456
2019-12-26T21:09:51.8808575Z .................................................................................................... 6700/9456
2019-12-26T21:09:54.0000298Z ...............................................................................................i.... 6800/9456
2019-12-26T21:09:56.4218202Z .................................................................................................... 6900/9456
---
2019-12-26T21:11:26.3424593Z .................................................................................................... 7500/9456
2019-12-26T21:11:30.8090525Z .......................................................F............................................ 7600/9456
2019-12-26T21:11:36.8890782Z .................................................................................................... 7700/9456
2019-12-26T21:11:47.5831107Z .................................................................................................... 7800/9456
2019-12-26T21:11:52.9279523Z ...........................iiii..................................................................... 7900/9456
2019-12-26T21:12:06.0117168Z .................................................................................................... 8100/9456
2019-12-26T21:12:14.8047232Z .................................................................................................... 8200/9456
2019-12-26T21:12:27.4031420Z .................................................................................................... 8300/9456
2019-12-26T21:12:34.1141879Z .................................................................................................... 8400/9456
---
2019-12-26T21:14:20.0646282Z 14   --> $DIR/resolve-primitive-fallback.rs:3:5
2019-12-26T21:14:20.0646647Z 
2019-12-26T21:14:20.0646811Z 
2019-12-26T21:14:20.0646955Z The actual stderr differed from the expected stderr.
2019-12-26T21:14:20.0647479Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-primitive-fallback/resolve-primitive-fallback.stderr
2019-12-26T21:14:20.0648302Z To update references, rerun the tests and pass the `--bless` flag
2019-12-26T21:14:20.0648722Z To only update this specific test, also pass `--test-args resolve/resolve-primitive-fallback.rs`
2019-12-26T21:14:20.0648980Z error: 1 errors occurred comparing output.
2019-12-26T21:14:20.0649111Z status: exit code: 1
2019-12-26T21:14:20.0649111Z status: exit code: 1
2019-12-26T21:14:20.0649950Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/resolve-primitive-fallback.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-primitive-fallback" "-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/resolve/resolve-primitive-fallback/auxiliary" "-A" "unused"
2019-12-26T21:14:20.0650462Z ------------------------------------------
2019-12-26T21:14:20.0650609Z 
2019-12-26T21:14:20.0650902Z ------------------------------------------
2019-12-26T21:14:20.0651039Z stderr:
---
2019-12-26T21:14:20.0657554Z ---- [ui] ui/shadow-bool.rs stdout ----
2019-12-26T21:14:20.0657863Z 
2019-12-26T21:14:20.0658154Z error: test compilation failed although it shouldn't!
2019-12-26T21:14:20.0658296Z status: exit code: 1
2019-12-26T21:14:20.0661807Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/shadow-bool.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/shadow-bool" "-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/shadow-bool/auxiliary" "-A" "unused"
2019-12-26T21:14:20.0662887Z ------------------------------------------
2019-12-26T21:14:20.0662916Z 
2019-12-26T21:14:20.0663085Z ------------------------------------------
2019-12-26T21:14:20.0663136Z stderr:
---
2019-12-26T21:14:20.0663767Z 
2019-12-26T21:14:20.0663827Z error[E0601]: `main` function not found in crate `shadow_bool`
2019-12-26T21:14:20.0664635Z   --> /checkout/src/test/ui/shadow-bool.rs:3:1
2019-12-26T21:14:20.0664690Z    |
2019-12-26T21:14:20.0664750Z LL | / mod bar {
2019-12-26T21:14:20.0664795Z LL | |     pub trait QueryId {
2019-12-26T21:14:20.0664843Z LL | |         const SOME_PROPERTY: bool;
2019-12-26T21:14:20.0664946Z ...  |
2019-12-26T21:14:20.0664993Z LL | |     const SOME_PROPERTY: core::primitive::bool = true;
2019-12-26T21:14:20.0665039Z LL | | }
2019-12-26T21:14:20.0665039Z LL | | }
2019-12-26T21:14:20.0665321Z    | |_^ consider adding a `main` function to `/checkout/src/test/ui/shadow-bool.rs`
2019-12-26T21:14:20.0665402Z error: aborting due to previous error
2019-12-26T21:14:20.0665432Z 
2019-12-26T21:14:20.0665700Z For more information about this error, try `rustc --explain E0601`.
2019-12-26T21:14:20.0665736Z 
---
2019-12-26T21:14:20.0667131Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:385:22
2019-12-26T21:14:20.0667190Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-26T21:14:20.0680721Z 
2019-12-26T21:14:20.0680801Z 
2019-12-26T21:14:20.0682359Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "/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" "--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\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-26T21:14:20.0682646Z 
2019-12-26T21:14:20.0682669Z 
2019-12-26T21:14:20.0689699Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-26T21:14:20.0689937Z Build completed unsuccessfully in 0:59:42
2019-12-26T21:14:20.0689937Z Build completed unsuccessfully in 0:59:42
2019-12-26T21:14:20.0739096Z == clock drift check ==
2019-12-26T21:14:20.0756807Z   local time: Thu Dec 26 21:14:20 UTC 2019
2019-12-26T21:14:20.2298537Z   network time: Thu, 26 Dec 2019 21:14:20 GMT
2019-12-26T21:14:20.2298624Z == end clock drift check ==
2019-12-26T21:14:21.2017420Z 
2019-12-26T21:14:21.2107535Z ##[error]Bash exited with code '1'.
2019-12-26T21:14:21.2142778Z ##[section]Starting: Checkout
2019-12-26T21:14:21.2144822Z ==============================================================================
2019-12-26T21:14:21.2144881Z Task         : Get sources
2019-12-26T21:14:21.2144966Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@Mark-Simulacrum
Copy link
Member Author

Hm, actually, now that these are re-exports, direct use is not going to trigger stability lints (e.g., the UI test added by this PR passes without a feature gate). Only use std::primitive; will; not even use std::primitive::bool would. Given that, I think feature gating this doesn't make too much sense, since we're not really gating any functionality, so I've dropped the feature gating in this PR.

We may want to FCP this as an insta-stable addition in that case.

@rust-highfive
Copy link
Collaborator

The job mingw-check 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.
2019-12-26T21:27:29.1879888Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-26T21:27:29.2070781Z ##[command]git config gc.auto 0
2019-12-26T21:27:29.2174957Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-26T21:27:29.2217172Z ##[command]git config --get-all http.proxy
2019-12-26T21:27:29.2360937Z ##[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/67637/merge:refs/remotes/pull/67637/merge
---
2019-12-26T21:33:00.8670617Z   local time: Thu Dec 26 21:33:00 UTC 2019
2019-12-26T21:33:01.4019416Z   network time: Thu, 26 Dec 2019 21:33:01 GMT
2019-12-26T21:33:01.4019619Z == end clock drift check ==
2019-12-26T21:33:16.3874912Z 
2019-12-26T21:33:16.3970968Z ##[error]Bash exited with code '1'.
2019-12-26T21:33:16.4029875Z ##[section]Starting: Checkout
2019-12-26T21:33:16.4031550Z ==============================================================================
2019-12-26T21:33:16.4031604Z Task         : Get sources
2019-12-26T21:33:16.4031650Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@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.
2019-12-26T22:11:23.3293161Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-26T22:11:23.3499736Z ##[command]git config gc.auto 0
2019-12-26T22:11:23.3580840Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-26T22:11:23.3644655Z ##[command]git config --get-all http.proxy
2019-12-26T22:11:23.3795182Z ##[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/67637/merge:refs/remotes/pull/67637/merge
---
2019-12-26T23:10:52.8096041Z .................................................................................................... 1600/9456
2019-12-26T23:10:57.2323528Z .................................................................................................... 1700/9456
2019-12-26T23:11:06.0754509Z .............................................................................................i...... 1800/9456
2019-12-26T23:11:13.8418529Z .................................................................................................... 1900/9456
2019-12-26T23:11:20.1797793Z ...............................................................................iiiii................ 2000/9456
2019-12-26T23:11:40.7841922Z .................................................................................................... 2200/9456
2019-12-26T23:11:42.9173717Z .................................................................................................... 2300/9456
2019-12-26T23:11:45.1791860Z .................................................................................................... 2400/9456
2019-12-26T23:11:50.9628990Z .................................................................................................... 2500/9456
---
2019-12-26T23:14:41.6944527Z ..........i...............i......................................................................... 4900/9456
2019-12-26T23:14:51.1608939Z .................................................................................................... 5000/9456
2019-12-26T23:14:56.1167848Z ......................................................i............................................. 5100/9456
2019-12-26T23:15:05.1066329Z .................................................................................................... 5200/9456
2019-12-26T23:15:11.0174261Z .....................ii.ii...........i.............................................................. 5300/9456
2019-12-26T23:15:19.4197634Z .................................................................................................... 5500/9456
2019-12-26T23:15:29.9965126Z .................................................................................................... 5600/9456
2019-12-26T23:15:36.8988941Z ...i................................................................................................ 5700/9456
2019-12-26T23:15:42.3399537Z .................................................................................................... 5800/9456
2019-12-26T23:15:42.3399537Z .................................................................................................... 5800/9456
2019-12-26T23:15:52.2015236Z ...........................................................................................ii...i..i 5900/9456
2019-12-26T23:16:04.3047168Z i...........i....................................................................................... 6000/9456
2019-12-26T23:16:21.1406643Z .................................................................................................... 6200/9456
2019-12-26T23:16:28.1547135Z .................................................................................................... 6300/9456
2019-12-26T23:16:28.1547135Z .................................................................................................... 6300/9456
2019-12-26T23:16:42.7336314Z ..................i..ii............................................................................. 6400/9456
2019-12-26T23:17:01.8645243Z ...............................................................................................i.... 6600/9456
2019-12-26T23:17:03.8713937Z .................................................................................................... 6700/9456
2019-12-26T23:17:05.9324490Z ...............................................................................................i.... 6800/9456
2019-12-26T23:17:08.2984413Z .................................................................................................... 6900/9456
---
2019-12-26T23:18:42.4485967Z .................................................................................................... 7500/9456
2019-12-26T23:18:47.0182093Z .......................................................F............................................ 7600/9456
2019-12-26T23:18:53.3810272Z .................................................................................................... 7700/9456
2019-12-26T23:19:03.2194583Z .................................................................................................... 7800/9456
2019-12-26T23:19:09.4288692Z ..........................iiii...................................................................... 7900/9456
2019-12-26T23:19:23.2720987Z .................................................................................................... 8100/9456
2019-12-26T23:19:32.3203810Z .................................................................................................... 8200/9456
2019-12-26T23:19:45.2634922Z .................................................................................................... 8300/9456
2019-12-26T23:19:51.9624791Z .................................................................................................... 8400/9456
---
2019-12-26T23:21:40.7628630Z 14   --> $DIR/resolve-primitive-fallback.rs:3:5
2019-12-26T23:21:40.7629015Z 
2019-12-26T23:21:40.7629209Z 
2019-12-26T23:21:40.7629414Z The actual stderr differed from the expected stderr.
2019-12-26T23:21:40.7629977Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-primitive-fallback/resolve-primitive-fallback.stderr
2019-12-26T23:21:40.7630529Z To update references, rerun the tests and pass the `--bless` flag
2019-12-26T23:21:40.7631078Z To only update this specific test, also pass `--test-args resolve/resolve-primitive-fallback.rs`
2019-12-26T23:21:40.7631597Z error: 1 errors occurred comparing output.
2019-12-26T23:21:40.7631931Z status: exit code: 1
2019-12-26T23:21:40.7631931Z status: exit code: 1
2019-12-26T23:21:40.7632772Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/resolve/resolve-primitive-fallback.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/resolve/resolve-primitive-fallback" "-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/resolve/resolve-primitive-fallback/auxiliary" "-A" "unused"
2019-12-26T23:21:40.7633373Z ------------------------------------------
2019-12-26T23:21:40.7633564Z 
2019-12-26T23:21:40.7634305Z ------------------------------------------
2019-12-26T23:21:40.7634551Z stderr:
---
2019-12-26T23:21:40.7642823Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:385:22
2019-12-26T23:21:40.7642894Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-26T23:21:40.7653894Z 
2019-12-26T23:21:40.7654161Z 
2019-12-26T23:21:40.7655938Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "/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" "--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\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-26T23:21:40.7658861Z 
2019-12-26T23:21:40.7659865Z 
2019-12-26T23:21:40.7664996Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-26T23:21:40.7665058Z Build completed unsuccessfully in 1:03:16
2019-12-26T23:21:40.7665058Z Build completed unsuccessfully in 1:03:16
2019-12-26T23:21:40.7711864Z == clock drift check ==
2019-12-26T23:21:40.7734810Z   local time: Thu Dec 26 23:21:40 UTC 2019
2019-12-26T23:21:41.0730580Z   network time: Thu, 26 Dec 2019 23:21:41 GMT
2019-12-26T23:21:41.0730750Z == end clock drift check ==
2019-12-26T23:21:42.2398050Z 
2019-12-26T23:21:42.2491413Z ##[error]Bash exited with code '1'.
2019-12-26T23:21:42.2585035Z ##[section]Starting: Checkout
2019-12-26T23:21:42.2586633Z ==============================================================================
2019-12-26T23:21:42.2586681Z Task         : Get sources
2019-12-26T23:21:42.2586910Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@sgrif
Copy link
Contributor

sgrif commented Dec 27, 2019 via email

@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.
2019-12-27T00:34:12.3367432Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-27T00:34:12.3560454Z ##[command]git config gc.auto 0
2019-12-27T00:34:12.3644449Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-27T00:34:12.3707478Z ##[command]git config --get-all http.proxy
2019-12-27T00:34:12.3845487Z ##[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/67637/merge:refs/remotes/pull/67637/merge
---
2019-12-27T01:30:37.2559740Z .................................................................................................... 1600/9456
2019-12-27T01:30:41.7602305Z .................................................................................................... 1700/9456
2019-12-27T01:30:50.4977177Z .............................................................................................i...... 1800/9456
2019-12-27T01:30:57.9699784Z .................................................................................................... 1900/9456
2019-12-27T01:31:04.1790614Z ...............................................................................iiiii................ 2000/9456
2019-12-27T01:31:24.3914716Z .................................................................................................... 2200/9456
2019-12-27T01:31:26.5504462Z .................................................................................................... 2300/9456
2019-12-27T01:31:28.8886484Z .................................................................................................... 2400/9456
2019-12-27T01:31:34.9110366Z .................................................................................................... 2500/9456
---
2019-12-27T01:34:20.7743990Z ..........i...............i......................................................................... 4900/9456
2019-12-27T01:34:30.2420060Z .................................................................................................... 5000/9456
2019-12-27T01:34:34.9121322Z ......................................................i............................................. 5100/9456
2019-12-27T01:34:43.6803108Z .................................................................................................... 5200/9456
2019-12-27T01:34:49.5139436Z .....................ii.ii...........i.............................................................. 5300/9456
2019-12-27T01:34:57.8544781Z .................................................................................................... 5500/9456
2019-12-27T01:35:07.9031138Z .................................................................................................... 5600/9456
2019-12-27T01:35:14.6356080Z ...i................................................................................................ 5700/9456
2019-12-27T01:35:19.9579152Z .................................................................................................... 5800/9456
2019-12-27T01:35:19.9579152Z .................................................................................................... 5800/9456
2019-12-27T01:35:29.2988865Z ...........................................................................................ii...i..i 5900/9456
2019-12-27T01:35:41.1113288Z i...........i....................................................................................... 6000/9456
2019-12-27T01:35:57.1879082Z .................................................................................................... 6200/9456
2019-12-27T01:36:04.0409070Z .................................................................................................... 6300/9456
2019-12-27T01:36:04.0409070Z .................................................................................................... 6300/9456
2019-12-27T01:36:19.8196836Z ..................i..ii............................................................................. 6400/9456
2019-12-27T01:36:38.2215199Z ...............................................................................................i.... 6600/9456
2019-12-27T01:36:40.4205026Z .................................................................................................... 6700/9456
2019-12-27T01:36:42.5176806Z ...............................................................................................i.... 6800/9456
2019-12-27T01:36:44.9113397Z .................................................................................................... 6900/9456
---
2019-12-27T01:38:15.4262301Z .................................................................................................... 7500/9456
2019-12-27T01:38:19.8216364Z .................................................................................................... 7600/9456
2019-12-27T01:38:26.0883460Z .................................................................................................... 7700/9456
2019-12-27T01:38:35.9913695Z .................................................................................................... 7800/9456
2019-12-27T01:38:42.1738841Z ..........................iiii...................................................................... 7900/9456
2019-12-27T01:38:55.6309627Z .................................................................................................... 8100/9456
2019-12-27T01:39:04.5826337Z .................................................................................................... 8200/9456
2019-12-27T01:39:17.5340308Z .................................................................................................... 8300/9456
2019-12-27T01:39:24.9128204Z .................................................................................................... 8400/9456
---
2019-12-27T01:41:37.3337664Z  finished in 6.234
2019-12-27T01:41:37.3521601Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-27T01:41:37.5404882Z 
2019-12-27T01:41:37.5405969Z running 166 tests
2019-12-27T01:41:40.4136104Z iiii......i........ii..iiii...i.............................i..i..................i....i............ 100/166
2019-12-27T01:41:42.4928144Z i.i.i...iii..iiiiiii.......................iii............ii......
2019-12-27T01:41:42.4929802Z 
2019-12-27T01:41:42.4935274Z  finished in 5.141
2019-12-27T01:41:42.5127930Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-27T01:41:42.6754506Z 
---
2019-12-27T01:41:44.5107697Z  finished in 1.998
2019-12-27T01:41:44.5304939Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-27T01:41:44.6902607Z 
2019-12-27T01:41:44.6902787Z running 9 tests
2019-12-27T01:41:44.6903578Z iiiiiiiii
2019-12-27T01:41:44.6903942Z 
2019-12-27T01:41:44.6907120Z  finished in 0.160
2019-12-27T01:41:44.7083002Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-27T01:41:44.8805908Z 
---
2019-12-27T01:42:03.2252889Z  finished in 18.517
2019-12-27T01:42:03.2483006Z Check compiletest suite=debuginfo mode=debuginfo-gdb+lldb (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-27T01:42:03.4259308Z 
2019-12-27T01:42:03.4259714Z running 124 tests
2019-12-27T01:42:26.7248746Z .iiiii..ii.....i..i...i..i.i.i..i..i..iii....ii.ii....ii..........iiii..........i.....i..ii.......ii 100/124
2019-12-27T01:42:30.7110730Z .i.iii.....iiiiii.....ii
2019-12-27T01:42:30.7111204Z 
2019-12-27T01:42:30.7113413Z  finished in 27.464
2019-12-27T01:42:30.7119723Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2019-12-27T01:42:30.7120273Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2019-12-27T01:49:13.1175275Z 
2019-12-27T01:49:13.1175450Z ------------------------------------------
2019-12-27T01:49:13.1175485Z stderr:
2019-12-27T01:49:13.1175642Z ------------------------------------------
2019-12-27T01:49:13.1175702Z error: internal compiler error: src/librustc/hir/def.rs:372: attempted .def_id() on invalid res: PrimTy(Bool)
2019-12-27T01:49:13.1175922Z thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:891:9
2019-12-27T01:49:13.1176471Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-27T01:49:13.1176549Z error: aborting due to previous error
2019-12-27T01:49:13.1176581Z 
---
2019-12-27T01:49:13.1177910Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:385:22
2019-12-27T01:49:13.1177970Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
2019-12-27T01:49:13.1184003Z 
2019-12-27T01:49:13.1184101Z 
2019-12-27T01:49:13.1186297Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "/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" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/rustdoc" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "rustdoc" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--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\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-12-27T01:49:13.1188858Z 
2019-12-27T01:49:13.1188891Z 
2019-12-27T01:49:13.1194017Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2019-12-27T01:49:13.1194074Z Build completed unsuccessfully in 1:07:52
2019-12-27T01:49:13.1194074Z Build completed unsuccessfully in 1:07:52
2019-12-27T01:49:13.1241359Z == clock drift check ==
2019-12-27T01:49:13.1260529Z   local time: Fri Dec 27 01:49:13 UTC 2019
2019-12-27T01:49:13.4390611Z   network time: Fri, 27 Dec 2019 01:49:13 GMT
2019-12-27T01:49:13.4395101Z == end clock drift check ==
2019-12-27T01:49:16.8838038Z 
2019-12-27T01:49:16.8941625Z ##[error]Bash exited with code '1'.
2019-12-27T01:49:16.8994263Z ##[section]Starting: Checkout
2019-12-27T01:49:16.8995884Z ==============================================================================
2019-12-27T01:49:16.8995928Z Task         : Get sources
2019-12-27T01:49:16.8995983Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@Mark-Simulacrum
Copy link
Member Author

Failing test looks to be due to a test that makes sure that pub use std::* (which inlines the std crate into the parent crate) works. This unfortunately fails due to the aforementioned rustdoc bug... I guess I'll try and investigate whether it is fixable (#67646).

@Mark-Simulacrum Mark-Simulacrum added S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 27, 2019
@Mark-Simulacrum
Copy link
Member Author

This has (hopefully) now been unblocked, so I'll be taking another look soon.

@Mark-Simulacrum
Copy link
Member Author

libcore and libstd are both now a wall of "pub use". libstd has links to the primitive documentation, libcore doesn't (as the docs are defined in libstd, though I'm not sure why).

As noted previously, we don't really have a good stability story here for the common usage pattern (specifically using them directly vs. via an import), at least as far as I can tell:

Hm, actually, now that these are re-exports, direct use is not going to trigger stability lints (e.g., the UI test added by this PR passes without a feature gate). Only use std::primitive; will; not even use std::primitive::bool would. Given that, I think feature gating this doesn't make too much sense, since we're not really gating any functionality, so I've dropped the feature gating in this PR.

So we probably want to invoke FCP merge here. @dtolnay, could you do that?

image

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Marked as blocked ❌ on something else such as an RFC or other implementation work. labels Feb 6, 2020
#![feature(arbitrary_self_types)]
#![feature(array_error_internals)]
#![feature(asm)]
#![feature(assoc_int_consts)]
#![feature(associated_type_bounds)]
#![feature(atomic_mut_ptr)]
Copy link
Member Author

Choose a reason for hiding this comment

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

This is unrelated (probably autorebase failure). I think the new location is technically the correct one from an alphabetic perspective though (and these seem to be alphabetized...).

@rust-highfive

This comment has been minimized.

src/libcore/primitive.rs Outdated Show resolved Hide resolved
This re-exports the primitive types from libcore at `core::primitive` to allow
macro authors to have a reliable location to use them from.
@dtolnay dtolnay added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. relnotes Marks issues that should be documented in the release notes of the next release. labels Feb 8, 2020
@dtolnay dtolnay added this to the 1.43 milestone Feb 8, 2020
@dtolnay
Copy link
Member

dtolnay commented Feb 8, 2020

@rfcbot fcp merge

This PR adds stable re-exports of the primitive types under core::primitive and std::primitive, e.g. core::primitive::i32. The new module includes bool, char, str, iN, uN, fN. These are types that have so far not had a way to import by absolute path from the standard library, which has been problematic in macro DSLs where these names might refer to something other than the primitive types.

@rfcbot
Copy link

rfcbot commented Feb 8, 2020

Team member @dtolnay has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Feb 8, 2020
@rfcbot
Copy link

rfcbot commented Feb 12, 2020

🔔 This is now entering its final comment period, as per the review above. 🔔

//! ```

#[stable(feature = "core_primitive", since = "1.42.0")]
pub use bool;
Copy link
Contributor

Choose a reason for hiding this comment

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

Could these re-exports not be merged, so the attribute doesn't have to be repeated a bunch of times?

pub use {
    bool,
    char,
    ...
};

Copy link
Member Author

Choose a reason for hiding this comment

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

I consider multiline use a mistake in most cases as it breaks grepping for use.*Identifier, so I'm not going to change this, but I believe it is possible.

@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Feb 22, 2020
@rfcbot
Copy link

rfcbot commented Feb 22, 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.

@dtolnay
Copy link
Member

dtolnay commented Feb 24, 2020

\o/ @bors r+

@bors
Copy link
Contributor

bors commented Feb 24, 2020

📌 Commit 9c3ee1b has been approved by dtolnay

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 24, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 25, 2020
…olnay

Add primitive module to libcore

This re-exports the primitive types from libcore at `core::primitive` to allow
macro authors to have a reliable location to use them from.

Fixes rust-lang#44865
bors added a commit that referenced this pull request Feb 26, 2020
Rollup of 7 pull requests

Successful merges:

 - #67637 (Add primitive module to libcore)
 - #69387 (Deduplicate identifier printing a bit)
 - #69412 (Mark attributes consumed by `check_mod_attrs` as normal)
 - #69423 (syntax: Remove `Nt(Impl,Trait,Foreign)Item`)
 - #69429 (remove redundant clones and import)
 - #69457 (Clean up e0370 e0371)
 - #69468 ([master] Backport release notes of 1.41.1)

Failed merges:

r? @ghost
@bors bors merged commit 0860f5a into rust-lang:master Feb 26, 2020
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request May 16, 2020
Pkgsrc changes:
 * Bump rust bootstrap version to 1.42.0, except for Darwin/i686 where the
   bootstrap is not (yet?) available.

Upstream changes:

Version 1.43.0 (2020-04-23)
==========================

Language
--------
- [Fixed using binary operations with `&{number}` (e.g. `&1.0`) not having
  the type inferred correctly.][68129]
- [Attributes such as `#[cfg()]` can now be used on `if` expressions.][69201]

**Syntax only changes**
- [Allow `type Foo: Ord` syntactically.][69361]
- [Fuse associated and extern items up to defaultness.][69194]
- [Syntactically allow `self` in all `fn` contexts.][68764]
- [Merge `fn` syntax + cleanup item parsing.][68728]
- [`item` macro fragments can be interpolated into `trait`s, `impl`s,
  and `extern` blocks.][69366]
  For example, you may now write:
  ```rust
  macro_rules! mac_trait {
      ($i:item) => {
          trait T { $i }
      }
  }
  mac_trait! {
      fn foo() {}
  }
  ```
These are still rejected *semantically*, so you will likely receive an error but
these changes can be seen and parsed by macros and
conditional compilation.


Compiler
--------
- [You can now pass multiple lint flags to rustc to override the previous
  flags.][67885] For example; `rustc -D unused -A unused-variables` denies
  everything in the `unused` lint group except `unused-variables` which
  is explicitly allowed. However, passing `rustc -A unused-variables -D unused` denies
  everything in the `unused` lint group **including** `unused-variables` since
  the allow flag is specified before the deny flag (and therefore overridden).
- [rustc will now prefer your system MinGW libraries over its bundled libraries
  if they are available on `windows-gnu`.][67429]
- [rustc now buffers errors/warnings printed in JSON.][69227]

Libraries
---------
- [`Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement
  `TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>`
  respectively.][69538] **Note** These conversions are only available when `N`
  is `0..=32`.
- [You can now use associated constants on floats and integers directly, rather
  than having to import the module.][68952] e.g. You can now write `u32::MAX` or
  `f32::NAN` with no imports.
- [`u8::is_ascii` is now `const`.][68984]
- [`String` now implements `AsMut<str>`.][68742]
- [Added the `primitive` module to `std` and `core`.][67637] This module
  reexports Rust's primitive types. This is mainly useful in macros
  where you want avoid these types being shadowed.
- [Relaxed some of the trait bounds on `HashMap` and `HashSet`.][67642]
- [`string::FromUtf8Error` now implements `Clone + Eq`.][68738]

Stabilized APIs
---------------
- [`Once::is_completed`]
- [`f32::LOG10_2`]
- [`f32::LOG2_10`]
- [`f64::LOG10_2`]
- [`f64::LOG2_10`]
- [`iter::once_with`]

Cargo
-----
- [You can now set config `[profile]`s in your `.cargo/config`, or through
  your environment.][cargo/7823]
- [Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a binary's
  executable path when running integration tests or benchmarks.][cargo/7697]
  `<name>` is the name of your binary as-is e.g. If you wanted the executable
  path for a binary named `my-program`you would use
  `env!("CARGO_BIN_EXE_my-program")`.

Misc
----
- [Certain checks in the `const_err` lint were deemed unrelated to const
  evaluation][69185], and have been moved to the `unconditional_panic` and
  `arithmetic_overflow` lints.

Compatibility Notes
-------------------

- [Having trailing syntax in the `assert!` macro is now a hard error.][69548]
  This has been a warning since 1.36.0.
- [Fixed `Self` not having the correctly inferred type.][69340] This incorrectly
  led to some instances being accepted, and now correctly emits a hard error.

[69340]: rust-lang/rust#69340

Internal Only
-------------
These changes provide no direct user facing benefits, but represent significant
improvements to the internals and overall performance of `rustc` and
related tools.

- [All components are now built with `opt-level=3` instead of `2`.][67878]
- [Improved how rustc generates drop code.][67332]
- [Improved performance from `#[inline]`-ing certain hot functions.][69256]
- [traits: preallocate 2 Vecs of known initial size][69022]
- [Avoid exponential behaviour when relating types][68772]
- [Skip `Drop` terminators for enum variants without drop glue][68943]
- [Improve performance of coherence checks][68966]
- [Deduplicate types in the generator witness][68672]
- [Invert control in struct_lint_level.][68725]

[67332]: rust-lang/rust#67332
[67429]: rust-lang/rust#67429
[67637]: rust-lang/rust#67637
[67642]: rust-lang/rust#67642
[67878]: rust-lang/rust#67878
[67885]: rust-lang/rust#67885
[68129]: rust-lang/rust#68129
[68672]: rust-lang/rust#68672
[68725]: rust-lang/rust#68725
[68728]: rust-lang/rust#68728
[68738]: rust-lang/rust#68738
[68742]: rust-lang/rust#68742
[68764]: rust-lang/rust#68764
[68772]: rust-lang/rust#68772
[68943]: rust-lang/rust#68943
[68952]: rust-lang/rust#68952
[68966]: rust-lang/rust#68966
[68984]: rust-lang/rust#68984
[69022]: rust-lang/rust#69022
[69185]: rust-lang/rust#69185
[69194]: rust-lang/rust#69194
[69201]: rust-lang/rust#69201
[69227]: rust-lang/rust#69227
[69548]: rust-lang/rust#69548
[69256]: rust-lang/rust#69256
[69361]: rust-lang/rust#69361
[69366]: rust-lang/rust#69366
[69538]: rust-lang/rust#69538
[cargo/7823]: rust-lang/cargo#7823
[cargo/7697]: rust-lang/cargo#7697
[`Once::is_completed`]: https://doc.rust-lang.org/std/sync/struct.Once.html#method.is_completed
[`f32::LOG10_2`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG10_2.html
[`f32::LOG2_10`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG2_10.html
[`f64::LOG10_2`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG10_2.html
[`f64::LOG2_10`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG2_10.html
[`iter::once_with`]: https://doc.rust-lang.org/std/iter/fn.once_with.html
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. 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.

No way to reference primitives by absolute path
8 participants