Commit graph

143055 commits

Author SHA1 Message Date
Justus K
b6120bfb35
Add type to differentiate between fake and real DefId's 2021-05-04 19:34:12 +02:00
Mark Rousskov
9d4c0944cb Change bitwise operator to more easily keep data in vector registers 2021-05-04 11:55:18 -04:00
Esteban Küber
11379f0494 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-04 08:41:40 -07:00
Mark Rousskov
aa68ec2f81 Retry clang+llvm download
We've been seeing a pretty high rate of spurious network failures (e.g., openssl
connection reset by peer). Not clear why, but let's add a retry.
2021-05-04 11:31:00 -04:00
bors
dc5f2cd266 Auto merge of #84894 - joshtriplett:clang-12, r=Mark-Simulacrum
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-04 15:03:50 +00:00
Ralf Jung
0b94338a26 CTFE engine: rename copy → copy_intrinsic, move to intrinsics.rs 2021-05-04 13:56:31 +02:00
bors
a5f164faad Auto merge of #84017 - Smittyvb:int-literal-underscores, r=jyn514
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-04 10:42:13 +00:00
hyd-dev
ee7a6c6acc
Remove rustc_middle::mir::interpret::CheckInAllocMsg::NullPointerTest 2021-05-04 18:27:02 +08:00
hyd-dev
db90c905d0
Update Miri 2021-05-04 17:07:39 +08:00
bors
7a0f1781d0 Auto merge of #83213 - rylev:update-lints-to-errors, r=nikomatsakis
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-04 08:09:23 +00:00
Esteban Küber
6b64202d5e Handle incorrect placement of parentheses in trait bounds more gracefully
Fix #84772.
2021-05-03 23:48:56 -07:00
Josh Triplett
b9ef51f060 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-03 22:54:50 -07:00
bors
c20c9219da Auto merge of #84874 - joshtriplett:ci-extract-llvm-win64-installer, 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-04 05:40:24 +00:00
bors
0309953232 Auto merge of #84833 - Mark-Simulacrum:thread-local-consts, r=varkor
"const" initialized thread locals in rustc

This appears to give a slight speedup on many of our benchmarks.
2021-05-04 03:14:32 +00:00
bors
14f863c443 Auto merge of #84472 - Aaron1011:conservative-paramenv-and, r=lcnr
Be more conservative about discarding caller_bound in `ParamEnv::and`
2021-05-04 00:48:42 +00:00
Smitty
f84b4c51ce 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.
2021-05-03 20:11:09 -04:00
Julian Frimmel
389333a21c 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 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-03 23:14:17 +02:00
Josh Triplett
d459b5dc6c platform-support: Center the contents of the std and host columns 2021-05-03 13:01:40 -07:00
Jim Blandy
d53469c1d3 Clarify documentation for [T]::contains. Fixes #84877. 2021-05-03 12:01:16 -07:00
Josh Triplett
22d187a3f6 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-03 11:23:00 -07:00
Joshua Nelson
6eb4735acc Unify rustc and rustdoc parsing of cfg()
This extracts a new `parse_cfg` function that's used between both.

- Treat `#[doc(cfg(x), cfg(y))]` the same as `#[doc(cfg(x)]
  #[doc(cfg(y))]`. Previously it would be completely ignored.
- Treat `#[doc(inline, cfg(x))]` the same as `#[doc(inline)]
  #[doc(cfg(x))]`. Previously, the cfg would be ignored.
- Pass the cfg predicate through to rustc_expand to be validated

