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 #74667

Merged
merged 21 commits into from
Jul 23, 2020
Merged

Rollup of 8 pull requests #74667

merged 21 commits into from
Jul 23, 2020

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost

euclio and others added 21 commits July 9, 2020 10:57
Now that rust-lang#74163 updated the minimum Linux kernel to 2.6.32, we can
assume the availability of APIs that open file descriptors that are
already set to close on exec, including the flags `O_CLOEXEC`,
`SOCK_CLOEXEC`, and `F_DUPFD_CLOEXEC`.
as if this is currently possible. HA!
This commit improves codegen for unchecked casts on WebAssembly targets
to use the singluar `iNN.trunc_fMM_{u,s}` instructions. Previously rustc
would codegen a bare `fptosi` and `fptoui` for float casts but for
WebAssembly targets the codegen for these instructions is quite large.
This large codegen is due to the fact that LLVM can speculate these
instructions so the trapping behavior of WebAssembly needs to be
protected against in case they're speculated.

The change here is to update the codegen for the unchecked cast
intrinsics to have a wasm-specific case where they call the appropriate
LLVM intrinsic to generate the right wasm instruction. The intrinsic is
explicitly opting-in to undefined behavior so a trap here for
out-of-bounds inputs on wasm should be acceptable.

cc rust-lang#73591
Co-authored-by: David Tolnay <dtolnay@gmail.com>
Co-authored-by: varkor <github@varkor.com>
add a Backtrace::disabled function

Based upon @dtolnay's suggestion here: dtolnay/anyhow#97 (comment)
one more Path::with_extension example, to demonstrate behavior
Prefer constant over function

Just that I prefer constants over functions that can be made const.
Remove Linux workarounds for missing CLOEXEC support

Now that rust-lang#74163 updated the minimum Linux kernel to 2.6.32, we can
assume the availability of APIs that open file descriptors that are
already set to close on exec, including the flags `O_CLOEXEC`,
`SOCK_CLOEXEC`, and `F_DUPFD_CLOEXEC`.

Closes rust-lang#74519.
Make str point to primitive page

Currently str in String page points to str module page.
require type defaults to be after const generic parameters

From current discussions it seems like the goal here is for type and const parameters to be unordered and allow things like `struct Foo<const N: usize, T = u32>(T)` and `struct Foo<T, const N: usize = 7>` this way.

Note: This means that using `min_const_generics` it will not be possible for an adt to have both type defaults and const parameters.

closes rust-lang#70471

r? @varkor @eddyb
Improve codegen for unchecked float casts on wasm

This commit improves codegen for unchecked casts on WebAssembly targets
to use the singluar `iNN.trunc_fMM_{u,s}` instructions. Previously rustc
would codegen a bare `fptosi` and `fptoui` for float casts but for
WebAssembly targets the codegen for these instructions is quite large.
This large codegen is due to the fact that LLVM can speculate these
instructions so the trapping behavior of WebAssembly needs to be
protected against in case they're speculated.

The change here is to update the codegen for the unchecked cast
intrinsics to have a wasm-specific case where they call the appropriate
LLVM intrinsic to generate the right wasm instruction. The intrinsic is
explicitly opting-in to undefined behavior so a trap here for
out-of-bounds inputs on wasm should be acceptable.

cc rust-lang#73591
@Manishearth
Copy link
Member Author

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

@rustbot rustbot added the rollup A PR which is a rollup label Jul 23, 2020
@bors
Copy link
Contributor

bors commented Jul 23, 2020

📌 Commit 8f02f2c has been approved by Manishearth

@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 Jul 23, 2020
@bors
Copy link
Contributor

bors commented Jul 23, 2020

⌛ Testing commit 8f02f2c with merge 2bbfa02...

@bors
Copy link
Contributor

bors commented Jul 23, 2020

☀️ Test successful - checks-actions, checks-azure
Approved by: Manishearth
Pushing 2bbfa02 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 23, 2020
@bors bors merged commit 2bbfa02 into rust-lang:master Jul 23, 2020
@bors bors mentioned this pull request Jul 23, 2020
@cuviper cuviper added this to the 1.47.0 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.

None yet

10 participants