]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoPrepare for more ParamEnv flags
Oli Scherer [Thu, 21 Oct 2021 13:23:00 +0000 (13:23 +0000)]
Prepare for more ParamEnv flags

2 years agoAuto merge of #91043 - camsteffen:descendant-eq, r=petrochenkov
bors [Mon, 29 Nov 2021 07:46:36 +0000 (07:46 +0000)]
Auto merge of #91043 - camsteffen:descendant-eq, r=petrochenkov

Add fast path to `is_descendant_of`

2 years agoAuto merge of #91344 - RalfJung:miri, r=RalfJung
bors [Mon, 29 Nov 2021 04:40:31 +0000 (04:40 +0000)]
Auto merge of #91344 - RalfJung:miri, r=RalfJung

update Miri

Fixes https://github.com/rust-lang/rust/issues/91289

2 years agoupdate Miri
Ralf Jung [Mon, 29 Nov 2021 01:37:49 +0000 (20:37 -0500)]
update Miri

2 years agoAuto merge of #91338 - matthiaskrgr:rollup-46ry8wi, r=matthiaskrgr
bors [Mon, 29 Nov 2021 01:35:33 +0000 (01:35 +0000)]
Auto merge of #91338 - matthiaskrgr:rollup-46ry8wi, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #90131 (Fix a format_args span to be expansion)
 - #90832 (Add 1.57.0 release notes)
 - #90833 (Emit LLVM optimization remarks when enabled with `-Cremark`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #90833 - tmiasko:optimization-remarks, r=nikic
Matthias Krüger [Sun, 28 Nov 2021 22:45:17 +0000 (23:45 +0100)]
Rollup merge of #90833 - tmiasko:optimization-remarks, r=nikic

Emit LLVM optimization remarks when enabled with `-Cremark`

The default diagnostic handler considers all remarks to be disabled by
default unless configured otherwise through LLVM internal flags:
`-pass-remarks`, `-pass-remarks-missed`, and `-pass-remarks-analysis`.
This behaviour makes `-Cremark` ineffective on its own.

Fix this by configuring a custom diagnostic handler that enables
optimization remarks based on the value of `-Cremark` option. With
`-Cremark=all` enabling all remarks.

Fixes #90924.

r? `@nikic`

2 years agoRollup merge of #90832 - cuviper:relnotes-1.57.0, r=Mark-Simulacrum
Matthias Krüger [Sun, 28 Nov 2021 22:45:16 +0000 (23:45 +0100)]
Rollup merge of #90832 - cuviper:relnotes-1.57.0, r=Mark-Simulacrum

Add 1.57.0 release notes

2 years agoRollup merge of #90131 - camsteffen:fmt-args-span-fix, r=cjgillot
Matthias Krüger [Sun, 28 Nov 2021 22:45:15 +0000 (23:45 +0100)]
Rollup merge of #90131 - camsteffen:fmt-args-span-fix, r=cjgillot

Fix a format_args span to be expansion

I found this while exploring solutions for rust-lang/rust-clippy#7843.

r? `@m-ou-se`

2 years agoAdd parent crate assert to register_expn_id
Cameron Steffen [Sun, 28 Nov 2021 22:35:31 +0000 (16:35 -0600)]
Add parent crate assert to register_expn_id

2 years agoAdd fast path to is_descendant_of
Cameron Steffen [Fri, 19 Nov 2021 15:43:03 +0000 (09:43 -0600)]
Add fast path to is_descendant_of

2 years agoAuto merge of #90681 - workingjubilee:update-libc, r=JohnTitor
bors [Sun, 28 Nov 2021 22:29:57 +0000 (22:29 +0000)]
Auto merge of #90681 - workingjubilee:update-libc, r=JohnTitor

Update libc to 0.2.108

Changelog:
https://github.com/rust-lang/libc/releases/tag/0.2.107
https://github.com/rust-lang/libc/releases/tag/0.2.108
Primarily intended to pull in rust-lang/libc@fd331f65f214ea75b6210b415b5fd8650be15c73
This should help with https://github.com/rust-lang/rust/pull/90044

2 years agoAuto merge of #91320 - matthiaskrgr:rollup-r209seq, r=matthiaskrgr
bors [Sun, 28 Nov 2021 17:14:04 +0000 (17:14 +0000)]
Auto merge of #91320 - matthiaskrgr:rollup-r209seq, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #91251 (Perform Sync check on static items in wf-check instead of during const checks)
 - #91308 (Fix ICE when lowering `trait A where for<'a> Self: 'a`)
 - #91319 (Change output path to {{build-base}} for rustdoc scrape_examples ui test)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #91319 - fee1-dead:rustdoc-ice-fix, r=jyn514
Matthias Krüger [Sun, 28 Nov 2021 16:11:12 +0000 (17:11 +0100)]
Rollup merge of #91319 - fee1-dead:rustdoc-ice-fix, r=jyn514

Change output path to {{build-base}} for rustdoc scrape_examples ui test

See https://github.com/rust-lang/rust/pull/90611#issuecomment-981092909

r? `@jyn514`

cc `@petrochenkov`

2 years agoRollup merge of #91308 - BGR360:issue-88586, r=jackh726
Matthias Krüger [Sun, 28 Nov 2021 16:11:11 +0000 (17:11 +0100)]
Rollup merge of #91308 - BGR360:issue-88586, r=jackh726

Fix ICE when lowering `trait A where for<'a> Self: 'a`

Fixes #88586.

r? `@jackh726`

Jack, this fix is much smaller in scope than what I think you were proposing in the issue. Let me know if you had a vision for a larger refactor here.

cc `@JohnTitor`

2 years agoRollup merge of #91251 - oli-obk:wf_sync_statics, r=matthewjasper
Matthias Krüger [Sun, 28 Nov 2021 16:11:10 +0000 (17:11 +0100)]
Rollup merge of #91251 - oli-obk:wf_sync_statics, r=matthewjasper

Perform Sync check on static items in wf-check instead of during const checks

r? `@RalfJung`

This check is solely happening on the signature of the static item and not on its body, therefor it belongs into wf-checking instead of const checking.

2 years agoChange output path to {{build-base}}
Deadbeef [Sun, 28 Nov 2021 15:26:47 +0000 (23:26 +0800)]
Change output path to {{build-base}}

2 years agoAddress PR feedback
Ben Reeves [Sun, 28 Nov 2021 13:05:23 +0000 (07:05 -0600)]
Address PR feedback

2 years agoAuto merge of #91230 - eggyal:fallible-type-fold, r=jackh726
bors [Sun, 28 Nov 2021 13:04:27 +0000 (13:04 +0000)]
Auto merge of #91230 - eggyal:fallible-type-fold, r=jackh726

Make `TypeFolder::fold_*` return `Result`

Implements rust-lang/compiler-team#432.

Initially this is just a rebase of `@LeSeulArtichaut's` work in #85469 (abandoned; see https://github.com/rust-lang/rust/pull/85485#issuecomment-908781112).  At that time, it caused a regression in performance that required some further exploration... with this rebased PR bors can hopefully report some perf analysis from which we can investigate further (if the regression is indeed still present).

r? `@jackh726` cc `@nikomatsakis`

2 years agoAuto merge of #91311 - matthiaskrgr:rollup-ju9xizl, r=matthiaskrgr
bors [Sun, 28 Nov 2021 09:57:59 +0000 (09:57 +0000)]
Auto merge of #91311 - matthiaskrgr:rollup-ju9xizl, r=matthiaskrgr

Rollup of 3 pull requests

Successful merges:

 - #90896 (Stabilize some `MaybeUninit` behavior as const)
 - #91254 (Only check for errors in predicate when skipping impl assembly)
 - #91303 (Miri: fix alignment check in array initialization)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #91303 - RalfJung:array-init-align, r=oli-obk
Matthias Krüger [Sun, 28 Nov 2021 09:42:40 +0000 (10:42 +0100)]
Rollup merge of #91303 - RalfJung:array-init-align, r=oli-obk

Miri: fix alignment check in array initialization

https://github.com/rust-lang/rust/pull/85376 introduced a regression in Miri, reported at https://github.com/rust-lang/miri/issues/1919 and https://github.com/rust-lang/miri/issues/1925. This PR fixes that. I will add tests to Miri once this lands.

r? `@oli-obk`
Fixes https://github.com/rust-lang/miri/issues/1919
Fixes https://github.com/rust-lang/miri/issues/1925

2 years agoRollup merge of #91254 - Aaron1011:impl-candidate-err-ty, r=lcnr
Matthias Krüger [Sun, 28 Nov 2021 09:42:39 +0000 (10:42 +0100)]
Rollup merge of #91254 - Aaron1011:impl-candidate-err-ty, r=lcnr

Only check for errors in predicate when skipping impl assembly

Prior to PR #91205, checking for errors in the overall obligation
would check checking the `ParamEnv`, due to an incorrect
`super_visit_with` impl. With this bug fixed, we will now
bail out of impl candidate assembly if the `ParamEnv` contains
any error types.

In practice, this appears to be overly conservative - when an error
occurs early in compilation, we end up giving up early for some
predicates that we could have successfully evaluated without overflow.
By only checking for errors in the predicate itself, we avoid causing
additional spurious 'type annotations needed' errors after a 'real'
error has already occurred.

With this PR, the diagnostic changes caused by PR #91205 are reverted.

