Commit Graph

163416 Commits

Author SHA1 Message Date
bors
75d9a0ae21 Auto merge of #94061 - matthiaskrgr:rollup-oduekp5, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - #92366 (Resolve concern of `derive_default_enum`)
 - #93382 (Add a bit more padding in search box)
 - #93962 (Make [u8]::cmp implementation branchless)
 - #94015 (rustdoc --check option documentation)
 - #94017 (Clarify confusing UB statement in MIR)
 - #94020 (Support pretty printing of invalid constants)
 - #94027 (Update browser UI test version)
 - #94037 (Fix inconsistent symbol mangling with -Zverbose)
 - #94045 (Update books)
 - #94054 (⬆️ rust-analyzer)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2022-02-16 18:52:59 +00:00
Matthias Krüger
be858fa119
Rollup merge of #94054 - lnicola:rust-analyzer-2022-02-16, r=lnicola
⬆️ rust-analyzer

r? ``@ghost``
2022-02-16 18:59:36 +01:00
Matthias Krüger
5394714016
Rollup merge of #94045 - ehuss:update-books, r=ehuss
Update books

## nomicon

3 commits in 9493715a6280a1f74be759c7e1ef9999b5d13e6f..90993eeac93dbf9388992de92965f99cf6f29a03
2022-01-27 19:00:32 -0800 to 2022-02-13 12:44:12 +0900
- Fix a small typo in exception-safety.md (rust-lang/nomicon#341)
- Make `Vec::new` public in vec-alloc.md (rust-lang/nomicon#336)
- Fix a syntax error in leaking.md (rust-lang/nomicon#335)

## reference

6 commits in 411c2f0d5cebf48453ae2d136ad0c5e611d39aec..70fc73a6b908e08e66aa0306856c5211312f6c05
2022-01-30 12:46:37 -0800 to 2022-02-14 19:33:01 -0800
- Document pre-Rust-2021 special case for IntoIterator method lookup (rust-lang/reference#1154)
- Mention std::is_aarch64_feature_detected (rust-lang/reference#1061)
- Fix link to the Bastion of the Turbofish (rust-lang/reference#1161)
- Improve associated constant item CTFE timing section (rust-lang/reference#1147)
- document `#![feature(const_generics_defaults)]` (rust-lang/reference#1098)
- Update patterns allowed in @ patterns (rust-lang/reference#1158)

## book

6 commits in 98904efaa4fc968db8ff59cf2744d9f7ed158166..67b768c0b660a069a45f0e5d8ae2f679df1022ab
2022-01-29 21:22:31 -0500 to 2022-02-09 21:52:41 -0500
- Snapshot of ch18 for nostarch
- Remove mention of destructuring references as that's not covered currently
- Add note that exhaustiveness checking doesn't extend to match guards
- Change match guard example to actually be unexpressable with patterns alone
- Corrected listing number from 9-10 to 9-13
- Remove duplicate paragraph after No Starch related changes

## rustc-dev-guide

3 commits in 8763adb62c712df69b1d39ea3e692b6d696cc4d9..62f58394ba7b203f55ac35ddcc4c0b79578f5706
2022-01-26 14:01:40 -0800 to 2022-02-11 08:42:50 -0500
- Correction, building stage3 compiler (rust-lang/rustc-dev-guide#1298)
- Triage some date references (rust-lang/rustc-dev-guide#1293)
- mention test folders for cfg(bootstrap) (rust-lang/rustc-dev-guide#1294)
2022-02-16 18:59:35 +01:00
Matthias Krüger
237f16db45
Rollup merge of #94037 - tmiasko:verbose, r=Mark-Simulacrum
Fix inconsistent symbol mangling with -Zverbose

Always skip arguments that are the defaults of their respective
parameters, to avoid generating inconsistent symbols for builds
with `-Zverbose` flag and without it.
2022-02-16 18:59:34 +01:00
Matthias Krüger
847ac55bec
Rollup merge of #94027 - GuillaumeGomez:update-browser-ui-test, r=notriddle
Update browser UI test version

Might help a bit with https://github.com/rust-lang/rust/issues/93784 (still need to figure out what's going on with the driver).

r? ```@notriddle```
2022-02-16 18:59:33 +01:00
Matthias Krüger
bc4f117acc
Rollup merge of #94020 - tmiasko:pp, r=oli-obk
Support pretty printing of invalid constants

Make it possible to pretty print invalid constants by introducing a
fallible variant of `destructure_const` and falling back to debug
formatting when it fails.

Closes #93688.
2022-02-16 18:59:32 +01:00
Matthias Krüger
a5a1ffb178
Rollup merge of #94017 - fee1-dead:unub, r=bjorn3
Clarify confusing UB statement in MIR
2022-02-16 18:59:31 +01:00
Matthias Krüger
75a631d4ba
Rollup merge of #94015 - GuillaumeGomez:check-option, r=notriddle
rustdoc --check option documentation

Part of #92763.

r? ```@notriddle```
2022-02-16 18:59:30 +01:00
Matthias Krüger
9a42121135
Rollup merge of #93962 - joboet:branchless_slice_ord, r=Mark-Simulacrum
Make [u8]::cmp implementation branchless

The current implementation generates rather ugly assembly code, branching when the common parts are equal. By performing the comparison of the lengths upfront using a subtraction, the assembly gets much prettier: https://godbolt.org/z/4e5fnEKGd.

This will probably not impact speed too much, as the expensive part is in most cases the `memcmp`, but it sure looks better (I'm porting a sorting algorithm currently, and that branch just bothered me).
2022-02-16 18:59:29 +01:00
Matthias Krüger
01f0da2373
Rollup merge of #93382 - GuillaumeGomez:search-input-padding, r=jsha
Add a bit more padding in search box

As asked in https://github.com/rust-lang/rust/pull/93113#issuecomment-1021565703, here is a bit more padding.

You can check it [here](https://rustdoc.crud.net/imperio/search-input-padding/foo/index.html).

r? `@camelid`
2022-02-16 18:59:28 +01:00
Matthias Krüger
6930b6676a
Rollup merge of #92366 - jhpratt:derive-default-enum, r=Mark-Simulacrum
Resolve concern of `derive_default_enum`

This resolves the concern in favor of prohibiting multiple instances of
the attribute. This is similar to non-helper attributes as introduced in
#88681.

``@rustbot`` label +S-waiting-on-review +T-libs-api
2022-02-16 18:59:27 +01:00
Michael Howell
1a6d41cdb5 rustdoc: resolve intra-doc links when checking HTML
Similar to #86451

CC #67799
2022-02-16 09:15:39 -07:00
Michael Howell
65fc7058d8 Do not suggest "is a function" for free variables
Part of #82323
2022-02-16 09:12:32 -07:00
Mark Rousskov
fc01d2b854 Destabilize cfg(target_has_atomic_load_store = ...)
This was not intended to be stabilized yet.
2022-02-16 10:28:12 -05:00
Laurențiu Nicola
ef88c3f406 ⬆️ rust-analyzer 2022-02-16 17:23:51 +02:00
Ivan Lozano
568aeda9e9 MemTagSanitizer Support
Adds support for the LLVM MemTagSanitizer.
2022-02-16 09:39:03 -05:00
Krasimir Georgiev
0647e38904 add llvm-nm to bootstrap dist bin's 2022-02-16 14:13:09 +01:00
bors
f90b06d7fb Auto merge of #94044 - ehuss:update-cargo, r=ehuss
Update cargo

5 commits in c082648646cbb2be266df9ecbcdc253058158d68..ea2a21c994ca1e4d4c49412827b3cf4dcb158b1d
2022-02-08 14:55:05 +0000 to 2022-02-15 04:24:07 +0000
- cargo-new should not add ignore rule on Cargo.lock inside subdirs (rust-lang/cargo#10379)
- Add a badge for github actions (rust-lang/cargo#10385)
- Remove outdated badges (rust-lang/cargo#10380)
- Remove `strip = "off"` (and undocumented `strip = "n"`/`strip = "no"`) (rust-lang/cargo#10376)
- Fix unmatched backticks (rust-lang/cargo#10375)
2022-02-16 12:51:41 +00:00
lcnr
1b7c3bcef9 allow special behavior when printing const infer 2022-02-16 13:37:56 +01:00
lcnr
11ec2a47a4 extract Res to generics_of def_id conversion 2022-02-16 13:37:21 +01:00
Michael Woerister
28ca6b0f79 debuginfo: Support fat pointers to unsized tuples. 2022-02-16 13:29:00 +01:00
Daniel Henry-Mantilla
6d2cdbec3e Add mentions to Copy for union fields 2022-02-16 13:29:00 +01:00
Loïc BRANSTETT
3a73ca587b Implement --check-cfg option (RFC 3013)
Co-authored-by: Urgau <lolo.branstett@numericable.fr>
Co-authored-by: Marcelina Kościelnicka <mwk@0x04.net>
2022-02-16 13:03:12 +01:00
bjorn3
f606a5807c Rustup to rustc 1.60.0-nightly (09cb29c64 2022-02-15) 2022-02-16 12:43:07 +01:00
bjorn3
4563abd4f1 Sync from rust a240ccd81c 2022-02-16 12:14:53 +01:00
Chayim Refael Friedman
91adb6ccd6 Correctly mark the span of captured arguments in format_args!()
It should only include the identifier, or misspelling suggestions will be wrong.
2022-02-16 07:34:06 +00:00
Eric Huss
d385899288 Update cargo 2022-02-15 20:31:20 -08:00
Eric Huss
2b75594140 Update books 2022-02-15 20:17:31 -08:00
DrMeepster
ae32f43c50 fix assumption that ScalarPair Box is always a fat pointer 2022-02-15 20:04:43 -08:00
Lucas Kent
1973f277a3 Cleanup uses 2022-02-16 15:01:19 +11:00
Lucas Kent
ae212402d6 Make implementation generic 2022-02-16 14:58:36 +11:00
Lucas Kent
8610edd014 Suggest deriving required supertraits 2022-02-16 14:58:36 +11:00
bors
a240ccd81c Auto merge of #93800 - b-naber:static-initializers-mir-val, r=oli-obk
Treat static refs as `mir::ConstantKind::Val`

With the upcoming introduction of Valtrees we want to treat more values as `mir::ConstantKind::Val` directly.

r? `@lcnr`

cc `@oli-obk`
2022-02-16 03:03:03 +00:00
Tomasz Miąsko
3158372dea Fix inconsistent symbol mangling with -Zverbose
Always skip arguments that are the defaults of their respective
parameters, to avoid generating inconsistent symbols for builds
with `-Zverbose` flag and without it.
2022-02-16 02:05:17 +01:00
bors
393fdc1048 Auto merge of #94021 - tmiasko:inline, r=nagisa
Inline a few trivial conversion functions
2022-02-15 23:48:43 +00:00
Tomasz Miąsko
92d20c4aad Support pretty printing of invalid constants
Make it possible to pretty print invalid constants by introducing a
fallible variant of `destructure_const` and falling back to debug
formatting when it fails.
2022-02-16 00:38:59 +01:00
b-naber
db019f2160 try to bless 32bit mir tests manually 2022-02-15 22:24:53 +01:00
bors
09cb29c64c Auto merge of #93439 - abrown:cf-protection, r=nagisa
Add support for control-flow protection

This change adds a flag for configuring control-flow protection in the LLVM backend. In Clang, this flag is exposed as `-fcf-protection` with options `none|branch|return|full`. This convention is followed for `rustc`, though as a codegen option: `rustc -Z cf-protection=<none|branch|return|full>`. Tracking issue for future work is #93754.
2022-02-15 21:20:49 +00:00
Guillaume Gomez
590ca7e756 Add documentation for rustdoc --check option 2022-02-15 21:34:40 +01:00
Guillaume Gomez
0d2ff61ef5 Fix GUI test 2022-02-15 21:31:40 +01:00
Guillaume Gomez
6763cb9ab7 Update browser-ui-test version 2022-02-15 21:31:40 +01:00
b-naber
fff06e5edc use AllocId and Ty in ExprKind::StaticRef and delay ConstValue construction 2022-02-15 21:18:33 +01:00
b-naber
54ff25e446 bless mir-opt tests 2022-02-15 21:17:49 +01:00
b-naber
22d6204db8 use mir::Visitor when collecting alloc_ids in pretty printing 2022-02-15 21:17:46 +01:00
b-naber
8092b90cb2 bless tests 2022-02-15 21:16:30 +01:00
b-naber
c612ef8f48 treat mir::ConstantKind::Val correctly in check_static_ptr 2022-02-15 21:16:26 +01:00
b-naber
5e0fab6da5 use ConstantKind::Val in StaticRef 2022-02-15 21:10:42 +01:00
bors
bfb2856f27 Auto merge of #93820 - compiler-errors:gat-wfcheck, r=jackh726
Rework GAT `where` clause check

rework the GAT where check to use a fixed-point algorithm, and check all GATs in a trait at once

fixes #93278

r? `@jackh726`
cc `@nikomatsakis`
2022-02-15 19:03:38 +00:00
Tomasz Miąsko
ea71420761 Inline LocalExpnId::from_raw and LocalExpnId::as_raw 2022-02-15 19:08:12 +01:00
Tomasz Miąsko
81f12eb7ef Inline Target::deref 2022-02-15 19:08:12 +01:00