about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2021-05-06Fix incorrect suggestions for E0605Fabian Wolff-17/+74
2021-05-05Auto merge of #84956 - RalfJung:rollup-m70mx2n, r=RalfJungbors-123/+362
Rollup of 11 pull requests Successful merges: - #83553 (Update `ptr` docs with regards to `ptr::addr_of!`) - #84183 (Update RELEASES.md for 1.52.0) - #84709 (Add doc alias for `chdir` to `std::env::set_current_dir`) - #84803 (Reduce duplication in `impl_dep_tracking_hash` macros) - #84808 (Account for unsatisfied bounds in E0599) - #84843 (use else if in std library ) - #84865 (rustbuild: Pass a `threads` flag that works to windows-gnu lld) - #84878 (Clarify documentation for `[T]::contains`) - #84882 (platform-support: Center the contents of the `std` and `host` columns) - #84903 (Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`) - #84913 (Do not ICE on invalid const param) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-05-05Rollup merge of #84913 - estebank:issue-84831, r=varkorRalf Jung-1/+54
Do not ICE on invalid const param When encountering a path that can't have generics, do not call `generics_of`. This would happen when writing something like `path::this_is_a_mod<const_val>`. Fix #84831.
2021-05-05Rollup merge of #84903 - hyd-dev:dead-check-in-alloc-msg, r=RalfJungRalf Jung-5/+0
Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest` Removing it per https://github.com/rust-lang/rust/pull/84842#discussion_r625589674: it's a dead enum variant. Note that `PointerArithmeticTest` also seems dead: ``` $ rg -F PointerArithmeticTest -C5 compiler/rustc_middle/src/mir/interpret/error.rs 169- 170-/// Details of why a pointer had to be in-bounds. 171-#[derive(Debug, Copy, Clone, TyEncodable, TyDecodable, HashStable)] 172-pub enum CheckInAllocMsg { 173- MemoryAccessTest, 174: PointerArithmeticTest, 175- InboundsTest, 176-} 177- 178-impl fmt::Display for CheckInAllocMsg { 179- /// When this is printed as an error the context looks like this -- 182- write!( 183- f, 184- "{}", 185- match *self { 186- CheckInAllocMsg::MemoryAccessTest => "memory access", 187: CheckInAllocMsg::PointerArithmeticTest => "pointer arithmetic", 188- CheckInAllocMsg::InboundsTest => "inbounds test", 189- } 190- ) 191- } 192-} ``` Not sure if that is also desirable to be removed, however.
2021-05-05Rollup merge of #84882 - joshtriplett:platform-support-formatting, r=Dylan-DPCRalf Jung-2/+2
platform-support: Center the contents of the `std` and `host` columns Minor formatting improvement.
2021-05-05Rollup merge of #84878 - jimblandy:contains-doc-fix, r=joshtriplettRalf Jung-2/+3
Clarify documentation for `[T]::contains` Change the documentation to correctly characterize when the suggested alternative to `contains` applies, and correctly explain why it works. Fixes #84877
2021-05-05Rollup merge of #84865 - petrochenkov:llthread, r=Mark-SimulacrumRalf Jung-8/+15
rustbuild: Pass a `threads` flag that works to windows-gnu lld MinGW driver for COFF LLD doesn't currently translate GNU-style `--threads=N` to native `/threads:N`, so we have to pass the option in its native form to avoid an error. Also pass the `threads` flag to lld-link (windows-msvc lld) as well.
2021-05-05Rollup merge of #84843 - wcampbell0x2a:use-else-if-let, r=dtolnayRalf Jung-6/+4
use else if in std library Decreases indentation and improves readability
2021-05-05Rollup merge of #84808 - estebank:issue-84769, r=petrochenkovRalf Jung-3/+30
Account for unsatisfied bounds in E0599 Fix #84769, follow up to #84499, #83667.
2021-05-05Rollup merge of #84803 - jyn514:duplicate-macros, r=petrochenkovRalf Jung-57/+61
Reduce duplication in `impl_dep_tracking_hash` macros Cherry-picked from https://github.com/rust-lang/rust/pull/84234 since it will be a while until it lands.
2021-05-05Rollup merge of #84709 - joshtriplett:doc-alias-chdir, r=dtolnayRalf Jung-0/+1
Add doc alias for `chdir` to `std::env::set_current_dir` Searching for `chdir` in the Rust documentation produces no useful results. I wrote some code recently that called `libc::chdir` and manually handled errors, because I didn't realize that the safe `std::env::set_current_dir` existed. I searched for `chdir` and `change_dir` and `change_directory` (the latter two based on the precedent of unabbreviating set by `create_dir`), and I also read through `std::fs` expecting to potentially find it there. Given that none of those led to `std::env::set_current_dir`, I think that provides sufficient justification to add this specific alias.
2021-05-05Rollup merge of #84183 - rust-lang:relnotes-1.52.0, r=pietroalbiniRalf Jung-0/+148
Update RELEASES.md for 1.52.0 ### [Rendered](https://github.com/rust-lang/rust/blob/relnotes-1.52.0/RELEASES.md) r? ````````@Mark-Simulacrum```````` cc ````````@rust-lang/release````````
2021-05-05Rollup merge of #83553 - jfrimmel:addr-of, r=m-ou-seRalf Jung-39/+44
Update `ptr` docs with regards to `ptr::addr_of!` This updates the documentation since `ptr::addr_of!` and `ptr::addr_of_mut!` are now stable. One might remove the distinction between the sections `# On packed structs` and `# Examples`, as the old section on packed structs was primarily to prevent users of doing undefined behavior, which is not necessary anymore. Technically there is now wrong/outdated documentation on stable, but I don't think this is worth a point release 😉 Fixes #83509. ``````````@rustbot`````````` modify labels: T-doc
2021-05-05Auto merge of #84200 - CDirkx:os, r=m-ou-sebors-191/+162
Move all `sys::ext` modules to `os` This PR moves all `sys::ext` modules to `os`, centralizing the location of all `os` code and simplifying the dependencies between `os` and `sys`. Because this also removes all uses `cfg_if!` on publicly exported items, where after #81969 there were still a few left, this should properly work around https://github.com/rust-analyzer/rust-analyzer/issues/6038. `@rustbot` label: +T-libs-impl
2021-05-05Auto merge of #84886 - Xanewok:update-rls-and-rustfmt, r=Xanewokbors-134/+65
Update RLS and Rustfmt Closes #84537. Closes #84538. I know there's https://github.com/rust-lang/rust/pull/82208 in progress but I'm not sure which we want to land first. Also, I'm getting Rustfmt test failures due to inner attributes not permitted: <details> ``` error: an inner attribute is not permitted in this context --> tests/target/issue-3592.rs:4:13 | 4 | #![cfg(unix)] | ^^^^^^^^^^^^^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. error: an inner attribute is not permitted in this context --> tests/target/issue-3592.rs:8:13 | 8 | #![cfg(not(unix))] | ^^^^^^^^^^^^^^^^^^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. error: an inner attribute is not permitted in this context --> tests/source/match.rs:413:9 | 413 | #![allow(simple_match)] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. error: an inner attribute is not permitted in this context --> tests/target/match.rs:444:9 | 444 | #![allow(simple_match)] | ^^^^^^^^^^^^^^^^^^^^^^^ | = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files. Outer attributes, like `#[test]`, annotate the item following them. test test::system_tests ... FAILED test test::idempotence_tests ... FAILED ``` </details> but let's see what CI says, first. cc `@calebcartwright`
2021-05-05Add `yansi-term` as a permitted dependencyJoshua Nelson-0/+2
2021-05-05Update RLS and RustfmtIgor Matuszewski-134/+63
2021-05-05Auto merge of #84794 - ChrisDenton:dedup-native-libs, r=petrochenkovbors-0/+8
Deduplicate native libs before they are passed to the linker Stop spamming the linker with the same native library over and over again, if they directly follow from each other. This would help prevent [this situation](https://github.com/MSxDOS/ntapi/issues/2). Issue #38460 has been open since 2016 so I think it's worth making an incomplete fix that at least addresses the most common symptom and without otherwise changing how Rust handles native libs. This PR is intended to be easy to revert (if necessary) when a more permanent fix is implemented.
2021-05-05Auto merge of #84915 - Mark-Simulacrum:bitset-xor-eq, r=jackh726bors-3/+7
Retain data in vectorized registers for longer This seems to be a mild performance improvement on the keccak crate at least, though not sure it'll show up more broadly.
2021-05-04Auto merge of #84707 - Stupremee:remove-fake-defids-in-rustdoc, ↵bors-268/+336
r=jyn514,GuillaumeGomez Get rid of fake `DefId`s in rustdoc Right now there are *many* errors left, but I wanted to show the current state since all that is left to do is fixing the errors. Resolves #83183 r? `@jyn514`
2021-05-04Auto merge of #84900 - hyd-dev:miri, r=RalfJungbors-8/+9
Update Miri This should fix #84848. r? `@RalfJung`
2021-05-04Add type to differentiate between fake and real DefId'sJustus K-268/+336
2021-05-04Change bitwise operator to more easily keep data in vector registersMark Rousskov-3/+7
2021-05-04Do not ICE on invalid const paramEsteban Küber-1/+54
When encountering a path that can't have generics, do not call `generics_of`. This would happen when writing something like `path::this_is_a_mod<const_val>`. Fix #84831.
2021-05-04Auto merge of #84894 - joshtriplett:clang-12, r=Mark-Simulacrumbors-1/+1
Update clang to 12.0.0 on Windows and macOS Needed for https://github.com/rust-lang/rust/pull/84764 . Tarballs already uploaded to the CI mirror bucket.
2021-05-04Auto merge of #84017 - Smittyvb:int-literal-underscores, r=jyn514bors-2/+62
Valid underscores in hex/octal/binary literal docs Currently hex/octal/binary literals with computed values are displayed like `0_xff_fff_fffu32`, which is invalid since underscores can't be in the middle of integer prefixes. This properly formats prefixed integers. This causes [`std::u32::MAX`](https://doc.rust-lang.org/std/u32/constant.MAX.html) to be displayed as ```rust pub const MAX: u32 = u32::MAX; // 0_xff_fff_fffu32 ``` This PR changes it to be displayed as: ```rust pub const MAX: u32 = u32::MAX; // 0xffff_ffffu32 ```
2021-05-04Remove `rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest`hyd-dev-5/+0
2021-05-04Update Mirihyd-dev-8/+9
2021-05-04Auto merge of #83213 - rylev:update-lints-to-errors, r=nikomatsakisbors-196/+541
Update BARE_TRAIT_OBJECT and ELLIPSIS_INCLUSIVE_RANGE_PATTERNS to errors in Rust 2021 This addresses https://github.com/rust-lang/rust/pull/81244 by updating two lints to errors in the Rust 2021 edition. r? `@estebank`
2021-05-03Update clang to 12.0.0 on Windows and macOSJosh Triplett-1/+1
Needed for https://github.com/rust-lang/rust/pull/84764 . Tarballs already uploaded to the CI mirror bucket.
2021-05-04Auto merge of #84874 - joshtriplett:ci-extract-llvm-win64-installer, ↵bors-15/+6
r=Mark-Simulacrum CI: Extract LLVM win64 installer directly, using 7z Currently, we have LLVM tarballs for win64, generated by someone running the installer via wine and tarring up the result. 7z knows how to extract NSIS installers directly, and the result is identical to our tarball, except that it doesn't include `Uninstall.exe` (which we don't care about) and it includes the NSIS plugin directory (which we also don't care about). This simplifies the process of upgrading CI, and allows us to just mirror the upstream release .exe directly. This also improves our supply chain.
2021-05-04Auto merge of #84833 - Mark-Simulacrum:thread-local-consts, r=varkorbors-6/+8
"const" initialized thread locals in rustc This appears to give a slight speedup on many of our benchmarks.
2021-05-04Auto merge of #84472 - Aaron1011:conservative-paramenv-and, r=lcnrbors-2/+74
Be more conservative about discarding caller_bound in `ParamEnv::and`
2021-05-03Valid underscores in hex/octal/binary literal docsSmitty-2/+62
Currently hex/octal/binary literals with computed values are displayed like `0_xff_fff_fffu32`, which is invalid since underscores can't be in the middle of integer prefixes. This properly formats prefixed integers.
2021-05-03Update `ptr` docs with regards to `ptr::addr_of!`Julian Frimmel-39/+44
This updates the documentation since `ptr::addr_of!` and `ptr::addr_of_mut!` are now stable. One might remove the distinction between the sections `# On packed structs` and `# Examples`, as the old section on packed structs was primarily to prevent users of doing unde- fined behavior, which is not necessary anymore. There is also a new section in "how to obtain a pointer", which referen- ces the `ptr::addr_of!` macros. This commit contains squashed commits from code review. Co-authored-by: Joshua Nelson <joshua@yottadb.com> Co-authored-by: Mara Bos <m-ou.se@m-ou.se> Co-authored-by: Soveu <marx.tomasz@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de>
2021-05-03platform-support: Center the contents of the `std` and `host` columnsJosh Triplett-2/+2
2021-05-03Clarify documentation for `[T]::contains`. Fixes #84877.Jim Blandy-2/+3
2021-05-03CI: Extract LLVM win64 installer directly, using 7zJosh Triplett-15/+6
Currently, we have LLVM tarballs for win64, generated by someone running the installer via wine and tarring up the result. 7z knows how to extract NSIS installers directly, and the result is identical to our tarball, except that it doesn't include `Uninstall.exe` (which we don't care about) and it includes the NSIS plugin directory (which we also don't care about). This simplifies the process of upgrading CI, and allows us to just mirror the upstream release .exe directly. This also improves our supply chain.
2021-05-03Change `std::sys::unix::ext::fs::PermissionsExt::from_mode` to ↵Christiaan Dirkx-1/+1
`std::os::imp::unix::fs::PermissionsExt::from_mode` in Clippy
2021-05-03Allow documenting on `hermit`Christiaan Dirkx-3/+0
2021-05-03Rework `os` to avoid using `cfg_if!` with public itemsChristiaan Dirkx-123/+151
2021-05-03Move `std::sys::sgx::ext` to `std::os::fortanix_sgx`Christiaan Dirkx-8/+4
2021-05-03Move `std::sys::wasi::ext` to `std::os::wasi`Christiaan Dirkx-26/+2
2021-05-03Move `std::sys::unix::ext` to `std::os::unix`Christiaan Dirkx-22/+2
2021-05-03Move `std::sys::windows::ext` to `std::os::windows`Christiaan Dirkx-16/+5
2021-05-03Move `std::sys::hermit::ext` to `std::os::hermit`Christiaan Dirkx-3/+6
2021-05-03Cleanup `std::os`Christiaan Dirkx-111/+113
2021-05-03Auto merge of #84862 - GuillaumeGomez:rollup-cbc93h4, r=GuillaumeGomezbors-22/+24
Rollup of 6 pull requests Successful merges: - #84835 (Add link to Issue #34202 in udp docs) - #84852 (Change librustdoc write!(.. \n) to writeln!(..); fix comment grammar) - #84854 (use double quotes and full path for E0761) - #84856 (Correct stability of ErrorKind::OutOfMemory) - #84858 (Fix stability attributes of byte-to-string specialization) - #84860 (Link to MCP from target tier policy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-05-03rustbuild: Pass a `threads` flag that works to windows-gnu lldVadim Petrochenkov-8/+15
MinGW driver for COFF LLD doesn't currently translate GNU-style `--threads=N` to native `/threads:N`, so we have to pass the option in its native form to avoid an error. Also pass the `threads` flag to lld-link as well
2021-05-03Update RELEASES.md for 1.52.0Erin Power-0/+148