2 years agoRollup merge of #90896 - jhpratt:stabilize_const_maybe_uninit, r=oli-obk
Matthias Krüger [Sun, 28 Nov 2021 09:42:38 +0000 (10:42 +0100)]
Rollup merge of #90896 - jhpratt:stabilize_const_maybe_uninit, r=oli-obk

Stabilize some `MaybeUninit` behavior as const

This stabilizes the `MaybeUninit::as_ptr`, `MaybeUninit::assume_init`, and `MaybeUninit::assume_init_ref` as `const fn`. `MaybeUninit::as_mut_ptr` has been moved to a new flag: `const_maybe_uninit_as_mut_ptr`, which is blocked on #57349. `MaybeUninit::slice_assume_init_ref` can be `const fn` when the method is stabilized in general.

The relevant intrinsic has been stabilized as `const` as well, though this isn't user-visible. Due to the seemingly unrelated feature name I performed `rg const_assert_type` and found no other instances of it being used.

r? `@oli-obk`

`@rustbot` label: +A-const-fn +S-waiting-on-review +T-libs-api

2 years agoAdd test for const `MaybeUninit`
Jacob Pratt [Wed, 17 Nov 2021 00:58:52 +0000 (19:58 -0500)]
Add test for const `MaybeUninit`

2 years agoStabilize some `MaybeUninit` behavior as const
Jacob Pratt [Sun, 14 Nov 2021 05:36:19 +0000 (00:36 -0500)]
Stabilize some `MaybeUninit` behavior as const

2 years agotypeck: Ensure proper bound vars passed to `add_bounds`.
Ben Reeves [Sun, 28 Nov 2021 05:10:18 +0000 (23:10 -0600)]
typeck: Ensure proper bound vars passed to `add_bounds`.

Fixes the ICE in #88586.

2 years agoAuto merge of #91301 - scottmcm:stabilize-nonzero-ipot, r=nagisa
bors [Sun, 28 Nov 2021 05:55:09 +0000 (05:55 +0000)]
Auto merge of #91301 - scottmcm:stabilize-nonzero-ipot, r=nagisa

Stabilize nonzero_is_power_of_two

Closes #81106
FCP has finished in the tracking issue

2 years agoUpdate libc to 0.2.108
Jubilee Young [Mon, 8 Nov 2021 01:28:04 +0000 (17:28 -0800)]
Update libc to 0.2.108

Changelog:
https://github.com/rust-lang/libc/releases/tag/0.2.107
https://github.com/rust-lang/libc/releases/tag/0.2.108
Primarily intended to pull in fd331f65f214ea75b6210b415b5fd8650be15c73
This should help with https://github.com/rust-lang/rust/pull/90044

2 years agoMiri: fix alignment check in array initialization
Ralf Jung [Sat, 27 Nov 2021 23:17:09 +0000 (18:17 -0500)]
Miri: fix alignment check in array initialization

2 years agoAuto merge of #91241 - dtolnay:firstchunk, r=oli-obk
bors [Sat, 27 Nov 2021 22:53:21 +0000 (22:53 +0000)]
Auto merge of #91241 - dtolnay:firstchunk, r=oli-obk

Eliminate an unreachable codepath from String::from_utf8_lossy

`Utf8Lossy`'s `Iterator` implementation ensures that only the **final** chunk has an empty slice for `broken`:

https://github.com/rust-lang/rust/blob/dd549dcab404ec4c7d07b5a83aca5bdd7171138f/library/core/src/str/lossy.rs#L46-L47

Thus the only way the **first** chunk could have an empty `broken` is if it is the **final** chunk, i.e. there is only one chunk total. And the only way that there could be one chunk total with an empty `broken` is if the whole input is valid utf8 and non-empty.

That condition has already been handled by an early return, so at the point that the first `REPLACEMENT` is being pushed, it's impossible for `first_broken` to be empty.

2 years agoStabilize nonzero_is_power_of_two
Scott McMurray [Sat, 27 Nov 2021 21:13:04 +0000 (13:13 -0800)]
Stabilize nonzero_is_power_of_two

Fixes 81106
FCP has finished in the tracking issue

2 years agoOnly check for errors in predicate when skipping impl assembly
Aaron Hill [Fri, 26 Nov 2021 15:14:16 +0000 (09:14 -0600)]
Only check for errors in predicate when skipping impl assembly

Prior to PR #91205, checking for errors in the overall obligation
would check checking the `ParamEnv`, due to an incorrect
`super_visit_with` impl. With this bug fixed, we will now
bail out of impl candidate assembly if the `ParamEnv` contains
any error types.

In practice, this appears to be overly conservative - when an error
occurs early in compilation, we end up giving up early for some
predicates that we could have successfully evaluated without overflow.
By only checking for errors in the predicate itself, we avoid causing
additional spurious 'type annotations needed' errors after a 'real'
error has already occurred.

With this PR, the diagnostic changes caused by PR #91205 are reverted.

2 years agoUse intrinsic pointer methods
Alan Egerton [Sat, 27 Nov 2021 16:59:18 +0000 (16:59 +0000)]
Use intrinsic pointer methods

2 years agoDelegate from `map_id` to `try_map_id`
Alan Egerton [Sat, 27 Nov 2021 16:40:47 +0000 (16:40 +0000)]
Delegate from `map_id` to `try_map_id`

2 years agoAvoid UB when short-circuiting try_map_id for Vec
Alan Egerton [Sat, 27 Nov 2021 14:19:24 +0000 (14:19 +0000)]
Avoid UB when short-circuiting try_map_id for Vec

2 years agoAuto merge of #91288 - matthiaskrgr:rollup-yp5h41r, r=matthiaskrgr
bors [Sat, 27 Nov 2021 14:29:12 +0000 (14:29 +0000)]
Auto merge of #91288 - matthiaskrgr:rollup-yp5h41r, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #83791 (Weaken guarantee around advancing underlying iterators in zip)
 - #90995 (Document non-guarantees for Hash)
 - #91057 (Expand `available_parallelism` docs in anticipation of cgroup quota support)
 - #91062 (rustdoc: Consolidate static-file replacement mechanism)
 - #91208 (Account for incorrect `where T::Assoc = Ty` bound)
 - #91266 (Use non-generic inner function for pointer formatting)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRemove erroneous merge conflict
Alan Egerton [Sat, 27 Nov 2021 11:53:00 +0000 (11:53 +0000)]
Remove erroneous merge conflict

2 years agoAuto merge of #89916 - the8472:advance_by-avoid-err-0, r=dtolnay
bors [Sat, 27 Nov 2021 11:31:26 +0000 (11:31 +0000)]
Auto merge of #89916 - the8472:advance_by-avoid-err-0, r=dtolnay

Fix Iterator::advance_by contract inconsistency

The `advance_by(n)` docs state that in the error case `Err(k)` that k is always less than n.
It also states that `advance_by(0)` may return `Err(0)` to indicate an exhausted iterator.
These statements are inconsistent.
Since only one implementation (Skip) actually made use of that I changed it to return Ok(()) in that case too.

While adding some tests I also found a bug in `Take::advance_back_by`.

2 years agoRollup merge of #91266 - jam1garner:fmt-ptr-fix, r=dtolnay
Matthias Krüger [Sat, 27 Nov 2021 10:46:45 +0000 (11:46 +0100)]
Rollup merge of #91266 - jam1garner:fmt-ptr-fix, r=dtolnay

Use non-generic inner function for pointer formatting

Previously, despite the implementation being type-unaware, `fmt::Pointer`'s implementation for `*const T` in monomorphized. This affects:

* `fmt::Debug` for `*const T`
* `fmt::Debug` for `*mut T`
* `fmt::Pointer` for `*const T`
* `fmt::Pointer` for `*mut T`

And since the implementation is non-trivial, this results in a large amount of LLVM bitcode being generated. For example, with a large bindgen project with Debug implementations enabled, it will generate a lot of calls to `fmt::Debug for *const T`, which in turn will perform codegen for a copy of this function for every type.

For example, in a real-world bindgen'd header I've been testing with (4,189,245 lines of bindgen Rust with layout tests disabled) the difference between a slightly old nightly (`rustc 1.58.0-nightly (e249ce6b2 2021-10-30)`) and this PR:

<details>
<summary>Nightly (Click to Expand)</summary>