Co-authored-by: Vadim Petrochenkov <vadim.petrochenkov@gmail.com>
2021-05-03 12:49:43 -04:00
bjorn3
24def637b3 Wire up tidy dependency checks for cg_clif 2021-05-03 18:42:00 +02:00
bjorn3
5db01aae99 Take build dependencies into account during license checks
The comment says that build dependencies shouldn't matter unless they do
some kind of codegen. It is safer to always check it though.
2021-05-03 18:42:00 +02:00
bjorn3
2fa18b8864 Remove obsolete crate exceptions 2021-05-03 18:41:59 +02:00
bjorn3
d7cd6e2426 Fix RESTRICTED_DEPENDENCY_CRATES to list rustc_driver instead of rustc_middle 2021-05-03 18:41:59 +02:00
Christiaan Dirkx
2173d8dbe6 Change std::sys::unix::ext::fs::PermissionsExt::from_mode to std::os:👿:unix::fs::PermissionsExt::from_mode in Clippy 2021-05-03 16:56:22 +02:00
Christiaan Dirkx
0caa20ee5d Allow documenting on hermit 2021-05-03 16:56:22 +02:00
Christiaan Dirkx
a0ca3f94f0 Rework os to avoid using cfg_if! with public items 2021-05-03 16:56:22 +02:00
Christiaan Dirkx
e098d2730a Move std::sys::sgx::ext to std::os::fortanix_sgx 2021-05-03 16:56:21 +02:00
Christiaan Dirkx
3edba7a806 Move std::sys::wasi::ext to std::os::wasi 2021-05-03 16:56:21 +02:00
Christiaan Dirkx
a808fd44a3 Move std::sys::unix::ext to std::os::unix 2021-05-03 16:56:21 +02:00
Christiaan Dirkx
ffc20e48de Move std::sys::windows::ext to std::os::windows 2021-05-03 16:56:20 +02:00
Christiaan Dirkx
7024bfffbd Move std::sys::hermit::ext to std::os::hermit 2021-05-03 16:56:20 +02:00
Christiaan Dirkx
0e2cd33db8 Cleanup std::os 2021-05-03 16:56:20 +02:00
bors
716394d658 Auto merge of #84862 - GuillaumeGomez:rollup-cbc93h4, r=GuillaumeGomez
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-03 14:35:12 +00:00
Vadim Petrochenkov
f9eda61569 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 as well
2021-05-03 16:50:43 +03:00
Erin Power
b4bfb0e30e Update RELEASES.md for 1.52.0 2021-05-03 15:32:31 +02:00
Guillaume Gomez
2d789b6373
Rollup merge of #84860 - badboy:link-to-mcp, r=GuillaumeGomez
Link to MCP from target tier policy

Promoting new targets requires filing a MCP. Probably good to link to the documentation what that even is.
2021-05-03 15:08:12 +02:00
Guillaume Gomez
55e21e8cca
Rollup merge of #84858 - LingMan:patch-1, r=JohnTitor
Fix stability attributes of byte-to-string specialization
2021-05-03 15:08:11 +02:00
Guillaume Gomez
2604440d8a
Rollup merge of #84856 - kornelski:enomem, r=JohnTitor
Correct stability of ErrorKind::OutOfMemory

Fix for #84744
2021-05-03 15:08:10 +02:00
Guillaume Gomez
377722103e
Rollup merge of #84854 - hi-rustin:rustin-patch-E0761, r=varkor
use double quotes and full path for E0761

close https://github.com/rust-lang/rust/issues/84828
2021-05-03 15:08:09 +02:00
Guillaume Gomez
ed1646a785
Rollup merge of #84852 - mautamu:master, r=GuillaumeGomez
Change librustdoc write!(.. \n) to writeln!(..); fix comment grammar

Howdy,

This PR does the following:
1. Updates the grammar of a comment in librustdoc.
2. Replaces a few write!(..\n) macros with writeln!(..\n) for clarity. (Please let me know if there is a reason why this might be wrong!)

Best,
Mautamu
2021-05-03 15:08:07 +02:00
Guillaume Gomez
dd5fc8edb8
Rollup merge of #84835 - wcampbell0x2a:add-issue-34202-link, r=m-ou-se
Add link to Issue #34202 in udp docs
2021-05-03 15:08:02 +02:00
Jan-Erik Rediger
9ed197b93c Link to MCP from target tier policy 2021-05-03 13:48:56 +02:00
wcampbell
2e559c8e10
use else if in std library
Clippy: Decreases indentation and improves readability

Signed-off-by: wcampbell <wcampbell1995@gmail.com>
2021-05-03 07:05:08 -04:00
LingMan
eb9f168e1e
Fix stability attributes of byte-to-string specialization 2021-05-03 13:00:34 +02:00
hi-rustin
461f52071d use full path for E0761 2021-05-03 18:57:48 +08:00
bors
c825bc431e Auto merge of #83312 - petrochenkov:noinner, r=Aaron1011
parser: Remove support for inner attributes on non-block expressions

Remove support for attributes like
```rust
fn attrs() {
    (#![print_target_and_args(fifth)] 1, 2);

    [#![print_target_and_args(sixth)] 1 , 2];
    [#![print_target_and_args(seventh)] true ; 5];

    match 0 {
        #![print_target_and_args(eighth)]
        _ => {}
    }

    MyStruct { #![print_target_and_args(ninth)] field: true };
}
```
They are
- useless
- unstable (modulo holes like https://github.com/rust-lang/rust/issues/65860)
- pessimize compiler performance, namely token collection for macros (cc https://github.com/rust-lang/rust/pull/82608)

I still want to run crater on this to check whether the stability holes are exploited in practice, and whether such attributes are used at all.
2021-05-03 10:56:15 +00:00
Vadim Petrochenkov
1443c7646d parser: Remove support for inner attributes on non-block expressions 2021-05-03 13:33:53 +03:00
Kornel
2247d46b11 Correct stability of ErrorKind::OutOfMemory 2021-05-03 10:28:19 +01:00