Skip to content

Rollup of 8 pull requests - #72737

Closed
RalfJung wants to merge 65 commits into
rust-lang:masterfrom
RalfJung:rollup-ziv6z94
Closed

Rollup of 8 pull requests#72737
RalfJung wants to merge 65 commits into
rust-lang:masterfrom
RalfJung:rollup-ziv6z94

Conversation

@RalfJung

Copy link
Copy Markdown
Member

Successful merges:

Failed merges:

r? @ghost

lcnrand others added 30 commits May 11, 2020 10:29
- Defer to Ipv4Addr::fmt when printing an Ipv4 address
- Fast path: write directly to f without an intermediary buffer when
there are no alignment options
- Simplify finding the inner zeroes-span
Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
Miri's pointer_offset_inbounds implementation has been moved into
librustc_mir as ptr_offset_inbounds (to avoid breaking miri on a
nightly update). The comments have been slightly reworked to better
match `offset`'s external documentation about what causes UB.
The intrinsic implementations are taken directly from miri.
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
Signed-off-by: Joe Richey <joerichey@google.com>
This is tricky to get right if we want to avoid panicking or wrapping.
Signed-off-by: Joe Richey <joerichey@google.com>
The previous code paniced if offset_bytes == i64::MIN. This commit:
- Properly computes the absoulte value to avoid this panic
- Adds a test for this edge case
Signed-off-by: Joe Richey <joerichey@google.com>
estebankand others added 16 commits May 27, 2020 16:28
We now perform the correct checks even if the pointer size differs
between the host and target.
Signed-off-by: Joe Richey <joerichey@google.com>
Tweak impl signature mismatch errors involving `RegionKind::ReVar` lifetimes
Fixrust-lang#66406, fixrust-lang#72106.
```
error: `impl` item signature doesn't match `trait` item signature
--> $DIR/trait-param-without-lifetime-constraint.rs:14:5
|
LL | fn get_relation(&self) -> To;
| ----------------------------- expected `fn(&Article) -> &ProofReader`
...
LL | fn get_relation(&self) -> &ProofReader {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ found `fn(&Article) -> &ProofReader`
|
= note: expected `fn(&Article) -> &ProofReader`
found `fn(&Article) -> &ProofReader`
help: the lifetime requirements from the `impl` do not correspond to the requirements in the `trait`
--> $DIR/trait-param-without-lifetime-constraint.rs:10:31
|
LL | fn get_relation(&self) -> To;
| ^^ consider borrowing this type parameter in the trait
```
r? @nikomatsakis
Make pointer offset methods/intrinsics const
Implements rust-lang#71499 using [the implementations from miri](https://github.com/rust-lang/miri/blob/52f5d202bdcfe8986f0615845f8d1647ab8a2c6a/src/shims/intrinsics.rs#L96-L112).
I added some tests what's allowed and what's UB. Let me know if any other cases should be added.
CC: @RalfJung@oli-obk
linker: Support `-static-pie` and `-static -shared`
This PR adds support for passing linker arguments for creating statically linked position-independent executables and "statically linked" shared libraries.
Therefore it incorporates the majority of rust-lang#70740 except for the linker rerun hack and actually flipping the "`static-pie` is supported" switch for musl targets.
…afe-fn, r=nikomatsakis
Implement RFC 2585: unsafe blocks in unsafe fn
Tracking issue: rust-lang#71668
r? @RalfJung cc @nikomatsakis
…chievink
borrowck `DefId` -> `LocalDefId`
Replaces some `DefId`s which must always be local with `LocalDefId` in `librustc_mir/borrowck`.
cc @marmeladema
…lacrum
Various minor improvements to Ipv6Addr::Display
Cleaned up `Ipv6Addr::Display`, especially with an eye towards simplifying and reducing duplicated logic. Also added a fast-path optimization, similar to rust-lang#72399 and rust-lang#72398.
- Defer to `Ipv4Addr::fmt` when printing an Ipv4 address
- Fast path: write directly to `f` without an intermediary buffer when there are no alignment options
- Simplify finding the inner zeroes-span
…bk,eddyb
Miri read_discriminant: return a scalar instead of raw underlying bytes
r? @oli-obk@eddyb
NVPTX support for new asm!
This PR implements the new `asm!` syntax for the `nvptx64-nvidia-cuda` target.
r? @Amanieu
@RalfJung

Copy link
Copy Markdown
MemberAuthor

@rustbot modify labels: +rollup
@bors r+ rollup=never p=8

Mostly doing this to see if PR CI identifies any issues.

@bors

bors commented May 29, 2020

Copy link
Copy Markdown
Collaborator

📌 Commit e31227a has been approved by RalfJung

@rustbotrustbot added the rollup A PR which is a rollup label May 29, 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 May 29, 2020
@bors

bors commented May 29, 2020

Copy link
Copy Markdown
Collaborator

⌛ Testing commit e31227a with merge c382bc8b7aa35601dea9e829ffd920e861cc4ee6...

@bors

bors commented May 29, 2020

Copy link
Copy Markdown
Collaborator

💔 Test failed - checks-azure

@borsbors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 29, 2020
@Dylan-DPC-zz

Copy link
Copy Markdown

rolled up a disjoint rollup so that we can investigate this failure

@RalfJung

Copy link
Copy Markdown
MemberAuthor

This is a new debug assertion that I added in #72419.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollupA PR which is a rollupS-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

12 participants

@RalfJung@bors@Dylan-DPC-zz@rustbot@lcnr@petrochenkov@Lucretiel@westernmagic@josephlr@LeSeulArtichaut@estebank@nikomatsakis