```
  Lines           Copies         Function name
  -----           ------         -------------
  7256000 (100%)  216544 (100%)  (TOTAL)
  1815449 (25.0%)  24206 (11.2%) <*const T as core::fmt::Pointer>::fmt
   300248 (4.1%)   29579 (13.7%) <&T as core::fmt::Debug>::fmt
   290328 (4.0%)   24194 (11.2%) <*mut T as core::fmt::Pointer>::fmt
   217746 (3.0%)   24194 (11.2%) <*mut T as core::fmt::Debug>::fmt
   123329 (1.7%)    1486 (0.7%)  core::fmt::builders::DebugList::entries
    72790 (1.0%)    1486 (0.7%)  core::slice::iter::Iter<T>::post_inc_start
    71313 (1.0%)    1486 (0.7%)  core::slice::iter::Iter<T>::new
    68329 (0.9%)    1486 (0.7%)  <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::next
    38636 (0.5%)    1486 (0.7%)  <[T] as core::fmt::Debug>::fmt
    26874 (0.4%)    1493 (0.7%)  core::array::<impl core::fmt::Debug for [T; N]>::fmt
    22290 (0.3%)    1486 (0.7%)  core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
    19407 (0.3%)    1493 (0.7%)  core::array::<impl core::ops::index::Index<I> for [T; N]>::index
    19318 (0.3%)    1486 (0.7%)  core::slice::<impl [T]>::iter
    17832 (0.2%)    1486 (0.7%)  core::ptr::const_ptr::<impl *const T>::offset
    17832 (0.2%)    1486 (0.7%)  core::ptr::mut_ptr::<impl *mut T>::offset
    16346 (0.2%)    1486 (0.7%)  <core::ops::range::RangeFull as core::slice::index::SliceIndex<[T]>>::index
    13374 (0.2%)    1486 (0.7%)  <I as core::iter::traits::collect::IntoIterator>::into_iter
    13374 (0.2%)    1486 (0.7%)  core::ptr::const_ptr::<impl *const T>::add
    13371 (0.2%)    1486 (0.7%)  core::ptr::const_ptr::<impl *const T>::is_null
    13371 (0.2%)    1486 (0.7%)  core::ptr::mut_ptr::<impl *mut T>::is_null
    11888 (0.2%)    1486 (0.7%)  core::slice::<impl [T]>::as_ptr
    11879 (0.2%)    1486 (0.7%)  core::ptr::non_null::NonNull<T>::new_unchecked
     7421 (0.1%)    1486 (0.7%)  core::ptr::non_null::NonNull<T>::as_ptr

```

</details>

<details>
<summary>This PR (Click to Expand)</summary>

```
   Lines           Copies         Function name
  -----           ------         -------------
  5684504 (100%)  216542 (100%)  (TOTAL)
   300248 (5.3%)   29579 (13.7%) <&T as core::fmt::Debug>::fmt
   290328 (5.1%)   24194 (11.2%) <*mut T as core::fmt::Pointer>::fmt
   266265 (4.7%)   24206 (11.2%) <*const T as core::fmt::Pointer>::fmt
   217746 (3.8%)   24194 (11.2%) <*mut T as core::fmt::Debug>::fmt
   101039 (1.8%)    1486 (0.7%)  core::fmt::builders::DebugList::entries
    72790 (1.3%)    1486 (0.7%)  core::slice::iter::Iter<T>::post_inc_start
    71313 (1.3%)    1486 (0.7%)  core::slice::iter::Iter<T>::new
    68329 (1.2%)    1486 (0.7%)  <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::next
    38636 (0.7%)    1486 (0.7%)  <[T] as core::fmt::Debug>::fmt
    26874 (0.5%)    1493 (0.7%)  core::array::<impl core::fmt::Debug for [T; N]>::fmt
    22290 (0.4%)    1486 (0.7%)  core::slice::index::<impl core::ops::index::Index<I> for [T]>::index
    19407 (0.3%)    1493 (0.7%)  core::array::<impl core::ops::index::Index<I> for [T; N]>::index
    19318 (0.3%)    1486 (0.7%)  core::slice::<impl [T]>::iter
    17832 (0.3%)    1486 (0.7%)  core::ptr::const_ptr::<impl *const T>::offset
    17832 (0.3%)    1486 (0.7%)  core::ptr::mut_ptr::<impl *mut T>::offset
    16346 (0.3%)    1486 (0.7%)  <core::ops::range::RangeFull as core::slice::index::SliceIndex<[T]>>::index
    13374 (0.2%)    1486 (0.7%)  <I as core::iter::traits::collect::IntoIterator>::into_iter
    13374 (0.2%)    1486 (0.7%)  core::ptr::const_ptr::<impl *const T>::add
    13371 (0.2%)    1486 (0.7%)  core::ptr::const_ptr::<impl *const T>::is_null
    13371 (0.2%)    1486 (0.7%)  core::ptr::mut_ptr::<impl *mut T>::is_null
    11888 (0.2%)    1486 (0.7%)  core::slice::<impl [T]>::as_ptr
    11879 (0.2%)    1486 (0.7%)  core::ptr::non_null::NonNull<T>::new_unchecked
     7421 (0.1%)    1486 (0.7%)  core::ptr::non_null::NonNull<T>::as_ptr

```

</details>

Output generated using `cargo llvm-lines` version 0.4.12.

Summary of differences:

| rustc Version | Total LLVM line count | `*const T as fmt::Pointer` LLVM lines | Compilation Time |
|-|-|-|-|
| `nightly` | 7256000 | 1815449 (25.0% of binary) | 537.014 |
| PR | 5684504 (-21.65%) | 266265 (4.7% of binary) (-85.3% from nightly) | 502.990 |

This results in a pretty noticeable as the majority of rustc's time is spent in either codegen or LLVM, in this case, and is significantly improved by disabling derives for `fmt::Debug`, as it prevents generating all this LLVM IR to be handled.

Here's a run time comparison with nightly on the same codebase (commit 454cc5fb built from source vs 37c8f25 from my PR built from source):

<details>
<summary>nightly (Click to Expand)</summary>

