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 8 pull requests #63471

Merged
merged 40 commits into from
Aug 11, 2019
Merged

Conversation

Mark-Simulacrum
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

MikailBag and others added 30 commits August 9, 2019 17:41
tcx.crate_name is the appropriate way to retrieve the crate name.
This drops the parking_lot dependency; the ReentrantMutex type appeared
to be unused (at least, no compilation failures occurred).

This is technically a possible change in behavior of its users, as
lock() would wait on other threads releasing their guards, but since we
didn't actually remove any threading or such in this code, it appears
that we never used that behavior (the behavior change is only noticeable
if the type previously was used in two threads, in a single thread
ReentrantMutex is useless).
This is already a query so we're just needlessly copying the data
around.
These impls prevent ergonomic use of the config (e.g., forcing us to use
RefCell) despite all usecases for these structs only using their Display
impls once.
Utilize `?` instead of and_then/map operators
bjorn3 and others added 10 commits August 11, 2019 16:51
ty::Instance is small and Copy, we should not be adding additional
indirection.
Add #[repr(transparent)] for several types

In some functions, types mentioned in this PR are transmuted into their inner value.
Example for `PathBuf`: https://github.com/rust-lang/rust/blob/master/src/libstd/path.rs#L1132.
This PR adds `#[repr(transparent)]` to those types, so their correct behavior doesn't depend on compiler details. (As far as I understand, currently that line, converting `PathBuf` to `Vec<u8>`, is UB).
Lint on some incorrect uses of mem::zeroed / mem::uninitialized

Cc rust-lang#62825 and https://internals.rust-lang.org/t/make-mem-uninitialized-and-mem-zeroed-panic-for-some-types-where-0-is-a-niche/10605

This does not yet handle `NonNull`/`NonZero*`, but it is a start.

I also improved some doc issues I hit on the way, and added a useful helper to `TyS`.

EDIT: I added the relnotes label mostly as a proposal -- I think this is worth mentioning, but leave the decision up to the release team.
rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE

This matches `RUSTC_LOG`. Both affect only rustc, not any Rust program.
…k-Simulacrum

Add an example to show how to insert item to a sorted vec

Closes rust-lang#61684
cc rust-lang#61742
r? @Mark-Simulacrum, @jonas-schievink
…GuillaumeGomez

rustdoc: general cleanup

Almost all commits stand alone; but all commits can be reviewed individually.
…ddyb

Copy ty::Instance instead of passing by reference

ty::Instance is small and Copy, we should not be adding additional
indirection.

Fixes rust-lang#63409.

r? @eddyb
@Mark-Simulacrum
Copy link
Member Author

@bors r+ p=10

@bors
Copy link
Contributor

bors commented Aug 11, 2019

📌 Commit 4229dc3 has been approved by Mark-Simulacrum

@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 Aug 11, 2019
@bors
Copy link
Contributor

bors commented Aug 11, 2019

⌛ Testing commit 4229dc3 with merge 00ee1b4...

bors added a commit that referenced this pull request Aug 11, 2019
Rollup of 8 pull requests

Successful merges:

 - #61969 (Add #[repr(transparent)] for several types)
 - #63346 (Lint on some incorrect uses of mem::zeroed / mem::uninitialized)
 - #63433 (Miri shouldn't look at types)
 - #63440 (rename RUST_CTFE_BACKTRACE to RUSTC_CTFE_BACKTRACE)
 - #63441 (Derive Debug for CrateInfo)
 - #63442 (Add an example to show how to insert item to a sorted vec)
 - #63453 (rustdoc: general cleanup)
 - #63464 (Copy ty::Instance instead of passing by reference)

Failed merges:

r? @ghost
@bors
Copy link
Contributor

bors commented Aug 11, 2019

☀️ Test successful - checks-azure
Approved by: Mark-Simulacrum
Pushing 00ee1b4 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 11, 2019
@bors bors merged commit 4229dc3 into rust-lang:master Aug 11, 2019
@Centril Centril added the rollup A PR which is a rollup label Oct 2, 2019
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.

7 participants