Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 3 pull requests #73073

Merged
merged 7 commits into from
Jun 7, 2020
Merged

Rollup of 3 pull requests #73073

merged 7 commits into from
Jun 7, 2020

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jun 6, 2020

Successful merges:

Failed merges:

r? @ghost

RalfJung and 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
Member Author

RalfJung commented Jun 6, 2020

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
Copy link
Contributor

bors commented Jun 6, 2020

📌 Commit d112d8b has been approved by RalfJung

@rustbot rustbot added the rollup A PR which is a rollup label Jun 6, 2020
@bors bors 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
Copy link
Contributor

bors commented Jun 6, 2020

⌛ Testing commit d112d8b with merge 9c1857f...

@bors
Copy link
Contributor

bors commented Jun 7, 2020

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 7, 2020
@bors bors merged commit 9c1857f into rust-lang:master Jun 7, 2020
@RalfJung RalfJung deleted the rollup-i24dh28 branch June 7, 2020 08:00
@cuviper cuviper added this to the 1.46 milestone May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup S-waiting-on-bors Status: 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