```
time:   2.370; rss:   56MB -> 1118MB (+1062MB) parse_crate
time:   0.000; rss: 1118MB -> 1118MB (   +0MB) attributes_injection
time:   0.000; rss: 1118MB -> 1118MB (   +0MB) incr_comp_prepare_session_directory
time:   0.000; rss: 1118MB -> 1118MB (   +0MB) incr_comp_garbage_collect_session_directories
time:   0.000; rss: 1120MB -> 1120MB (   +0MB) plugin_loading
time:   0.000; rss: 1120MB -> 1120MB (   +0MB) plugin_registration
time:   0.000; rss: 1120MB -> 1120MB (   +0MB) crate_injection
time:  13.897; rss: 1120MB -> 3147MB (+2027MB) expand_crate
time:   0.002; rss: 3147MB -> 3147MB (   +0MB) check_unused_macros
time:  13.900; rss: 1120MB -> 3147MB (+2027MB) macro_expand_crate
time:   0.002; rss: 3147MB -> 3147MB (   +0MB) maybe_building_test_harness
time:   0.503; rss: 3147MB -> 3147MB (   +0MB) AST_validation
time:   0.000; rss: 3147MB -> 3147MB (   +0MB) maybe_create_a_macro_crate
time:   0.002; rss: 3147MB -> 3147MB (   +0MB) finalize_imports
time:   0.502; rss: 3147MB -> 3153MB (   +6MB) finalize_macro_resolutions
time:   4.478; rss: 3153MB -> 3574MB ( +420MB) late_resolve_crate
time:   0.000; rss: 3574MB -> 3574MB (   +0MB) resolve_main
time:   0.332; rss: 3574MB -> 3574MB (   +0MB) resolve_check_unused
time:   0.000; rss: 3574MB -> 3574MB (   +0MB) resolve_report_errors
time:   0.279; rss: 3574MB -> 3574MB (   +0MB) resolve_postprocess
time:   5.595; rss: 3147MB -> 3574MB ( +427MB) resolve_crate
time:   0.382; rss: 3574MB -> 3574MB (   +0MB) complete_gated_feature_checking
time:  20.526; rss: 1120MB -> 3574MB (+2454MB) configure_and_expand
time:   0.000; rss: 3574MB -> 3574MB (   +0MB) prepare_outputs
time:   0.000; rss: 3574MB -> 3574MB (   +0MB) blocked_on_dep_graph_loading
time:  65.992; rss: 3574MB -> 6317MB (+2743MB) hir_lowering
time:   1.117; rss: 6317MB -> 6323MB (   +6MB) early_lint_checks
time:   1.447; rss: 6323MB -> 6271MB (  -52MB) drop_ast
time:   0.002; rss: 5838MB -> 5838MB (   +0MB) setup_global_ctxt
time:   0.000; rss: 5843MB -> 5843MB (   +0MB) looking_for_entry_point
time:   0.313; rss: 5843MB -> 5844MB (   +1MB) looking_for_derive_registrar
time:   9.652; rss: 5843MB -> 6065MB ( +222MB) misc_checking_1
time:   9.713; rss: 6065MB -> 6769MB ( +704MB) type_collecting
time:   0.665; rss: 6769MB -> 6769MB (   +0MB) impl_wf_inference
time:   0.064; rss: 6769MB -> 6769MB (   +0MB) unsafety_checking
time:   3.095; rss: 6769MB -> 6792MB (  +23MB) coherence_checking
time:  21.282; rss: 6792MB -> 7546MB ( +754MB) wf_checking
time:   5.404; rss: 7546MB -> 7681MB ( +135MB) item_types_checking
time:  79.665; rss: 7681MB -> 8075MB ( +394MB) item_bodies_checking
time: 120.166; rss: 6065MB -> 8081MB (+2016MB) type_check_crate
time:   2.038; rss: 8081MB -> 8085MB (   +4MB) match_checking
time:   1.300; rss: 8085MB -> 8113MB (  +28MB) liveness_and_intrinsic_checking
time:   3.338; rss: 8081MB -> 8113MB (  +32MB) misc_checking_2
time:  68.612; rss: 8113MB -> 9285MB (+1172MB) MIR_borrow_checking
time:   0.622; rss: 9285MB -> 9301MB (  +17MB) MIR_effect_checking
time:   0.000; rss: 9301MB -> 9301MB (   +0MB) layout_testing
time:   4.331; rss: 9383MB -> 9510MB ( +127MB) death_checking
time:   0.032; rss: 9510MB -> 9510MB (   +0MB) unused_lib_feature_checking
time:   4.444; rss: 9510MB -> 9568MB (  +58MB) crate_lints
time:  59.563; rss: 9568MB -> 9576MB (   +8MB) module_lints
time:  64.006; rss: 9510MB -> 9576MB (  +66MB) lint_checking
time:   4.127; rss: 9576MB -> 9639MB (  +62MB) privacy_checking_modules
time:  77.984; rss: 9301MB -> 9639MB ( +337MB) misc_checking_3
time:   0.311; rss: 10357MB -> 10357MB (   +0MB) monomorphization_collector_root_collections
time:  14.051; rss: 10357MB -> 10573MB ( +217MB) monomorphization_collector_graph_walk
time:   1.759; rss: 10573MB -> 10652MB (  +79MB) partition_and_assert_distinct_symbols
time:  28.518; rss: 9639MB -> 10711MB (+1072MB) generate_crate_metadata
time:   0.000; rss: 10711MB -> 10711MB (   +0MB) find_cgu_reuse
time:  63.408; rss: 10711MB -> 12272MB (+1560MB) codegen_to_LLVM_IR
time:  64.916; rss: 10711MB -> 12267MB (+1556MB) codegen_crate
time:   0.000; rss: 12261MB -> 12261MB (   +0MB) assert_dep_graph
time:   0.000; rss: 12261MB -> 12261MB (   +0MB) check_dirty_clean
time:   0.664; rss: 12230MB -> 12210MB (  -20MB) encode_query_results_for(rustc_query_impl::queries::type_of)
time:   2.111; rss: 12210MB -> 12043MB ( -167MB) encode_query_results_for(rustc_query_impl::queries::generics_of)
time:   0.108; rss: 12043MB -> 12057MB (  +14MB) encode_query_results_for(rustc_query_impl::queries::predicates_of)
time:   0.004; rss: 12057MB -> 12059MB (   +2MB) encode_query_results_for(rustc_query_impl::queries::mir_const_qualif)
time:   0.665; rss: 12059MB -> 12121MB (  +62MB) encode_query_results_for(rustc_query_impl::queries::mir_for_ctfe)
time:  16.149; rss: 12121MB -> 12148MB (  +28MB) encode_query_results_for(rustc_query_impl::queries::optimized_mir)
time:   0.000; rss: 12148MB -> 12148MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::covered_file_name)
time:   0.000; rss: 12148MB -> 12148MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::covered_code_regions)
time:   0.010; rss: 12148MB -> 12150MB (   +2MB) encode_query_results_for(rustc_query_impl::queries::promoted_mir)
time:   0.052; rss: 12150MB -> 12155MB (   +4MB) encode_query_results_for(rustc_query_impl::queries::unsafety_check_result)
time:   0.003; rss: 12155MB -> 12156MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::thir_check_unsafety)
time:  11.428; rss: 12156MB -> 11748MB ( -408MB) encode_query_results_for(rustc_query_impl::queries::typeck)
time:   0.000; rss: 11748MB -> 11748MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::diagnostic_only_typeck)
time:   0.094; rss: 11748MB -> 11756MB (   +8MB) encode_query_results_for(rustc_query_impl::queries::used_trait_imports)
time:   0.272; rss: 11756MB -> 11778MB (  +22MB) encode_query_results_for(rustc_query_impl::queries::mir_borrowck)
time:   0.054; rss: 11778MB -> 11778MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::eval_to_allocation_raw)
time:   0.005; rss: 11778MB -> 11779MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::eval_to_const_value_raw)
time:   0.021; rss: 11779MB -> 11784MB (   +5MB) encode_query_results_for(rustc_query_impl::queries::check_match)
time:   0.041; rss: 11784MB -> 11786MB (   +2MB) encode_query_results_for(rustc_query_impl::queries::symbol_name)
time:   0.743; rss: 11786MB -> 11815MB (  +29MB) encode_query_results_for(rustc_query_impl::queries::codegen_fn_attrs)
time:   0.043; rss: 11815MB -> 11816MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::codegen_fulfill_obligation)
time:   0.674; rss: 11816MB -> 11840MB (  +25MB) encode_query_results_for(rustc_query_impl::queries::specialization_graph_of)
time:   0.000; rss: 11840MB -> 11840MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::adt_drop_tys)
time:   0.000; rss: 11840MB -> 11840MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::adt_significant_drop_tys)
time:   0.005; rss: 11840MB -> 11841MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::unused_generic_params)
time:  33.153; rss: 12232MB -> 11841MB ( -390MB) encode_query_results
time:  88.943; rss: 11955MB -> 11783MB ( -173MB) LLVM_passes(crate)
time:  38.854; rss: 12259MB -> 10095MB (-2164MB) incr_comp_serialize_result_cache
time:  39.030; rss: 12261MB -> 10095MB (-2166MB) incr_comp_persist_result_cache
time:   0.000; rss: 10095MB -> 10095MB (   +0MB) incr_comp_persist_dep_graph
time:  39.064; rss: 12257MB -> 10095MB (-2162MB) serialize_dep_graph
time:  19.047; rss: 10095MB -> 10307MB ( +212MB) free_global_ctxt
time:   0.000; rss: 10307MB -> 10307MB (   +0MB) join_worker_thread
time:   0.519; rss: 10307MB -> 10307MB (   +0MB) copy_all_cgu_workproducts_to_incr_comp_cache_dir
time:   0.522; rss: 10307MB -> 10307MB (   +0MB) finish_ongoing_codegen
time:   0.000; rss: 10307MB -> 10307MB (   +0MB) llvm_dump_timing_file
time:   0.002; rss: 10307MB -> 10307MB (   +0MB) serialize_work_products
time:   0.001; rss: 9542MB -> 9542MB (   +0MB) incr_comp_finalize_session_directory
time:   0.000; rss: 9542MB -> 9542MB (   +0MB) link_binary_check_files_are_writeable
time:   7.835; rss: 9542MB -> 9544MB (   +2MB) link_rlib
time:   0.000; rss: 9544MB -> 9544MB (   +0MB) link_binary_remove_temps
time:   7.872; rss: 9542MB -> 9544MB (   +2MB) link_binary
time:   7.944; rss: 9542MB -> 9201MB ( -341MB) link_crate
time:   8.495; rss: 10307MB -> 9201MB (-1106MB) link
time: 537.014; rss:   33MB -> 3715MB (+3682MB) total
```

</details>

<details>
<summary>This PR (Click to Expand)</summary>

