Skip to content

Rollup of 3 pull requests - #73073

Merged
bors merged 7 commits into
rust-lang:masterfrom
RalfJung:rollup-i24dh28
Jun 7, 2020
Merged

Rollup of 3 pull requests#73073
bors merged 7 commits into
rust-lang:masterfrom
RalfJung:rollup-i24dh28

Conversation

@RalfJung

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

RalfJungand others added 7 commits May 2, 2020 12:13
de-promote Duration::from_secs
In rust-lang#67531, we removed the `rustc_promotable` attribute from a bunch of `Duration` methods, but not from `Duration::from_secs`. This makes the current list of promotable functions the following (courtesy of @ecstatic-morse):
* `INT::min_value`, `INT::max_value`
* `std::mem::size_of`, `std::mem::align_of`
* `RangeInclusive::new` (backing `x..=y`)
* `std::ptr::null`, `std::ptr::null_mut`
* `RawWaker::new`, `RawWakerVTable::new` ???
* `Duration::from_secs`
I feel like the last one stands out a bit here -- the rest are all very core language primitives, and `RawWaker` has a strong motivation for getting a `'static` vtable. But a `&'static Duration`? That seems unlikely. So I propose we no longer promote calls to `Duration::from_secs`, which is what this PR does.
rust-lang#67531 saw zero regressions and I am not aware of anyone complaining that this broke their (non-cratered) code, so I consider it likely the same will be true here, but of course we'd do a crater run.
See [this document](https://github.com/rust-lang/const-eval/blob/master/promotion.md) for some more background on promotion and rust-lang/const-eval#19 for some of the concerns around promoting function calls.
…matsakis
Make `PolyTraitRef::self_ty` return `Binder<Ty>`
This came up during review of rust-lang#71618. The current implementation is the same as a call to `skip_binder` but harder to audit. Make it preserve binding levels and add a call to `skip_binder` at all use sites so they can be audited as part of rust-lang#72507.
linker: Add a linker rerun hack for gcc versions not supporting -static-pie
Which mirrors the existing `-no-pie` linker rerun hack, but the logic is a bit more elaborated in this case.
If the linker (gcc or clang) errors on `-static-pie` we rerun in with `-static` instead.
We must also replace CRT objects corresponding to `-static-pie` with ones corresponding to `-static` in this case.
(One sanity check for CRT objects in target specs is also added as a drive-by fix.)
To do in the future: refactor all linker rerun hacks into separate functions and share more code with `add_(pre,post)_link_objects`.
This PR accompanies rust-lang#71804 and unblocks rust-lang#70740.
@RalfJung

Copy link
Copy Markdown
MemberAuthor

Tiny rollup because the failures in the bigger ones just make no sense at all...
@rustbot modify labels: +rollup
@bors r+ rollup=never p=3

@bors

bors commented Jun 6, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit d112d8b has been approved by RalfJung

@rustbotrustbot added the rollup A PR which is a rollup label Jun 6, 2020
@borsbors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 6, 2020
@bors

bors commented Jun 6, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit d112d8b with merge 9c1857f...

@bors

bors commented Jun 7, 2020

Copy link
Copy Markdown
Collaborator

☀️ Test successful - checks-azure
Approved by: RalfJung
Pushing 9c1857f to master...

@borsbors added the merged-by-bors This PR was explicitly merged by bors. label Jun 7, 2020
@bors
bors merged commit 9c1857f into rust-lang:masterJun 7, 2020
@RalfJung
RalfJung deleted the rollup-i24dh28 branch June 7, 2020 08:00
@cuvipercuviper added this to the 1.46 milestone May 2, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-borsThis PR was explicitly merged by bors.rollupA PR which is a rollupS-waiting-on-borsStatus: Waiting on bors to run and complete tests. Bors will change the label on completion.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@RalfJung@bors@cuviper@rustbot@petrochenkov@ecstatic-morse