Commit Graph

160205 Commits

Author SHA1 Message Date
flip1995
fad9407c5a
Merge remote-tracking branch 'upstream/master' into rustup 2021-12-17 13:22:25 +01:00
Sébastien Marie
c3da28eade pass -Wl,-z,origin to set DF_ORIGIN when using rpath
DF_ORIGIN flag signifies that the object being loaded may make reference to the $ORIGIN substitution string.

Some implementations are just ignoring DF_ORIGIN and do substitution for $ORIGIN if present (whatever DF_ORIGIN pr

Set the flag inconditionally if rpath is wanted.
2021-12-17 11:27:14 +00:00
bors
2595d03827 Auto merge of #92023 - ehuss:update-cargo, r=ehuss
Update cargo

8 commits in a359ce16073401f28b84840da85b268aa3d37c88..fcef61230c3b6213b6b0d233a36ba4ebd1649ec3
2021-12-14 18:40:22 +0000 to 2021-12-17 02:30:38 +0000
- Minor docs change for `cargo test --help` (rust-lang/cargo#10210)
- Make clippy happy (rust-lang/cargo#10205)
- Enhance descriptions of issue templates (rust-lang/cargo#10202)
- Add workaround for sporadic kills when building on Macos (rust-lang/cargo#10196)
- Detect filesystem loop during walking the projects (rust-lang/cargo#10188)
- Error about not having any crates with documentation (rust-lang/cargo#10204)
- Don't document libs with doc=false (rust-lang/cargo#10201)
- Bumps up tar to 0.4.36 (rust-lang/cargo#10198)
2021-12-17 10:37:26 +00:00
bjorn3
b532f13ad0 Update cranelift patch section 2021-12-17 10:59:00 +01:00
Vadim Petrochenkov
23c172ff0f Merge commit '533f0fc81ab9ba097779fcd27c8f9ea12261fef5' into psimd 2021-12-17 15:10:53 +08:00
Dylan MacKenzie
2049287030 Disable test on bootstrap compiler 2021-12-16 22:11:17 -08:00
bors
16d8a91d51 Auto merge of #91812 - camelid:assoc-const-lazy, r=GuillaumeGomez
rustdoc: Pretty-print assoc const defaults on-demand

This should improve performance, clean up the code, and help pave the
way for #83035.
2021-12-17 06:03:38 +00:00
Dylan MacKenzie
1606335a93 Test const impl of cmp traits 2021-12-16 21:35:25 -08:00
Dylan MacKenzie
9c83b56056 Mark defaulted PartialEq/PartialOrd methods as const 2021-12-16 21:35:25 -08:00
Patrick Walton
c41fd760db rustc_codegen_llvm: Give each codegen unit a unique DWARF name on all
platforms, not just Apple ones.

To avoid breaking split DWARF, we need to ensure that each codegen unit has a
unique `DW_AT_name`. This is because there's a remote chance that different
codegen units for the same module will have entirely identical DWARF entries
for the purpose of the DWO ID, which would violate Appendix F ("Split Dwarf
Object Files") of the DWARF 5 specification. LLVM uses the algorithm specified
in section 7.32 "Type Signature Computation" to compute the DWO ID, which does
not include any fields that would distinguish compilation units. So we must
embed the codegen unit name into the `DW_AT_name`.

Closes #88521.
2021-12-16 20:40:04 -08:00
Eric Huss
8150a2f7b3 Update cargo 2021-12-16 20:35:44 -08:00
lzh
a995462f9a Eliminate duplicate codes of expected_found_bool 2021-12-17 11:17:43 +08:00
Folyd
5c77116230 Remove P: Unpin bound on impl Stream for Pin 2021-12-17 11:14:02 +08:00
Esteban Kuber
0b8bbac3ff Fix typo in "new region bound" suggestion
The lifetime name shoud always appear in text surrounded by `.
2021-12-17 02:33:25 +00:00
Lucas Kent
97bf7b934e Improve suggestion to change struct field to &mut 2021-12-17 13:20:40 +11:00
bors
9b45f04414 Auto merge of #91672 - b-naber:merge-normalize-erasing-regions-queries, r=jackh726
Implement normalize_erasing_regions queries in terms of 'try' version

Attempt to lessen performance regression caused by https://github.com/rust-lang/rust/pull/91255

r? `@jackh726`
2021-12-17 02:03:10 +00:00
Caleb Cartwright
78a8e0092f builtin_macros: allow external consumers for AsmArgs parsing 2021-12-16 18:40:38 -06:00
Aaron Hill
00ce6dc718
Only cache local adt_def results on disk
An `AdtDef` contains `Span`s, and we don't appear
to actually encode the `SourceFile` for foreign
spans in the incremental cache in some cases.
2021-12-16 18:32:00 -05:00
bors
23c2723269 Auto merge of #92003 - matthiaskrgr:rollup-obgv0rt, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 - #91172 (Warn when a `#[test]`-like built-in attribute macro is present multiple times.)
 - #91796 (Fix since attribute for const_manually_drop feature)
 - #91879 (Remove `in_band_lifetimes` from `rustc_borrowck`)
 - #91947 (Add `io::Error::other`)
 - #91967 (Pull in libdevstat on FreeBSD)
 - #91987 (Add module documentation for rustdoc passes)
 - #92001 (Fix default_method_body_is_const when used across crates)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-12-16 23:08:02 +00:00
Guillaume Gomez
080b926135 Make loop more clear by renaming variables 2021-12-16 23:17:03 +01:00
David CARLIER
78a3078c3f
Revert "socket ancillary data implementation for dragonflybsd." 2021-12-16 21:32:53 +00:00
bors
5531927e8a Auto merge of #91616 - saethlin:sort_unchecked-sb-fix, r=Mark-Simulacrum
Fix #91306 by deriving all access from a single *mut T

Fixes #91306.

The previous code is invalid because the first argument to `copy_nonoverlapping` is invalidated by the mutable borrow taken out to construct the second argument.

I believe this patch fixes that, and this code should now pass Miri with `-Ztag-raw-pointers`, ~~but I'm currently stuck trying to run my reproducer with a this patched version of the standard library (alternatively, running Miri on the standard library tests itself would suffice).~~ Ralf walked me through this on Zulip.

I've also added fixes for 7 more problems other than those I reported. Most of them are easy to hit by calling sort_unstable on random arrays. I don't have reproducers for every change, but they seem pretty clear-cut to me. But I did only start learning stacked borrows 2 days ago so that might be a large dash of Dunning-Kruger.
2021-12-16 19:56:45 +00:00
Guillaume Gomez
ba824ec52b Clean up search code and unify function returned values 2021-12-16 20:49:34 +01:00
LegionMammal978
4937a55dfb Remove in_band_lifetimes from rustc_codegen_llvm
See #91867 for more information.
2021-12-16 14:43:32 -05:00
LegionMammal978
fed881aafc Remove in_band_lifetimes from rustc_mir_dataflow
See #91867 for more information.
2021-12-16 14:29:43 -05:00
bjorn3
a1037fad7d Update Cranelift to 0.79.0 2021-12-16 18:57:25 +01:00
Chris Denton
de764a7ccb
Quote bat script command line 2021-12-16 17:22:32 +00:00
Matthias Krüger
a97384d94c
Rollup merge of #92001 - fee1-dead:dmbic-xcrate-fix, r=oli-obk
Fix default_method_body_is_const when used across crates

r? `@oli-obk`

unblocks #91439.
2021-12-16 17:23:13 +01:00
Matthias Krüger
176fb183fa
Rollup merge of #91987 - jsha:docdocgoose, r=jyn514
Add module documentation for rustdoc passes

These are currently documented at https://rustc-dev-guide.rust-lang.org/rustdoc-internals.html#hot-potato but can easily go out of date. We'd like to document them in place and link to https://doc.rust-lang.org/nightly/nightly-rustc/rustdoc/passes/index.html

[Discussed on Zulip](https://rust-lang.zulipchat.com/#narrow/stream/266220-rustdoc/topic/moving.20pass.20docs/near/265058351).

r? `@camelid`
2021-12-16 17:23:12 +01:00
Matthias Krüger
355ed988c4
Rollup merge of #91967 - lnicola:freebsd-devstat, r=kennytm
Pull in libdevstat on FreeBSD

Similar to https://github.com/rust-lang/rust/pull/90495, spotted in https://github.com/rust-lang/rust/pull/91909.
2021-12-16 17:23:11 +01:00
Matthias Krüger
b742594f4a
Rollup merge of #91947 - ibraheemdev:io-error-other, r=joshtriplett
Add `io::Error::other`

This PR adds a small utility constructor, `io::Error::other`, a shorthand for `io::Error::new(io::ErrorKind::Other, err)`, something I find myself writing often.

For some concrete stats, a quick search on [grep.app](https://grep.app) shows that more than half of the uses of `io::Error::new` use `ErrorKind::Other`:
```
Error::new\((?:std::)?(?:io::)?ErrorKind:: => 3,898 results
Error::new\((?:std::)?(?:io::)?ErrorKind::Other => 2,186 results
```
2021-12-16 17:23:10 +01:00
Matthias Krüger
7e5c0711e4
Rollup merge of #91879 - bugadani:in_band_borrowck, r=wesleywiser
Remove `in_band_lifetimes` from `rustc_borrowck`

See #91867 for more information.
2021-12-16 17:23:09 +01:00
Matthias Krüger
95d8aadcfc
Rollup merge of #91796 - not-my-profile:fix-const_manually_drop-since, r=kennytm
Fix since attribute for const_manually_drop feature

const_manually_drop was stabilized in 1.32 as mentioned in
https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1320-2019-01-17
2021-12-16 17:23:08 +01:00
Matthias Krüger
7407c4e37d
Rollup merge of #91172 - Ethiraric:ethiraric/fix90979, r=petrochenkov
Warn when a `#[test]`-like built-in attribute macro is present multiple times.

Fixes #90979.
2021-12-16 17:23:07 +01:00
Ben Kimock
3a0fa0375d Fix SB problems in slice sorting
Most of these problems originate in use of get_unchecked_mut.

When calling ptr::copy_nonoverlapping, using get_unchecked_mut for both
arguments causes the borrow created to make the second pointer to invalid the
first.

The pairs of identical MaybeUninit::slice_as_mut_ptr calls similarly
invalidate each other.

There was also a similar borrow invalidation problem with the use of
slice::get_unchecked_mut to derive the pointer for the CopyOnDrop.
2021-12-16 10:31:46 -05:00
bors
1d01550f7e Auto merge of #91833 - klensy:rd-minus-alloc, r=jyn514
rustdoc: don't clone already owned `Path` and modify it inplace
2021-12-16 15:18:08 +00:00
bjorn3
9e755f483a Update libc 2021-12-16 14:46:43 +01:00
Deadbeef
4bb65e1c79
Fix default_method_body_is_const when used across crates 2021-12-16 21:38:54 +08:00
bjorn3
97a92ea6b2 Rustc tests: ignore a couple more rustdoc tests 2021-12-16 14:36:02 +01:00
bjorn3
d0f97fc039 Rustup to rustc 1.59.0-nightly (c5ecc1570 2021-12-15) 2021-12-16 14:11:04 +01:00
bjorn3
d084fca557 Sync from rust a090c8659c 2021-12-16 13:52:12 +01:00
bjorn3
2cb4fe711e Fix unused crate warning 2021-12-16 13:51:18 +01:00
bors
f8402169aa Auto merge of #91996 - matthiaskrgr:rollup-8pdt8x7, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #91901 (Remove `in_band_lifetimes` from `rustc_symbol_mangling`)
 - #91904 (Remove `in_band_lifetimes` from `rustc_trait_selection`)
 - #91951 (update stdarch)
 - #91958 (Apply rust-logo class only on default logo)
 - #91972 (link to pref_align_of tracking issue)
 - #91986 (Bump compiler-builtins to 0.1.66)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
2021-12-16 11:35:37 +00:00
Matthias Krüger
7391962e31
Rollup merge of #91986 - ayrtonm:bump-builtins, r=Amanieu
Bump compiler-builtins to 0.1.66

Adds intrinsics for truncdfsf2 and truncdfsf2vsp on ARM.

r? `@Amanieu`
2021-12-16 10:12:47 +01:00
Matthias Krüger
311c2d9e70
Rollup merge of #91972 - RalfJung:pref-align-of, r=Mark-Simulacrum
link to pref_align_of tracking issue

If we are not going to remove this intrinsic (https://github.com/rust-lang/rust/pull/90877), I think we should at least have a place to centralize discussion around it, so here we go. Intrinsics don't have their own separate features and usually we instead use the public method for tracking it, but this one does not have such a method... so the tracking issue is just a regular link. (And then we sue it for the const part as well.)
2021-12-16 10:12:46 +01:00
Matthias Krüger
e1d1a28bb6
Rollup merge of #91958 - jsha:rust-logo, r=GuillaumeGomez
Apply rust-logo class only on default logo

Fixes #91653.

![image](https://user-images.githubusercontent.com/220205/146138145-a7a62ea6-3205-4bc7-8460-e985284d93ea.png)

Demo: https://rustdoc.crud.net/jsha/hashes/sha2/

r? ``@GuillaumeGomez``
2021-12-16 10:12:45 +01:00
Matthias Krüger
435837e9bb
Rollup merge of #91951 - SparrowLii:master, r=Amanieu
update stdarch

2 commits in d219ad63c5075098fc224a57deb4852b9734327d..0716b22e902207efabe46879cbf28d0189ab7924
2021-12-9 23:50:37 +0000 to 2021-12-14 16:17:57 +0100
 * Fix a bunch of typos ([Fix a bunch of typos stdarch#1267](https://github.com/rust-lang/stdarch/pull/1267))
 * Stabilize armv8 neon instruction set on aarch64 ([Stabilize armv8 neon instruction set on aarch64 stdarch#1266](https://github.com/rust-lang/stdarch/pull/1266))

The update stabilizes armv8 neon instructions on aarch64. #90972
2021-12-16 10:12:43 +01:00
Matthias Krüger
081493da7f
Rollup merge of #91904 - SylvanB:remove_in_band_lifetimes_rustc_trait_selection, r=petrochenkov
Remove `in_band_lifetimes` from `rustc_trait_selection`

Another one for #91867
2021-12-16 10:12:42 +01:00
Matthias Krüger
02a4e7cad8
Rollup merge of #91901 - SylvanB:remove_in_band_lifetimes_rustc_symbol_mangling, r=jackh726
Remove `in_band_lifetimes` from `rustc_symbol_mangling`

Helping out with  #91867
2021-12-16 10:12:42 +01:00
bors
a090c8659c Auto merge of #91527 - the8472:retain-opt, r=dtolnay
Optimize `vec::retain` performance

This simply moves the loops into the inner function which leads to better results.

```
old:

test vec::bench_retain_100000                            ... bench:     203,828 ns/iter (+/- 2,101)
test vec::bench_retain_iter_100000                       ... bench:      63,324 ns/iter (+/- 12,305)
test vec::bench_retain_whole_100000                      ... bench:      42,989 ns/iter (+/- 291)

new:

test vec::bench_retain_100000                            ... bench:      42,180 ns/iter (+/- 451)
test vec::bench_retain_iter_100000                       ... bench:      65,167 ns/iter (+/- 11,971)
test vec::bench_retain_whole_100000                      ... bench:      33,736 ns/iter (+/- 12,404)
```

Measured on x86_64-unknown-linux-gnu, Zen2

Fixes #91497
2021-12-16 07:58:36 +00:00