```
time:   2.379; rss:   51MB -> 1116MB (+1064MB) parse_crate
time:   0.003; rss: 1116MB -> 1116MB (   +0MB) attributes_injection
time:   0.002; rss: 1116MB -> 1116MB (   +0MB) incr_comp_prepare_session_directory
time:   0.000; rss: 1116MB -> 1116MB (   +0MB) incr_comp_garbage_collect_session_directories
time:   0.000; rss: 1116MB -> 1116MB (   +0MB) plugin_loading
time:   0.000; rss: 1116MB -> 1116MB (   +0MB) plugin_registration
time:   0.003; rss: 1118MB -> 1118MB (   +0MB) crate_injection
time:  13.376; rss: 1118MB -> 3143MB (+2025MB) expand_crate
time:   0.002; rss: 3143MB -> 3143MB (   +0MB) check_unused_macros
time:  13.379; rss: 1118MB -> 3143MB (+2025MB) macro_expand_crate
time:   0.002; rss: 3143MB -> 3143MB (   +0MB) maybe_building_test_harness
time:   0.479; rss: 3143MB -> 3143MB (   +0MB) AST_validation
time:   0.002; rss: 3143MB -> 3143MB (   +0MB) maybe_create_a_macro_crate
time:   0.005; rss: 3143MB -> 3143MB (   +0MB) finalize_imports
time:   0.520; rss: 3143MB -> 3125MB (  -18MB) finalize_macro_resolutions
time:   4.446; rss: 3125MB -> 3577MB ( +453MB) late_resolve_crate
time:   0.000; rss: 3577MB -> 3577MB (   +0MB) resolve_main
time:   0.336; rss: 3577MB -> 3577MB (   +0MB) resolve_check_unused
time:   0.000; rss: 3577MB -> 3577MB (   +0MB) resolve_report_errors
time:   0.295; rss: 3577MB -> 3578MB (   +0MB) resolve_postprocess
time:   5.602; rss: 3143MB -> 3578MB ( +435MB) resolve_crate
time:   0.388; rss: 3578MB -> 3578MB (   +0MB) complete_gated_feature_checking
time:  20.014; rss: 1116MB -> 3578MB (+2462MB) configure_and_expand
time:   0.000; rss: 3578MB -> 3578MB (   +0MB) prepare_outputs
time:   0.000; rss: 3578MB -> 3578MB (   +0MB) blocked_on_dep_graph_loading
time:  64.219; rss: 3578MB -> 6313MB (+2736MB) hir_lowering
time:   1.102; rss: 6313MB -> 6319MB (   +6MB) early_lint_checks
time:   1.426; rss: 6319MB -> 6268MB (  -52MB) drop_ast
time:   0.005; rss: 5834MB -> 5836MB (   +2MB) setup_global_ctxt
time:   0.000; rss: 5838MB -> 5838MB (   +0MB) looking_for_entry_point
time:   0.292; rss: 5838MB -> 5840MB (   +1MB) looking_for_derive_registrar
time:   9.553; rss: 5838MB -> 6060MB ( +222MB) misc_checking_1
time:   9.949; rss: 6060MB -> 6764MB ( +704MB) type_collecting
time:   0.630; rss: 6764MB -> 6764MB (   +0MB) impl_wf_inference
time:   0.060; rss: 6764MB -> 6764MB (   +0MB) unsafety_checking
time:   3.054; rss: 6764MB -> 6787MB (  +23MB) coherence_checking
time:  20.702; rss: 6787MB -> 7533MB ( +746MB) wf_checking
time:   5.194; rss: 7533MB -> 7668MB ( +135MB) item_types_checking
time:  74.677; rss: 7668MB -> 8062MB ( +394MB) item_bodies_checking
time: 114.497; rss: 6060MB -> 8068MB (+2008MB) type_check_crate
time:   1.891; rss: 8068MB -> 8072MB (   +4MB) match_checking
time:   1.292; rss: 8072MB -> 8100MB (  +28MB) liveness_and_intrinsic_checking
time:   3.183; rss: 8068MB -> 8100MB (  +32MB) misc_checking_2
time:  68.845; rss: 8100MB -> 9279MB (+1179MB) MIR_borrow_checking
time:   0.587; rss: 9279MB -> 9295MB (  +17MB) MIR_effect_checking
time:   0.000; rss: 9295MB -> 9295MB (   +0MB) layout_testing
time:   4.443; rss: 9377MB -> 9504MB ( +127MB) death_checking
time:   0.034; rss: 9504MB -> 9504MB (   +0MB) unused_lib_feature_checking
time:   4.409; rss: 9504MB -> 9562MB (  +58MB) crate_lints
time:  56.490; rss: 9562MB -> 9571MB (   +8MB) module_lints
time:  60.900; rss: 9504MB -> 9571MB (  +66MB) lint_checking
time:   4.147; rss: 9571MB -> 9633MB (  +62MB) privacy_checking_modules
time:  75.094; rss: 9295MB -> 9633MB ( +337MB) misc_checking_3
time:   0.315; rss: 10357MB -> 10357MB (   +0MB) monomorphization_collector_root_collections
time:  14.501; rss: 10357MB -> 10571MB ( +215MB) monomorphization_collector_graph_walk
time:   1.763; rss: 10571MB -> 10661MB (  +89MB) partition_and_assert_distinct_symbols
time:  29.035; rss: 9633MB -> 10706MB (+1073MB) generate_crate_metadata
time:   0.000; rss: 10706MB -> 10706MB (   +0MB) find_cgu_reuse
time:  30.913; rss: 10706MB -> 12150MB (+1444MB) codegen_to_LLVM_IR
time:  31.108; rss: 10706MB -> 12150MB (+1444MB) codegen_crate
time:   0.000; rss: 12150MB -> 12150MB (   +0MB) assert_dep_graph
time:   0.000; rss: 12150MB -> 12150MB (   +0MB) check_dirty_clean
time:   0.416; rss: 12152MB -> 12199MB (  +46MB) encode_query_results_for(rustc_query_impl::queries::type_of)
time:   1.259; rss: 12199MB -> 12211MB (  +12MB) encode_query_results_for(rustc_query_impl::queries::generics_of)
time:   0.095; rss: 12211MB -> 12193MB (  -18MB) encode_query_results_for(rustc_query_impl::queries::predicates_of)
time:   0.005; rss: 12193MB -> 12195MB (   +2MB) encode_query_results_for(rustc_query_impl::queries::mir_const_qualif)
time:   0.828; rss: 12195MB -> 12208MB (  +14MB) encode_query_results_for(rustc_query_impl::queries::mir_for_ctfe)
time:  17.880; rss: 12208MB -> 11987MB ( -222MB) encode_query_results_for(rustc_query_impl::queries::optimized_mir)
time:   0.000; rss: 11987MB -> 11987MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::covered_file_name)
time:   0.000; rss: 11987MB -> 11987MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::covered_code_regions)
time:   0.007; rss: 11987MB -> 11988MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::promoted_mir)
time:   0.049; rss: 11988MB -> 11992MB (   +4MB) encode_query_results_for(rustc_query_impl::queries::unsafety_check_result)
time:   0.002; rss: 11992MB -> 11994MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::thir_check_unsafety)
time:  38.049; rss: 11994MB -> 12093MB (  +99MB) encode_query_results_for(rustc_query_impl::queries::typeck)
time:   0.000; rss: 12093MB -> 12093MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::diagnostic_only_typeck)
time:   0.024; rss: 12093MB -> 12095MB (   +2MB) encode_query_results_for(rustc_query_impl::queries::used_trait_imports)
time:   0.372; rss: 12095MB -> 12053MB (  -42MB) encode_query_results_for(rustc_query_impl::queries::mir_borrowck)
time:   0.015; rss: 12053MB -> 12053MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::eval_to_allocation_raw)
time:   0.005; rss: 12053MB -> 12054MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::eval_to_const_value_raw)
time:   0.003; rss: 12054MB -> 12056MB (   +2MB) encode_query_results_for(rustc_query_impl::queries::check_match)
time:   0.037; rss: 12056MB -> 11899MB ( -157MB) encode_query_results_for(rustc_query_impl::queries::symbol_name)
time:   0.667; rss: 11899MB -> 11708MB ( -191MB) encode_query_results_for(rustc_query_impl::queries::codegen_fn_attrs)
time:   0.045; rss: 11708MB -> 11709MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::codegen_fulfill_obligation)
time:   0.295; rss: 11709MB -> 11734MB (  +25MB) encode_query_results_for(rustc_query_impl::queries::specialization_graph_of)
time:   0.000; rss: 11734MB -> 11734MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::adt_drop_tys)
time:   0.000; rss: 11734MB -> 11734MB (   +0MB) encode_query_results_for(rustc_query_impl::queries::adt_significant_drop_tys)
time:   0.005; rss: 11734MB -> 11734MB (   +1MB) encode_query_results_for(rustc_query_impl::queries::unused_generic_params)
time:  60.063; rss: 12152MB -> 11734MB ( -418MB) encode_query_results
time:  76.745; rss: 12007MB -> 11699MB ( -308MB) LLVM_passes(crate)
time:  61.634; rss: 12150MB -> 10557MB (-1593MB) incr_comp_serialize_result_cache
time:  61.637; rss: 12150MB -> 10557MB (-1593MB) incr_comp_persist_result_cache
time:   0.001; rss: 10557MB -> 10557MB (   +0MB) incr_comp_persist_dep_graph
time:  61.641; rss: 12150MB -> 10557MB (-1593MB) serialize_dep_graph
time:  15.601; rss: 10557MB -> 10242MB ( -315MB) free_global_ctxt
time:   0.000; rss: 10242MB -> 10242MB (   +0MB) join_worker_thread
time:   0.368; rss: 10242MB -> 10242MB (   +0MB) copy_all_cgu_workproducts_to_incr_comp_cache_dir
time:   0.375; rss: 10242MB -> 10242MB (   +0MB) finish_ongoing_codegen
time:   0.000; rss: 10242MB -> 10242MB (   +0MB) llvm_dump_timing_file
time:   0.002; rss: 10242MB -> 10242MB (   +0MB) serialize_work_products
time:   0.001; rss: 9668MB -> 9668MB (   +0MB) incr_comp_finalize_session_directory
time:   0.000; rss: 9668MB -> 9668MB (   +0MB) link_binary_check_files_are_writeable
time:   1.469; rss: 9668MB -> 9671MB (   +3MB) link_rlib
time:   0.000; rss: 9671MB -> 9671MB (   +0MB) link_binary_remove_temps
time:   1.506; rss: 9668MB -> 9671MB (   +3MB) link_binary
time:   1.622; rss: 9668MB -> 9329MB ( -339MB) link_crate
time:   2.037; rss: 10242MB -> 9329MB ( -913MB) link
time: 502.990; rss:   32MB -> 5888MB (+5855MB) total
```

</details>

(6.34% decrease in runtime, results are consistent across multiple runs)

2 years agoRollup merge of #91208 - estebank:eq-constraint, r=cjgillot
Matthias Krüger [Sat, 27 Nov 2021 10:46:44 +0000 (11:46 +0100)]
Rollup merge of #91208 - estebank:eq-constraint, r=cjgillot

Account for incorrect `where T::Assoc = Ty` bound

Provide suggestoin to constrain trait bound for associated type.
Revert incorrect changes to `missing-bounds` test.

Address part of #20041.

2 years agoRollup merge of #91062 - jsha:static-file-replace, r=jyn514,GuillaumeGomez
Matthias Krüger [Sat, 27 Nov 2021 10:46:43 +0000 (11:46 +0100)]
Rollup merge of #91062 - jsha:static-file-replace, r=jyn514,GuillaumeGomez

rustdoc: Consolidate static-file replacement mechanism

There were a few places in rustdoc where we would take static JS or CSS and rewrite it at doc generation time to insert values. This consolidates all the CSS instances into one CSS file and replaces the JS examples with data- attributes on the rustdoc-vars div.

Demo https://rustdoc.crud.net/jsha/static-file-replace/test_docs/

r? ``@GuillaumeGomez``

2 years agoRollup merge of #91057 - the8472:clarify-parallelism-steady-state, r=dtolnay
Matthias Krüger [Sat, 27 Nov 2021 10:46:42 +0000 (11:46 +0100)]
Rollup merge of #91057 - the8472:clarify-parallelism-steady-state, r=dtolnay

Expand `available_parallelism` docs in anticipation of cgroup quota support

