about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-10-15Add #[must_use] to remaining alloc functionsJohn Kugelman-23/+78
2021-10-14Auto merge of #89882 - matthiaskrgr:rollup-1dh7pz8, r=matthiaskrgrbors-49/+120
Rollup of 6 pull requests Successful merges: - #89390 (Fix incorrect Box::pin suggestion) - #89433 (Fix ctrl-c causing reads of stdin to return empty on Windows.) - #89823 (Switch order of terms to prevent overflow) - #89865 (Allow static linking LLVM with ThinLTO) - #89873 (Add missing word to `FromStr` trait documentation) - #89878 (Fix missing remaining compiler specific cfg information) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-14Rollup merge of #89878 - GuillaumeGomez:add-missing-cfg-hide, r=notriddleMatthias Krüger-1/+10
Fix missing remaining compiler specific cfg information Follow-up of #89596. We forgot a few of them: ![Screenshot from 2021-10-14 11-36-44](https://user-images.githubusercontent.com/3050060/137292700-64ebc59f-d9d2-41f2-be3a-fa5bf211523c.png) ![Screenshot from 2021-10-14 11-36-56](https://user-images.githubusercontent.com/3050060/137292703-f63fa4e5-2c56-446b-9f86-3652f03dfe59.png) r? `@notriddle`
2021-10-14Rollup merge of #89873 - askoufis:patch-1, r=Mark-SimulacrumMatthias Krüger-1/+1
Add missing word to `FromStr` trait documentation The doc comment is getting a bit wide, let me know if I should restructure it/add a new line.
2021-10-14Rollup merge of #89865 - tmandry:llvm-static, r=Mark-SimulacrumMatthias Krüger-9/+4
Allow static linking LLVM with ThinLTO There's no reason not to allow this if the user wants it. It works, at least in a local build on linux host. For our use case, we're happy to spend more time building the compiler if it creates a speedup every time we run it, and we've observed speedups like this with clang.
2021-10-14Rollup merge of #89823 - jackh726:project-overflow, r=oli-obkMatthias Krüger-1/+1
Switch order of terms to prevent overflow Fixes #89639 r? ``@pnkfelix``
2021-10-14Rollup merge of #89433 - arlosi:stdin-fix, r=joshtriplettMatthias Krüger-9/+19
Fix ctrl-c causing reads of stdin to return empty on Windows. Pressing ctrl+c (or ctrl+break) on Windows caused a blocking read of stdin to unblock and return empty, unlike other platforms which continue to block. On ctrl-c, `ReadConsoleW` will return success, but also set `LastError` to `ERROR_OPERATION_ABORTED`. This change detects this case, and re-tries the call to `ReadConsoleW`. Fixes #89177. See issue for further details. Tested on Windows 7 and Windows 10 with both MSVC and GNU toolchains
2021-10-14Rollup merge of #89390 - tmandry:issue-72117, r=estebankMatthias Krüger-28/+85
Fix incorrect Box::pin suggestion The suggestion checked if `Pin<Box<T>>` could be coeerced to the expected type, but did not check predicates created by the coercion. We now look for predicates that definitely cannot be satisfied before giving the suggestion. The suggestion is still marked MaybeIncorrect because we allow predicates that are still ambiguous and can't be proven. Fixes #72117.
2021-10-14Auto merge of #88698 - Noble-Mushtak:master, r=nikomatsakis,oli-obkbors-16/+83
Add check that live_region is live in sanitize_promoted This pull request fixes #88434 by adding a check in `sanitize_promoted` to ensure that only regions which are actually live are added to the `liveness_constraints` of the `BorrowCheckContext`. To implement this change, I needed to add a method to `LivenessValues` which gets the elements contained by a region: /// Returns an iterator of all the elements contained by the region `r` crate fn get_elements(&self, row: N) -> impl Iterator<Item = Location> + '_ Then, inside `sanitize_promoted`, we check whether the iterator returned by this method is non-empty to ensure that the region is actually live at at least one location before adding that region to the `liveness_constraints` of the `BorrowCheckContext`. This is my first pull request to the Rust repo, so any feedback on how I can improve this pull request or if there is a better way to fix this issue would be very appreciated.
2021-10-14Auto merge of #89247 - fee1-dead:const-eval-select, r=oli-obkbors-39/+372
Add `const_eval_select` intrinsic Adds an intrinsic that calls a given function when evaluated at compiler time, but generates a call to another function when called at runtime. See https://github.com/rust-lang/const-eval/issues/7 for previous discussion. r? `@oli-obk.`
2021-10-14Fix missing remaining compiler specific cfg informationGuillaume Gomez-1/+10
2021-10-14fix codegen testDeadbeef-2/+2
2021-10-14Fix const stabilityDeadbeef-2/+37
2021-10-14Avoid tupling at the calleeDeadbeef-36/+38
2021-10-14Add missing word to `FromStr` trait docsAdam Skoufis-1/+1
2021-10-14Auto merge of #89815 - GuillaumeGomez:associated-consts-sidebar, r=notriddlebors-16/+110
Associated consts sidebar Fixes #89354. A screenshot with `f32`: ![Screenshot from 2021-10-12 15-07-57](https://user-images.githubusercontent.com/3050060/136962078-5faf7b87-7ea5-4d7a-99a4-b2afd77b78e2.png)
2021-10-13Auto merge of #89858 - matthiaskrgr:rollup-evsnr2e, r=matthiaskrgrbors-26/+180
Rollup of 6 pull requests Successful merges: - #89347 (suggestion for typoed crate or module) - #89670 (Improve `std::thread::available_parallelism` docs) - #89757 (Use shallow clones for submodules) - #89759 (Assemble the compiler when running `x.py build`) - #89846 (Add `riscv32imc-esp-espidf` to 1.56 changelog) - #89853 (Update the 1.56.0 release header for consistency) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-13Exit early if expected type is not an adtTyler Mandry-4/+6
2021-10-13Move misplaced commentTyler Mandry-4/+4
2021-10-13Always check predicates in can_coerceTyler Mandry-27/+11
This only changed two tests and I consider both changes an improvement.
2021-10-13Fix incorrect Box::pin suggestionTyler Mandry-5/+73
The suggestion checked if Pin<Box<T>> could be coeerced to the expected type, but did not check predicates created by the coercion. We now look for predicates that definitely cannot be satisfied before giving the suggestion. The suggestion is marked MaybeIncorrect because we allow predicates that are still ambiguous and can't be proven.
2021-10-13Fix line lengthTyler Mandry-1/+4
2021-10-13Allow static linking LLVM with ThinLTOTyler Mandry-9/+4
2021-10-13Rollup merge of #89853 - cuviper:release-1.56, r=Mark-SimulacrumMatthias Krüger-1/+1
Update the 1.56.0 release header for consistency
2021-10-13Rollup merge of #89846 - esp-rs:riscv-esp-idf-changelog, r=Mark-SimulacrumMatthias Krüger-0/+2
Add `riscv32imc-esp-espidf` to 1.56 changelog
2021-10-13Rollup merge of #89759 - jyn514:x-build-assemble, r=Mark-SimulacrumMatthias Krüger-3/+10
Assemble the compiler when running `x.py build` Previously, there was no way to actually get binaries in `build/$TARGET/stage1/bin` without building the standard library. This makes it possible to build just the compiler. This can be useful when the standard library isn't actually necessary for trying out your tests (e.g. a bug that can be reproduced with only a `no_core` crate). Closes https://github.com/rust-lang/rust/issues/73519.
2021-10-13Rollup merge of #89757 - jyn514:submodule, r=Mark-SimulacrumMatthias Krüger-1/+1
Use shallow clones for submodules This reduces the amount of git history downloaded for submodules from ~67M to ~11M. For comparison, a shallow clone of rust-lang/rust is 103M and a deep clone is 740M, so this almost halves the amount of history necessary if you made a shallow clone to start, and it's a significant reduction even if not. Closes https://github.com/rust-lang/rust/issues/63978. r? `@Mark-Simulacrum`
2021-10-13Rollup merge of #89670 - yoshuawuyts:available-parallelism-docs, r=joshtriplettMatthias Krüger-20/+57
Improve `std::thread::available_parallelism` docs _Tracking issue: https://github.com/rust-lang/rust/issues/74479_ This PR reworks the documentation of `std::thread::available_parallelism`, as requested [here](https://github.com/rust-lang/rust/pull/89324#issuecomment-934343254). ## Changes The following changes are made: - We've removed prior mentions of "hardware threads" and instead centers the docs around "parallelism" as a resource available to a program. - We now provide examples of when `available_parallelism` may return numbers that differ from the number of CPU cores in the host machine. - We now mention that the amount of available parallelism may change over time. - We make note of which platform components we don't take into account which more advanced users may want to take note of. - The example has been updated, which should be a bit easier to use. - We've added a docs alias to `num-cpus` which provides similar functionality to `available_parallelism`, and is one of the most popular crates on crates.io. --- Thanks! r? `@BurntSushi`
2021-10-13Rollup merge of #89347 - TaKO8Ki:crate-or-module-typo, r=estebankMatthias Krüger-1/+109
suggestion for typoed crate or module Previously, the compiler didn't suggest similarly named crates or modules. This pull request adds a suggestion for typoed crates or modules. #76208 before: ``` error[E0433]: failed to resolve: use of undeclared type or module `chono` --> src/main.rs:2:5 | 2 | use chono::prelude::*; | ^^^^^ use of undeclared type or module `chono` ``` after: ``` error[E0433]: failed to resolve: use of undeclared type or module `chono` --> src/main.rs:2:5 | 2 | use chono::prelude::*; | ^^^^^ | | | use of undeclared crate or module `chono` | help: a similar crate or module exists: `chrono` ```
2021-10-13Auto merge of #89555 - oli-obk:nll_member_constraint_diag, r=estebankbors-502/+511
Remove textual span from diagnostic string This is an unnecessary repetition, as the diagnostic prints the span anyway in the source path right below the message. I further removed the identification of the node, as that does not give any new information in any of the cases that are changed in tests. EDIT: also inserted a suggestion that other diagnostics were already emitting
2021-10-13Improve code readability for sidebar linksGuillaume Gomez-16/+48
2021-10-13Update the 1.56.0 release header for consistencyJosh Stone-1/+1
2021-10-13Auto merge of #89822 - tmiasko:overflap-duplicates, r=cjgillotbors-0/+20
Deduplicate regions ids before merging them The merging code does not expect to see any duplicates. Fixes #89820. r? `@cjgillot`
2021-10-13Improve `std::thread::available_parallelism` docsYoshua Wuyts-20/+57
2021-10-13Auto merge of #89847 - JohnTitor:rollup-xfymeo4, r=JohnTitorbors-25/+278
Rollup of 12 pull requests Successful merges: - #89768 (add some more testcases) - #89777 (Edit explanation of test for nested type ascriptions) - #89781 (Add missing words in `Infallible` docs) - #89782 (Improve CJK font in rustdoc) - #89794 (Add #[must_use] to to_value conversions) - #89814 (Fix uppercase/lowercase error) - #89816 (Fix invalid rules in .gitignore) - #89817 (Add #[inline] to int log10 functions.) - #89818 (Use Option::map_or instead of open coding it) - #89828 (Fix config.toml overflow-checks options) - #89840 (fix the stage0 tools config file path in `config.toml.example`) - #89845 (Add davidtwco to the `.mailmap`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-13Rollup merge of #89845 - davidtwco:davidtwco-mailmap, r=oli-obkYuki Okushi-0/+1
Add davidtwco to the `.mailmap`
2021-10-13Rollup merge of #89840 - wangkirin:master, r=jyn514Yuki Okushi-3/+3
fix the stage0 tools config file path in `config.toml.example` in #88362 , the `stage0.txt ` have been switched to `stage0.json` , but in `config.toml.example` the guide didn't change , this PR fix this issue
2021-10-13Rollup merge of #89828 - rusticstuff:overflow-check-options-take-two, ↵Yuki Okushi-1/+16
r=Mark-Simulacrum Fix config.toml overflow-checks options This a follow-up PR to #87784. Improvements: * Add missing entries for overflow-checks to config.toml.example. * Add --enable-overflow-checks-std option to configure script. * Make rust.overflow-checks-stdoption default to rust.overflow-checks. Also adds the missing `--enable-debug-assertions-std `option to configure script. r? ```@Mark-Simulacrum``` cc ```@jyn514```
2021-10-13Rollup merge of #89818 - LingMan:map_or, r=oli-obkYuki Okushi-1/+1
Use Option::map_or instead of open coding it ````@rustbot```` modify labels +C-cleanup +T-compiler
2021-10-13Rollup merge of #89817 - m-ou-se:int-log-10-inline, r=the8472Yuki Okushi-0/+12
Add #[inline] to int log10 functions.
2021-10-13Rollup merge of #89816 - Canop:master, r=Mark-SimulacrumYuki Okushi-2/+2
Fix invalid rules in .gitignore `**node_modules` in a .gitignore is the same than `*node_modules` or `*****node_modules`. It matches every file whose name ends with `node_modules`, including `not_node_modules`. The intent here was obviously to have `**/node_modules` which is the same than just `node_modules`. Reference on git ignoring rules format: https://git-scm.com/docs/gitignore
2021-10-13Rollup merge of #89814 - jkugelman:must-use-string-transforms-typo, ↵Yuki Okushi-1/+1
r=joshtriplett Fix uppercase/lowercase error Fix https://github.com/rust-lang/rust/pull/89694#discussion_r726829890 r? ````@joshtriplett````
2021-10-13Rollup merge of #89794 - jkugelman:must-use-to_value-conversions, r=joshtriplettYuki Okushi-2/+38
Add #[must_use] to to_value conversions `NonNull<T>::cast` snuck in when I wasn't looking. What a scamp! Parent issue: #89692 r? ````@joshtriplett````
2021-10-13Rollup merge of #89782 - konan8205:develop, r=jshaYuki Okushi-13/+14
Improve CJK font in rustdoc This PR includes: - Fix unicode range of korean letters in `rustdoc.css`. - Add WOFF2 format version of Noto Sans KR font. - Shorten the font file name.
2021-10-13Rollup merge of #89781 - Wilfred:patch-2, r=JohnTitorYuki Okushi-1/+1
Add missing words in `Infallible` docs This sentence was previously incomplete.
2021-10-13Rollup merge of #89777 - pierwill:fix-88233, r=Mark-SimulacrumYuki Okushi-1/+1
Edit explanation of test for nested type ascriptions Fixes typo ("an ascribing") and removes extra. Closes #88233.
2021-10-13Rollup merge of #89768 - hellow554:tests, r=Mark-SimulacrumYuki Okushi-0/+188
add some more testcases resolves #52893 resolves #68295 resolves #87750 resolves #88071 All these issues have been fixed according to glacier. Just adding a test so it can be closed. Can anybody tell me why the github keywords do not work? 🤔 Please edit this post if you can fix it.
2021-10-13Add `riscv32imc-esp-espidf` to changelogScott Mabin-0/+2
2021-10-13Add davidtwco to the `.mailmap`David Wood-0/+1
Signed-off-by: David Wood <david.wood@huawei.com>
2021-10-13Update clippy ui outputOli Scherer-1/+1