about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-07-28Rollup merge of #87507 - jethrogb:jb/sgx-unmoveable-mutex, r=dtolnayYuki Okushi-1/+3
SGX mutex is *not* moveable Reverts the erroneous change in #85029.
2021-07-28Rollup merge of #87501 - spastorino:remove-min-tait, r=oli-obkYuki Okushi-5121/+949
Remove min_type_alias_impl_trait in favor of type_alias_impl_trait r? ``@oli-obk``
2021-07-28Rollup merge of #87500 - Smittyvb:min-max-docs, r=kennytmYuki Okushi-12/+15
Document math behind MIN/MAX consts on integers Currently the documentation for `[integer]::{MIN, MAX}` doesn't explain where the constants come from. This documents how the values of those constants are related to powers of 2.
2021-07-28Rollup merge of #87453 - ibraheemdev:i-68697, r=wesleywiserYuki Okushi-24/+46
Suggest removing unnecessary &mut as help message Closes #68697
2021-07-28Rollup merge of #87443 - jyn514:submodules-take-n, r=jyn514Yuki Okushi-18/+37
Don't treat git repos as non-existent when `ignore_git` is set The new submodule handling depends on `is_git()` to be accurate to decide whether it should handle submodules at all or not. Unfortunately, `is_git()` treated "this directory does not have a git repository" and "this repository should not be used for SHA/version/commit date info" the same. This changes it to distinguish the two. To clarify: ignore_get is set by default whenever channel == "dev", which it is by default whenever you're compiling locally. So basically everyone would hit this, not just people who had explicitly configured ignore_git. Here's an example of an error this fixes: ``` $ x build Updating only changed submodules Submodules updated in 0.01 seconds Finished dev [unoptimized + debuginfo] target(s) in 0.17s warning: x.py has made several changes recently you may want to look at help: consider looking at the changes in `src/bootstrap/CHANGELOG.md` note: to silence this warning, add `changelog-seen = 2` at the top of `config.toml` Building stage0 std artifacts (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu) Finished release [optimized] target(s) in 0.16s Copying stage0 std from stage0 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu) Building LLVM for x86_64-unknown-linux-gnu detected home dir change, cleaning out entire build directory running: "cmake" "/home/joshua/rustc3/src/llvm-project/llvm" "-G" "Ninja" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;BPF;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=48" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-unknown-linux-gnu" "-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER=gcc" "-DCMAKE_CXX_COMPILER=g++" "-DCMAKE_ASM_COMPILER=gcc" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_INSTALL_PREFIX=/home/joshua/rustc3/build/x86_64-unknown-linux-gnu/llvm" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_BUILD_TYPE=Release" CMake Error: The source directory "/home/joshua/rustc3/src/llvm-project/llvm" does not exist. Specify --help for usage, or press the help button on the CMake GUI. thread 'main' panicked at ' command did not execute successfully, got: exit status: 1 build script failed, must exit now', /home/joshua/.local/lib/cargo/registry/src/github.com-1ecc6299db9ec823/cmake-0.1.44/src/lib.rs:885:5 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace finished in 0.783 seconds Build completed unsuccessfully in 0:00:01 ``` I *believe* this regression was only introduced in https://github.com/rust-lang/rust/pull/87380, not https://github.com/rust-lang/rust/pull/82653. ``@petrochenkov`` can you check that this fixes the issue you encountered in https://github.com/rust-lang/rust/pull/82653#issuecomment-886113679 ? r? ``@Mark-Simulacrum``
2021-07-28Rollup merge of #87330 - inquisitivecrystal:extend-reserve, r=JohnTitorYuki Okushi-9/+1
Use hashbrown's `extend_reserve()` in `HashMap` When we added `extend_reserve()` to our implementation of `Extend` for `HashMap`, hashbrown didn't have a version we could use. Now that hashbrown has added it, we should use its version instead of implementing it ourself.
2021-07-28Rollup merge of #87315 - ricobbe:raw-dylib-unstable-book, r=wesleywiserYuki Okushi-0/+34
Add docs for raw-dylib to unstable book
2021-07-28Auto merge of #86735 - jhpratt:rfc-3107, r=petrochenkovbors-71/+506
Implement RFC 3107: `#[derive(Default)]` on enums with a `#[default]` attribute This PR implements RFC 3107, which permits `#[derive(Default)]` on enums where a unit variant has a `#[default]` attribute. See comments for current status.
2021-07-28Auto merge of #85769 - jhpratt:stabilize-const-transmute-union, r=RalfJungbors-535/+147
Stabilize `const_fn_transmute`, `const_fn_union` This PR stabilizes the `const_fn_transmute` and `const_fn_union` features. It _does not_ stabilize any methods (obviously aside from `transmute`) that are blocked on only these features. Closes #53605. Closes #51909.
2021-07-27Remove min_tait and full_tait stderr dangling filesSantiago Pastorino-5211/+0
2021-07-27Bless nll testsSantiago Pastorino-0/+79
2021-07-27remove unneeded stringifySmitty-3/+3
2021-07-27Update testsJacob Pratt-455/+127
2021-07-27Stabilize `const_fn_union`Jacob Pratt-33/+5
2021-07-27Stabilize `const_fn_transmute`Jacob Pratt-47/+15
2021-07-27Auto merge of #80367 - camelid:check_match-combine-loop, r=Nadrierilbors-8/+3
Combine two loops in `check_match` Suggested by Nadrieril in https://github.com/rust-lang/rust/pull/79051#discussion_r548778186. Opening to get a perf run. Hopefully this code doesn't require everything in the first loop to be done before running the second! (It shouldn't though.) cc `@Nadrieril`
2021-07-27Prohibit `#[default]` in invalid placesJacob Pratt-29/+131
2021-07-27Indicate E0665 is no longer emittedJacob Pratt-1/+3
2021-07-27Add machine-applicable suggestionsJacob Pratt-8/+42
This avoids the need for tools like rust-analyzer to implement these suggestions themselves.
2021-07-27Permit deriving default on enums with `#[default]`Jacob Pratt-74/+371
2021-07-27Auto merge of #83484 - JulianKnodt:infer, r=oli-obk,lcnrbors-108/+524
Add hir::GenericArg::Infer In order to extend inference to consts, make an Infer type on hir::GenericArg.
2021-07-27remove allow(unconditional_recursion)ibraheemdev-3/+15
2021-07-27Remove min_type_alias_impl_trait featureSantiago Pastorino-171/+4
2021-07-27existential_type was removed in favor of type_alias_impl_traitSantiago Pastorino-1/+1
2021-07-27Make all tests use type_alias_impl_trait feature instead of minSantiago Pastorino-523/+2713
2021-07-27Use type_alias_impl_trait instead of min in compiler and libSantiago Pastorino-2255/+1192
2021-07-27Auto merge of #87509 - JohnTitor:rollup-8iqn6cl, r=JohnTitorbors-52/+180
Rollup of 10 pull requests Successful merges: - #86450 (Add flag to configure `large_assignments` lint) - #86764 (Avoid ICE on type error recovery) - #87354 (Update VxWork's UNIX support) - #87427 (get rid of NoMirFor error variant) - #87446 (macos current_exe using directly libc instead.) - #87494 (fix typo: whenver -> whenever) - #87497 (Add long explanation for E0544.) - #87499 (Remove ASCII fast path from `rustc_lexer::{is_id_continue, is_id_start}`) - #87502 (Update cargo) - #87503 (Update books) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-07-27Rollup merge of #87503 - ehuss:update-books, r=ehussYuki Okushi-0/+0
Update books ## nomicon 1 commits in 7a13537f96af4b9b8e3ea296d6e5c3c7ab72ce9f..f51734eb5566c826b471977747ea3d7d6915bbe9 2021-07-05 23:34:47 -0400 to 2021-07-23 18:24:35 +0900 - Add cloning example for dot operator behaviour (rust-lang/nomicon#292) ## reference 3 commits in 82d75cf423e4a7824fb36e73ccb18519d6900610..3b7be075af5d6e402a18efff672a8a265b4596fd 2021-07-15 06:49:08 -0700 to 2021-07-26 13:20:11 -0700 - Fix typos + grammar (rust-lang/reference#1037) - Expand on Unicode identifiers. (rust-lang/reference#1022) - Remove incorrect apostrophe (rust-lang/reference#1076) ## book 17 commits in eac55314210519238652f12b30fec9daea61f7fe..a07036f864b37896b31eb996cd7aedb489f69a1f 2021-07-19 11:08:01 -0400 to 2021-07-26 20:19:46 -0400 - Set expectations a bit more realistically - Snapshot of chapter 4 for nostarch - A few small wording tweaks in ch 4 - Clarify that it's not stack/heap exactly that matters for copy/non copy, fixes rust-lang/book#2799 - Clarify a detail around move. Fixes rust-lang/book#2413. - Clarify places that changed because of NLL. Fixes rust-lang/book#1939. - nostarch ch3 - Small edits to chapter 3 - (rust-lang/book#2797) - Update ch03-03-how-functions-work.md: Pervasive -> Prevalent. (rust-lang/book#2796) - Address loop labels and continue. Fixes rust-lang/book#1392. - Clarify behavior of integer division. Fixes rust-lang/book#2248. - Demonstrate how scope interacts with shadowing - Add another cross-reference to the new unit type introduction - Introduce the unit type with tuples. Fixes rust-lang/book#1933. - Reword sentence to not have numbers separated only by a comma - Link directly to other installation page. Fixes rust-lang/book#1609 ## rust-by-example 1 commits in 1db6bb483cc87ad3b424d9aba764fe622960a1be..0dc9cd4e89f00cb5230f120e1a083916386e422b 2021-07-15 06:17:42 -0300 to 2021-07-23 09:14:27 -0300 - Grammatical mistake: Comparison as ... as the (rust-lang/rust-by-example#1453) ## rustc-dev-guide 2 commits in 93422c21baca585dc88357ec886a48f6ddc7d665..09343d6f921d2a07c66f8c41ec3d65bf1fa52556 2021-07-13 12:45:58 -0400 to 2021-07-26 00:37:28 +0200 - Fix typo in building/bootstrapping.md (rust-lang/rustc-dev-guide#1175) - Link directly to stabilization report comments (rust-lang/rustc-dev-guide#1173) ## edition-guide 4 commits in af696ce8ea526445590ae0ca66a8128d2a95a69a..3710b0cae783d0bcd2b42452a63b081473f5970a 2021-07-20 11:38:03 -0400 to 2021-07-26 11:34:46 -0700 - Add more consistent headings and add a migration section to reserving-syntax (rust-lang/edition-guide#263) - reserving-syntax.md: Expand and add detail (rust-lang/edition-guide#249) - Fix typo in or-patterns section (rust-lang/edition-guide#262) - Fix typo (rust-lang/edition-guide#261)
2021-07-27Rollup merge of #87502 - ehuss:update-cargo, r=ehussYuki Okushi-0/+0
Update cargo 8 commits in cebef2951ee69617852844894164b54ed478a7da..d21c22870e58499d6c31f1bef3bf1255eb021666 2021-07-22 13:01:52 +0000 to 2021-07-26 20:23:21 +0000 - Fix version string. (rust-lang/cargo#9727) - Allow publishing from workspace root. (rust-lang/cargo#9559) - Better msg for wrong position (rust-lang/cargo#9723) - Stabilize the rustc-link-arg option (rust-lang/cargo#9557) - Warning when using features in replace (rust-lang/cargo#9681) - Refactor if let chains to matches! macro (rust-lang/cargo#9721) - Weather is not nice today.. (rust-lang/cargo#9720) - Update should_use_metadata function (rust-lang/cargo#9653)
2021-07-27Rollup merge of #87499 - ibraheemdev:patch-6, r=dtolnayYuki Okushi-14/+4
Remove ASCII fast path from `rustc_lexer::{is_id_continue, is_id_start}` `unicode_xid` now has a fast path built-in: https://github.com/unicode-rs/unicode-xid/commit/122b38775cf077570025c8294280f57d2004096f
2021-07-27Rollup merge of #87497 - midgleyc:long-E0544, r=GuillaumeGomezYuki Okushi-2/+31
Add long explanation for E0544. Helps with #61137
2021-07-27Rollup merge of #87494 - midgleyc:comment-typos, r=joshtriplettYuki Okushi-1/+1
fix typo: whenver -> whenever Fix a typo in a comment in RefCell: "whenver" -> "whenever".
2021-07-27Rollup merge of #87446 - devnexen:macos_update, r=dtolnayYuki Okushi-8/+5
macos current_exe using directly libc instead.
2021-07-27Rollup merge of #87427 - RalfJung:no-mir-for, r=oli-obkYuki Okushi-18/+4
get rid of NoMirFor error variant The only place where we throw that error, it is very quickly caught again and turned into a different error. So raise that other error immediately.
2021-07-27Rollup merge of #87354 - Wind-River:2021_master, r=kennytmYuki Okushi-1/+3
Update VxWork's UNIX support 1. VxWorks does not provide glibc 2. VxWorks does provide `sigemptyset` and `sigaddset` Note: these changes are concurrent to [this PR](https://github.com/rust-lang/libc/pull/2295) in libc.
2021-07-27Rollup merge of #86764 - estebank:issue-86756, r=pnkfelixYuki Okushi-2/+68
Avoid ICE on type error recovery Fix #86756
2021-07-27Rollup merge of #86450 - tmiasko:move-size-limit, r=pnkfelixYuki Okushi-6/+64
Add flag to configure `large_assignments` lint The `large_assignments` lints detects moves over specified limit. The limit is configured through `move_size_limit = "N"` attribute placed at the root of a crate. When attribute is absent, the lint is disabled. Make it possible to enable the lint without making any changes to the source code, through a new flag `-Zmove-size-limit=N`. For example, to detect moves exceeding 1023 bytes in a cargo crate, including all dependencies one could use: ``` $ env RUSTFLAGS=-Zmove-size-limit=1024 cargo build -vv ``` Lint tracking issue #83518.
2021-07-27Auto merge of #87431 - the8472:array-iter-fold, r=kennytmbors-0/+27
implement fold() on array::IntoIter to improve flatten().collect() perf With #87168 flattening `array::IntoIter`s is now `TrustedLen`, the `FromIterator` implementation for `Vec` has a specialization for `TrustedLen` iterators which uses internal iteration. This implements one of the main internal iteration methods on `array::Into` to optimize the combination of those two features. This should address the main issue in #87411 ``` # old test vec::bench_flat_map_collect ... bench: 2,244,024 ns/iter (+/- 18,903) # new test vec::bench_flat_map_collect ... bench: 172,863 ns/iter (+/- 2,141) ```
2021-07-27Add warning to SGX mutex implementationJethro Beekman-0/+2
2021-07-27Revert "SGX mutex is movable"Jethro Beekman-1/+1
This reverts commit 30b82e0f96579d9f897c4e2a780af82662d89772.
2021-07-27Auto merge of #85305 - MarcusDunn:master, r=pnkfelixbors-335/+228
Stabilize bindings_after_at attempting to stabilze bindings_after_at [#65490](https://github.com/rust-lang/rust/issues/65490), im pretty new to the whole thing so any pointers are greatly appreciated.
2021-07-26Update booksEric Huss-0/+0
2021-07-26Update cargoEric Huss-0/+0
2021-07-27Auto merge of #83491 - jyn514:remove-pretty, r=pnkfelixbors-87/+47
Remove unstable `--pretty` flag It doesn't do anything `--unpretty` doesn't, and due to a bug, also didn't show up in `--help`. I don't think there's any reason to keep it around, I haven't seen anyone using it. Closes https://github.com/rust-lang/rust/issues/36473.
2021-07-26update unicode-xid dependencyibraheemdev-2/+2
2021-07-27Auto merge of #87062 - poliorcetics:fix-85462, r=dtolnaybors-2/+58
Make StrSearcher behave correctly on empty needle Fix #85462. This will not affect ABI since the other variant of the enum is bigger. It may break some code, but that would be very strange: usually people don't continue after the first `Done` (or `None` for a normal iterator). `@rustbot` label T-libs A-str A-patterns
2021-07-26Document math behind MIN/MAX consts on integersSmitty-12/+15
2021-07-26Remove ASCII fast path from rustc_lexer::{is_id_continue, is_id_start}Ibraheem Ahmed-12/+2
2021-07-27from review: add a comment why try_fold was chosen instead of foldThe8472-0/+5
2021-07-26Add long explanation for E0544.Chris Midgley-2/+31