The "fixed" in "fixed steady state limits" means to exclude load-dependent resource prioritization
that would calculate to 100% of capacity on an idle system and less capacity on a loaded system.

Additionally I also exclude "system load" since it would be silly to try to identify
other, perhaps higher priority, processes hogging some CPU cores that aren't explicitly excluded
by masks/quotas/whatever.

2 years agoRollup merge of #90995 - the8472:hash-portability, r=dtolnay
Matthias Krüger [Sat, 27 Nov 2021 10:46:42 +0000 (11:46 +0100)]
Rollup merge of #90995 - the8472:hash-portability, r=dtolnay

Document non-guarantees for Hash

Dependence on endianness and type sizes was reported for enum discriminants in #74215 but it is a more general
issue since for example the default implementation of `Hasher::write_usize` uses native endianness.
Additionally the implementations of library types are occasionally changed as their internal fields
change or hashing gets optimized.

## Question

Should this go on the module level documentation instead since it also concerns `Hasher` to some extent and not just `Hash`?

resolves #74215

2 years agoRollup merge of #83791 - the8472:relax-zip-side-effect-guarantee, r=dtolnay
Matthias Krüger [Sat, 27 Nov 2021 10:46:40 +0000 (11:46 +0100)]
Rollup merge of #83791 - the8472:relax-zip-side-effect-guarantee, r=dtolnay

Weaken guarantee around advancing underlying iterators in zip

The current guarantee (introduced in #52279) is too strong as it prevents adapters from exploiting knowledge about the iterator length and using counted loops for example because they would stop calling `next()` before it ever returned `None`. Additionally several nested zip iterators already fail to uphold this.

This does not yet remove any of the specialization code that tries (and sometimes fails) to uphold the guarantee for `next()`
because removing it would also affect `next_back()` in more surprising ways.

The intent is to be able to remove for example this branch

https://github.com/rust-lang/rust/blob/36bcf4069717b9dff90270d13b53a3b130329960/library/core/src/iter/adapters/zip.rs#L234-L243

or this test

https://github.com/rust-lang/rust/blob/36bcf4069717b9dff90270d13b53a3b130329960/library/core/tests/iter/adapters/zip.rs#L177-L188

Solves #82303 by declaring it a non-issue.

2 years agoAuto merge of #90846 - cuviper:weak, r=dtolnay
bors [Sat, 27 Nov 2021 07:58:00 +0000 (07:58 +0000)]
Auto merge of #90846 - cuviper:weak, r=dtolnay

Refactor weak symbols in std::sys::unix

This makes a few changes to the weak symbol macros in `sys::unix`:

- `dlsym!` is added to keep the functionality for runtime `dlsym`
  lookups, like for `__pthread_get_minstack@GLIBC_PRIVATE` that we don't
  want to show up in ELF symbol tables.
- `weak!` now uses `#[linkage = "extern_weak"]` symbols, so its runtime
  behavior is just a simple null check. This is also used by `syscall!`.
  - On non-ELF targets (macos/ios) where that linkage is not known to
    behave, `weak!` is just an alias to `dlsym!` for the old behavior.
- `raw_syscall!` is added to always call `libc::syscall` on linux and
  android, for cases like `clone3` that have no known libc wrapper.

The new `weak!` linkage does mean that you'll get versioned symbols if
you build with a newer glibc, like `WEAK DEFAULT UND statx@GLIBC_2.28`.
This might seem problematic, but old non-weak symbols can tie the build
to new versions too, like `dlsym@GLIBC_2.34` from their recent library
unification. If you build with an old glibc like `dist-x86_64-linux`
does, you'll still get unversioned `WEAK DEFAULT UND statx`, which may
be resolved based on the runtime glibc.

I also found a few functions that don't need to be weak anymore:

- Android can directly use `ftruncate64`, `pread64`, and `pwrite64`, as
  these were added in API 12, and our baseline is API 14.
- Linux can directly use `splice`, added way back in glibc 2.5 and
  similarly old musl. Android only added it in API 21 though.

2 years agoAuto merge of #91261 - Mark-Simulacrum:next-rel, r=Mark-Simulacrum
bors [Sat, 27 Nov 2021 03:45:36 +0000 (03:45 +0000)]
Auto merge of #91261 - Mark-Simulacrum:next-rel, r=Mark-Simulacrum

Bump to 1.59

r? `@Mark-Simulacrum`

2 years agoAuto merge of #91269 - matthiaskrgr:rollup-jh8i8eh, r=matthiaskrgr
bors [Sat, 27 Nov 2021 00:42:30 +0000 (00:42 +0000)]
Auto merge of #91269 - matthiaskrgr:rollup-jh8i8eh, r=matthiaskrgr

Rollup of 7 pull requests

Successful merges:

 - #90611 (Fix another ICE in rustdoc scrape_examples)
 - #91197 (rustdoc: Rename `Type::ResolvedPath` to `Type::Path` and don't re-export it)
 - #91223 (Fix headings indent)
 - #91240 (Saner formatting for UTF8_CHAR_WIDTH table)
 - #91248 (Bump compiler-builtins to 0.1.53)
 - #91252 (Fix bug where submodules wouldn't be updated when running x.py from a subdirectory)
 - #91259 (Remove `--display-doctest-warnings`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoRollup merge of #91259 - jyn514:doctest-warnings, r=GuillaumeGomez
Matthias Krüger [Fri, 26 Nov 2021 21:41:44 +0000 (22:41 +0100)]
Rollup merge of #91259 - jyn514:doctest-warnings, r=GuillaumeGomez

Remove `--display-doctest-warnings`

`--display-doctest-warnings` can be replicated in full with other existing features, there's no
need to have a separate option for it. This removes the option and documents the combination of other features to replicate it.

This also fixes a bug where `--test-args=--show-output` had no effect.

cc `@ollie27,` https://github.com/rust-lang/rust/pull/73314#issuecomment-668317262
Fixes https://github.com/rust-lang/rust/issues/41574

r? `@GuillaumeGomez`

2 years agoRollup merge of #91252 - jyn514:relative-dir, r=Mark-Simulacrum
Matthias Krüger [Fri, 26 Nov 2021 21:41:43 +0000 (22:41 +0100)]
Rollup merge of #91252 - jyn514:relative-dir, r=Mark-Simulacrum

Fix bug where submodules wouldn't be updated when running x.py from a subdirectory

Previously, it would concatenate the relative path to the current
subdirectory, which looked at the wrong folder.

I tested this by checking out `1.56.1`, changing the current directory
to `src/`, and running `../x.py build`.

Fixes https://github.com/rust-lang/rust/issues/90481 (cc `@pnkfelix).`

r? `@Mark-Simulacrum`

2 years agoRollup merge of #91248 - alessandrod:compiler-builtins-bump-bpf, r=Mark-Simulacrum
Matthias Krüger [Fri, 26 Nov 2021 21:41:42 +0000 (22:41 +0100)]
Rollup merge of #91248 - alessandrod:compiler-builtins-bump-bpf, r=Mark-Simulacrum

Bump compiler-builtins to 0.1.53

Fixes a LLVM crash with the bpf targets, see https://github.com/rust-lang/compiler-builtins/pull/440

2 years agoRollup merge of #91240 - dtolnay:utf8width, r=Mark-Simulacrum
Matthias Krüger [Fri, 26 Nov 2021 21:41:41 +0000 (22:41 +0100)]
Rollup merge of #91240 - dtolnay:utf8width, r=Mark-Simulacrum

Saner formatting for UTF8_CHAR_WIDTH table

The way these lines were currently wrapped definitely does not look like someone's intentional formatting. It's likely they got disfigured by rustfmt at some point.

This commit rearranges it to a rustfmt-compatible formatting that I find easier to read.

2 years agoRollup merge of #91223 - GuillaumeGomez:headings-indent, r=jsha
Matthias Krüger [Fri, 26 Nov 2021 21:41:40 +0000 (22:41 +0100)]
Rollup merge of #91223 - GuillaumeGomez:headings-indent, r=jsha

Fix headings indent

Fixes #91200.

Screenshots with the fix:

![Screenshot from 2021-11-25 15-32-35](https://user-images.githubusercontent.com/3050060/143462481-f7e9ea13-72d5-46fe-90e0-9527e74599e3.png)
![Screenshot from 2021-11-25 15-32-49](https://user-images.githubusercontent.com/3050060/143462485-c010716a-0276-421b-a777-afff19c81c96.png)

If the first element of a top docblock is a heading, we still need to keep the indent, but only on this one (I added a test to check it). We need it because otherwise the anchor will go over the `[-]` toggle.

cc `@camelid`
r? `@jsha`

2 years agoRollup merge of #91197 - camelid:rename-resolvedpath, r=GuillaumeGomez,jyn514
Matthias Krüger [Fri, 26 Nov 2021 21:41:39 +0000 (22:41 +0100)]
Rollup merge of #91197 - camelid:rename-resolvedpath, r=GuillaumeGomez,jyn514

rustdoc: Rename `Type::ResolvedPath` to `Type::Path` and don't re-export it

The new name is shorter, simpler, and consistent with `hir::Ty`. It can't be
re-exported since the name would conflict with the `clean::Path` struct. But
usually enum variants are referred to using their qualified names in Rust anyway
(and parts of rustdoc already do that with `clean::Type`), so this is also more
consistent with the language.

r? `@GuillaumeGomez`
cc `@jyn514`

2 years agoRollup merge of #90611 - fee1-dead:rustdoc-ice-fix, r=jyn514,willcrichton
Matthias Krüger [Fri, 26 Nov 2021 21:41:39 +0000 (22:41 +0100)]
Rollup merge of #90611 - fee1-dead:rustdoc-ice-fix, r=jyn514,willcrichton

Fix another ICE in rustdoc scrape_examples

This has occurred to me when documenting a crate with the arguments. Not sure what could have caused it.

r? `@willcrichton`

2 years agoAuto merge of #91246 - nnethercote:faster-layout-array, r=dtolnay
bors [Fri, 26 Nov 2021 21:35:53 +0000 (21:35 +0000)]
Auto merge of #91246 - nnethercote:faster-layout-array, r=dtolnay

Faster `Layout::array`

`Layout::array` is called (indirectly) by `Vec::push()`, which is typically instantiated many times, and so making it smaller can help with compile times because less LLVM IR is generated.

r? `@ghost`

2 years agoRemove `--display-doctest-warnings`
Joshua Nelson [Fri, 26 Nov 2021 18:52:28 +0000 (13:52 -0500)]
Remove `--display-doctest-warnings`

This can be replicated in full with other existing features, there's no
need to have a separate option for it.

This also fixes a bug where `--test-args=--show-output` had no effect,
and updates the documentation.

2 years agoRename `Type::ResolvedPath` to `Type::Path`
Noah Lev [Wed, 24 Nov 2021 20:29:58 +0000 (12:29 -0800)]
Rename `Type::ResolvedPath` to `Type::Path`

At last! The new name is shorter, simpler, and consistent with
`hir::Ty`.

2 years agoAdd 1.57.0 release notes
Josh Stone [Fri, 12 Nov 2021 16:17:57 +0000 (08:17 -0800)]
Add 1.57.0 release notes

2 years agoUpdate test for anchors and headings position
Guillaume Gomez [Thu, 25 Nov 2021 14:39:04 +0000 (15:39 +0100)]
Update test for anchors and headings position

2 years agoUpdate the first heading indent rule so it is only applied on the first heading of...
Guillaume Gomez [Thu, 25 Nov 2021 14:33:38 +0000 (15:33 +0100)]
Update the first heading indent rule so it is only applied on the first heading of the top doc block

2 years agoBump to 1.59
Mark Rousskov [Fri, 26 Nov 2021 19:53:55 +0000 (14:53 -0500)]
Bump to 1.59

2 years agoUse non-generic inner function for pointer formatting
jam1garner [Fri, 26 Nov 2021 18:59:57 +0000 (13:59 -0500)]
Use non-generic inner function for pointer formatting

2 years agoReduce the ICE
Deadbeef [Fri, 26 Nov 2021 17:33:07 +0000 (01:33 +0800)]
Reduce the ICE

2 years agoAuto merge of #91253 - matthiaskrgr:rollup-dnlcjmr, r=matthiaskrgr
bors [Fri, 26 Nov 2021 16:30:42 +0000 (16:30 +0000)]
Auto merge of #91253 - matthiaskrgr:rollup-dnlcjmr, r=matthiaskrgr

Rollup of 4 pull requests

Successful merges:

 - #91169 (Change cg_ssa's get_param to borrow the builder mutably)
 - #91176 (If the thread does not get the lock in the short term, yield the CPU)
 - #91212 (Fix ICE due to out-of-bounds statement index when reporting borrowck error)
 - #91225 (Fix invalid scrollbar display on source code page)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoAdd ICE test
Deadbeef [Fri, 5 Nov 2021 17:18:32 +0000 (01:18 +0800)]
Add ICE test

2 years agoAdd trace statements
Deadbeef [Fri, 5 Nov 2021 16:57:57 +0000 (00:57 +0800)]
Add trace statements

2 years agoFix another ICE in rustdoc scrape_examples
Deadbeef [Fri, 5 Nov 2021 14:37:33 +0000 (22:37 +0800)]
Fix another ICE in rustdoc scrape_examples

2 years agoRollup merge of #91225 - GuillaumeGomez:source-page-scrollbar, r=jsha
Matthias Krüger [Fri, 26 Nov 2021 15:02:27 +0000 (16:02 +0100)]
Rollup merge of #91225 - GuillaumeGomez:source-page-scrollbar, r=jsha

Fix invalid scrollbar display on source code page

Fixes bug introduced in #90983:

![Screenshot from 2021-11-25 17-01-08](https://user-images.githubusercontent.com/3050060/143473753-c2e7c43c-ce3f-474d-9d2a-922e63189c51.png)
![Screenshot from 2021-11-25 17-07-08](https://user-images.githubusercontent.com/3050060/143473757-eecaaf2b-f4f0-49e0-a159-ab485e3f7122.png)

To fix it, I simply unset the `overflow-y` on the source code page so it's not displayed anymore.

r? ``@jsha``

2 years agoRollup merge of #91212 - compiler-errors:issue91206, r=oli-obk
Matthias Krüger [Fri, 26 Nov 2021 15:02:26 +0000 (16:02 +0100)]
Rollup merge of #91212 - compiler-errors:issue91206, r=oli-obk

Fix ICE due to out-of-bounds statement index when reporting borrowck error

Replace an `[index]` with a `.get` when `statement_index` points to a basic-block terminator (and is therefore out-of-bounds in the statements list).

Fixes #91206
Cc ``@camsteffen``
r? ``@oli-obk``

2 years agoRollup merge of #91176 - hermitcore:spin, r=kennytm
Matthias Krüger [Fri, 26 Nov 2021 15:02:24 +0000 (16:02 +0100)]
Rollup merge of #91176 - hermitcore:spin, r=kennytm

If the thread does not get the lock in the short term, yield the CPU

Reduces on [RustyHermit](https://github.com/hermitcore/rusty-hermit) the amount of wasted processor cycles

2 years agoRollup merge of #91169 - RDambrosio016:master, r=bjorn3
Matthias Krüger [Fri, 26 Nov 2021 15:02:23 +0000 (16:02 +0100)]
Rollup merge of #91169 - RDambrosio016:master, r=bjorn3

Change cg_ssa's get_param to borrow the builder mutably

This is a small change to make `get_param` more flexible for codegens that may need to modify things when retrieving function parameters.

This will currently only be used by [rustc_codegen_nvvm](https://github.com/Rust-GPU/Rust-CUDA) (my own project), but may be useful to more codegens in the future.

This is needed because cg_nvvm needs to remap certain types to libnvvm-friendly types, such as `i128` -> `<2 x i64>`. Because cg_ssa does not give mutable access to the builder, i resorted to using a mutex:
```rs
    fn get_param(&self, index: usize) -> Self::Value {
        let val = llvm::get_param(self.llfn(), index as c_uint);
        trace!("Get param `{:?}`", val);
        unsafe {
            let llfnty = LLVMRustGetFunctionType(self.llfn());
            let map = self.remapped_integer_args.borrow();
            if let Some((_, key)) = map.get(llfnty) {
                if let Some((_, new_ty)) = key.iter().find(|t| t.0 == index) {
                    trace!("Casting irregular param {:?} to {:?}", val, new_ty);
                    return transmute_llval(
                        *self.llbuilder.lock().unwrap(),
                        &self.cx,
                        val,
                        *new_ty,
                    );
                }
            }
            val
        }
    }
```
However, i predict this is pretty bad for performance, considering how much builders are called during codegen, so i would greatly appreciate having a more flexible API for this.

2 years agoFix bug where submodules wouldn't be updated when running x.py from a subdirectory
Joshua Nelson [Fri, 26 Nov 2021 14:55:46 +0000 (09:55 -0500)]
Fix bug where submodules wouldn't be updated when running x.py from a subdirectory

Previously, it would concatenate the relative path to the current
subdirectory, which looked at the wrong folder.

I tested this by checking out `1.56.1`, changing the current directory
to `src/`, and running `../x.py build`.

2 years agoPerform Sync check on static items in wf-check instead of during const checks
Oli Scherer [Fri, 26 Nov 2021 14:11:45 +0000 (14:11 +0000)]
Perform Sync check on static items in wf-check instead of during const checks

2 years agoAuto merge of #91164 - Badel2:usefulness-stack-overflow, r=davidtwco
bors [Fri, 26 Nov 2021 13:42:35 +0000 (13:42 +0000)]
Auto merge of #91164 - Badel2:usefulness-stack-overflow, r=davidtwco

Fix stack overflow in `usefulness.rs`

Fix #88747

Applied the suggestion from `@nbdd0121,` not sure if this has any drawbacks. The first call to `ensure_sufficient_stack` is not needed to fix the test case, but I added it to be safe.

2 years agoBump compiler-builtins to 0.1.53
Alessandro Decina [Fri, 26 Nov 2021 10:33:16 +0000 (10:33 +0000)]
Bump compiler-builtins to 0.1.53

Fixes a LLVM crash with the bpf targets

2 years agoAuto merge of #91205 - Aaron1011:visit_param_env, r=lcnr
bors [Fri, 26 Nov 2021 09:55:06 +0000 (09:55 +0000)]
Auto merge of #91205 - Aaron1011:visit_param_env, r=lcnr

Visit `param_env` field in Obligation's `TypeFoldable` impl

This oversight appears to have gone unnoticed for a long time
without causing issues, but it should still be fixed.

2 years agoAdd a unit test for zero-sized types in `RawVec`.
Nicholas Nethercote [Thu, 25 Nov 2021 08:29:10 +0000 (19:29 +1100)]
Add a unit test for zero-sized types in `RawVec`.

Because there's some subtle behaviour specific to zero-sized types and
it's currently not well tested.

2 years agoOptimize `Layout::array`.
Nicholas Nethercote [Fri, 26 Nov 2021 02:39:05 +0000 (13:39 +1100)]
Optimize `Layout::array`.

The current implementation is much more conservative than it needs to
be, because it's dealing with the size and alignment of a given `T`,
which are more restricted than an arbitrary `Layout`.

For example, imagine a struct with a `u32` and a `u4`. You can safely
create a `Layout { size_: 5, align_: 4 }` by hand, but
`Layout::new::<T>` will give `Layout { size_: 8, align_: 4}`, where the
size already has padding that accounts for the alignment. (And the
existing `debug_assert_eq!` in `Layout::array` already demonstrates that
no additional padding is required.)

2 years agoUse unchecked construction in `Layout::pad_to_align`.
Nicholas Nethercote [Fri, 26 Nov 2021 02:36:39 +0000 (13:36 +1100)]
Use unchecked construction in `Layout::pad_to_align`.

Other, similar methods for `Layout` do likewise, and there's already an
`unwrap()` around the result demonstrating the safety.

2 years agoUse `TypeFolder::Error` for `FullTypeResolver` and `QueryNormalizer`
LeSeulArtichaut [Wed, 19 May 2021 21:08:32 +0000 (23:08 +0200)]
Use `TypeFolder::Error` for `FullTypeResolver` and `QueryNormalizer`

Co-authored-by: Alan Egerton <eggyal@gmail.com>
2 years agoUnwrap the results of type folders
LeSeulArtichaut [Wed, 19 May 2021 13:03:43 +0000 (15:03 +0200)]
Unwrap the results of type folders

Co-authored-by: Alan Egerton <eggyal@gmail.com>
2 years agoAdapt `TypeFolder` implementors to return a `Result`
LeSeulArtichaut [Wed, 19 May 2021 13:01:30 +0000 (15:01 +0200)]
Adapt `TypeFolder` implementors to return a `Result`

Co-authored-by: Alan Egerton <eggyal@gmail.com>
2 years agoMake `TypeFoldable` implementors short-circuit on error
LeSeulArtichaut [Wed, 19 May 2021 11:34:54 +0000 (13:34 +0200)]
Make `TypeFoldable` implementors short-circuit on error

Co-authored-by: Alan Egerton <eggyal@gmail.com>
2 years agoMake `TypeFolder::fold_*` return `Result`
LeSeulArtichaut [Wed, 19 May 2021 11:20:39 +0000 (13:20 +0200)]
Make `TypeFolder::fold_*` return `Result`

2 years agoAuto merge of #91181 - GuillaumeGomez:improve-rustdoc-gui-ci, r=jsha
bors [Fri, 26 Nov 2021 06:44:00 +0000 (06:44 +0000)]
Auto merge of #91181 - GuillaumeGomez:improve-rustdoc-gui-ci, r=jsha

Improve rustdoc-gui CI

As commented [here](https://github.com/rust-lang/rust/pull/91179#discussion_r756023009):

When the text isn't displayed, the color returned by puppeteer is always `rgba(0,0,0,0)`, which is definitely not the right value. To prevent this error from happening again, `browser-ui-test` will now fail if a CSS color check is run when the text isn't displayed.

Either this PR or #91179 is merged first, they'll conflict because I made changes to the same test file.

cc `@jyn514`
r? `@jsha`

2 years agoAuto merge of #85102 - estebank:point-at-assignment, r=oli-obk
bors [Fri, 26 Nov 2021 03:57:55 +0000 (03:57 +0000)]
Auto merge of #85102 - estebank:point-at-assignment, r=oli-obk

Diagnostic tweaks

* On type mismatch caused by assignment, point at the source of the expectation
* Hide redundant errors
* Suggest `while let` when `let` is missing in some cases

2 years agoEliminate an unreachable codepath from String::from_utf8_lossy
David Tolnay [Fri, 26 Nov 2021 02:27:36 +0000 (18:27 -0800)]
Eliminate an unreachable codepath from String::from_utf8_lossy

Utf8Lossy's Iterator implementation ensures that only the final chunk
has an empty slice for broken. Thus the only way the first chunk could
have an empty broken is if it is the final chunk, i.e. there is only one
chunk total. And the only way that there could be one chunk total is if
the whole input is valid utf8 and non-empty. That condition has already
been handled by an early return, so at the point that the first
REPLACEMENT is being pushed, it's impossible for first_broken to be
empty.

2 years agoSaner formatting for UTF8_CHAR_WIDTH table
David Tolnay [Fri, 26 Nov 2021 02:18:36 +0000 (18:18 -0800)]
Saner formatting for UTF8_CHAR_WIDTH table

2 years agoAuto merge of #91037 - c410-f3r:testsssssss, r=petrochenkov
bors [Thu, 25 Nov 2021 23:53:02 +0000 (23:53 +0000)]
Auto merge of #91037 - c410-f3r:testsssssss, r=petrochenkov

Move some tests to more reasonable directories - 10

cc #73494
r? `@petrochenkov`

2 years agoVisit `param_env` field in Obligation's `TypeFoldable` impl
Aaron Hill [Wed, 24 Nov 2021 23:20:52 +0000 (17:20 -0600)]
Visit `param_env` field in Obligation's `TypeFoldable` impl

This oversight appears to have gone unnoticed for a long time
without causing issues, but it should still be fixed.

2 years agoStop re-exporting `Type::ResolvedPath`
Noah Lev [Wed, 24 Nov 2021 20:27:37 +0000 (12:27 -0800)]
Stop re-exporting `Type::ResolvedPath`

I would like to rename it to `Type::Path`, but then it can't be
re-exported since the name would conflict with the `Path` struct.
Usually enum variants are referred to using their qualified names in
Rust (and parts of rustdoc already do that with `clean::Type`), so this
is also more consistent with the language.

2 years agoClean up `clean` re-exports
Noah Lev [Wed, 24 Nov 2021 20:21:44 +0000 (12:21 -0800)]
Clean up `clean` re-exports

This will allow re-exporting only certain enum variants.

2 years agoAuto merge of #90580 - cjgillot:no-ee-upvar, r=Aaron1011
bors [Thu, 25 Nov 2021 19:43:56 +0000 (19:43 +0000)]
Auto merge of #90580 - cjgillot:no-ee-upvar, r=Aaron1011

Remove eval_always from upvars.

Split off https://github.com/rust-lang/rust/pull/86056
r? `@ghost`

2 years agoFix clippy test
Esteban Kuber [Thu, 25 Nov 2021 18:39:32 +0000 (18:39 +0000)]
Fix clippy test

2 years agoAccount for type obligation coming from `const` and `static`
Esteban Kuber [Sun, 21 Nov 2021 01:49:51 +0000 (01:49 +0000)]
Account for type obligation coming from `const` and `static`

2 years agoOn type mismatch caused by assignment, point at assignee
Esteban Küber [Fri, 7 May 2021 02:09:35 +0000 (19:09 -0700)]
On type mismatch caused by assignment, point at assignee

* Do not emit unnecessary E0308 after E0070
* Show fewer errors on `while let` missing `let`
* Hide redundant E0308 on `while let` missing `let`
* Point at binding definition when possible on invalid assignment
* do not point at closure twice
* do not suggest `if let` for literals in lhs
* account for parameter types

2 years agoAdd test demonstrating no more ICE
Michael Goulet [Thu, 25 Nov 2021 16:33:01 +0000 (16:33 +0000)]
Add test demonstrating no more ICE

2 years agoFix issue 91206
Michael Goulet [Thu, 25 Nov 2021 06:48:09 +0000 (06:48 +0000)]
Fix issue 91206

2 years agoAuto merge of #91221 - matthiaskrgr:rollup-iuz3gxq, r=matthiaskrgr
bors [Thu, 25 Nov 2021 16:12:04 +0000 (16:12 +0000)]
Auto merge of #91221 - matthiaskrgr:rollup-iuz3gxq, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #89359 (Various fixes for const_trait_impl)
 - #90499 (Link with default MACOSX_DEPLOYMENT_TARGET if not otherwise specified.)
 - #91096 (Print associated types on opaque `impl Trait` types)
 - #91111 (Do not visit attributes in `ItemLowerer`.)
 - #91162 (explain why CTFE/Miri perform truncation on shift offset)
 - #91185 (Remove `-Z force-overflow-checks`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

2 years agoFix invalid scrollbar display on source code page
Guillaume Gomez [Thu, 25 Nov 2021 16:08:23 +0000 (17:08 +0100)]
Fix invalid scrollbar display on source code page

2 years agoRollup merge of #91185 - camelid:rm-force-overflow-checks, r=wesleywiser
Matthias Krüger [Thu, 25 Nov 2021 14:05:40 +0000 (15:05 +0100)]
Rollup merge of #91185 - camelid:rm-force-overflow-checks, r=wesleywiser

Remove `-Z force-overflow-checks`

It was replaced several years ago by the stable option `-C overflow-checks`.
The goal was to delete the `-Z` flag once users had migrated [1].
Now that it's been several years, it makes sense to delete the old flag.

See also the discussion on Zulip [2].

[1]: https://github.com/rust-lang/rust/issues/33134#issuecomment-280484097
[2]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/overflow.20checks/near/262497224

r? ```@wesleywiser```
cc ```@RalfJung```