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

Closed
wants to merge 27 commits into from
Closed

Conversation

Manishearth
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

joboet and others added 27 commits February 16, 2023 15:06
This change makes it so, instead of mixing string distance with
type unification, function signature search works by
mapping names to IDs at the start, reporting to the user any
cases where it had to make corrections, and then matches with
IDs when going through the items.

This only changes function searches. Name searches are left alone,
and corrections are only done when there's a single item in the
search query.
This commit adds cross-language LLVM Control Flow Integrity (CFI)
support to the Rust compiler by adding the
`-Zsanitizer-cfi-normalize-integers` option to be used with Clang
`-fsanitize-cfi-icall-normalize-integers` for normalizing integer types
(see https://reviews.llvm.org/D139395).

It provides forward-edge control flow protection for C or C++ and Rust
-compiled code "mixed binaries" (i.e., for when C or C++ and Rust
-compiled code share the same virtual address space). For more
information about LLVM CFI and cross-language LLVM CFI support for the
Rust compiler, see design document in the tracking issue rust-lang#89653.

Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and
-Zsanitizer-cfi-normalize-integers, and requires proper (i.e.,
non-rustc) LTO (i.e., -Clinker-plugin-lto).
This commit updates the documentation for the LLVM Control Flow
Integrity (CFI) support in the Rust compiler.
... with this convertions some tests fail :(
FFX has new builtin support for isolating the daemon's environment. This
switches the manual isolation originally written to that new builtin
feature.
…risDenton

Implement tuple<->array convertions via `From`

This PR adds the following impls that convert between homogeneous tuples and arrays of the corresponding lengths:
```rust
impl<T> From<[T; 1]> for (T,) { ... }
impl<T> From<[T; 2]> for (T, T) { ... }
/* ... */
impl<T> From<[T; 12]> for (T, T, T, T, T, T, T, T, T, T, T, T) { ... }

impl<T> From<(T,)> for [T; 1] { ... }
impl<T> From<(T, T)> for [T; 2] { ... }
/* ... */
impl<T> From<(T, T, T, T, T, T, T, T, T, T, T, T)> for [T; 12] { ... }
```

IMO these are quite uncontroversial but note that they are, just like any other trait impls, insta-stable.
Add cross-language LLVM CFI support to the Rust compiler

This PR adds cross-language LLVM Control Flow Integrity (CFI) support to the Rust compiler by adding the `-Zsanitizer-cfi-normalize-integers` option to be used with Clang `-fsanitize-cfi-icall-normalize-integers` for normalizing integer types (see https://reviews.llvm.org/D139395).

It provides forward-edge control flow protection for C or C++ and Rust -compiled code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code share the same virtual address space). For more information about LLVM CFI and cross-language LLVM CFI support for the Rust compiler, see design document in the tracking issue rust-lang#89653.

Cross-language LLVM CFI can be enabled with -Zsanitizer=cfi and -Zsanitizer-cfi-normalize-integers, and requires proper (i.e., non-rustc) LTO (i.e., -Clinker-plugin-lto).

Thank you again, `@bjorn3,` `@nikic,` `@samitolvanen,` and the Rust community for all the help!
…ou-se

Replace generic thread parker with explicit no-op parker

With rust-lang#98391 merged, all platforms supporting threads now have their own parking implementations. Therefore, the generic implementation can be removed. On the remaining platforms (really just WASM without atomics), parking is not supported, so calls to `thread::park` now return instantly, which is [allowed by their API](https://doc.rust-lang.org/nightly/std/thread/fn.park.html). This is a change in behaviour, as spurious wakeups do not currently occur since all platforms guard against them. It is invalid to depend on this, but I'm still going to tag this as libs-api for confirmation.

`@rustbot` label +T-libs +T-libs-api +A-atomic

r? rust-lang/libs
…ions, r=GuillaumeGomez

rustdoc: restructure type search engine to pick-and-use IDs

Fixes rust-lang#110029

Preview: https://notriddle.com/rustdoc-demo-html-3/search-corrections/std/index.html?search=-%3E%20streaming

![image](https://user-images.githubusercontent.com/1593513/233494900-ae77d5b4-e395-41f8-bbac-53ee55bb4a76.png)

This change makes it so, instead of mixing string distance with type unification, function signature search works by mapping names to IDs at the start, reporting to the user any cases where it had to make corrections, and then matches with IDs when going through the items.

This only changes function searches. Name searches are left alone, and corrections are only done when there's a single item in the search query.
Update ICU4X to 1.2

Was released a couple weeks ago.

Also needed to make progress on rust-lang#109302 (though this PR does not achieve that part just yet)
…errors

rustc_middle: Fix `opt_item_ident` for non-local def ids

Noticed while working on rust-lang#110855.
…n, r=tmandry

Use builtin FFX isolation for Fuchsia test runner

FFX has new builtin support for isolating the daemon's environment. This switches the manual isolation originally written to that new builtin feature.

r? `@tmandry`
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 3, 2023
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels May 3, 2023
@Manishearth
Copy link
Member Author

@bors r+ p=5 rollup=never

To be tested after #111153

Once these two rollups land we should give the queue a bit of a breather and let some of the nevers filter through

@bors
Copy link
Contributor

bors commented May 3, 2023

📌 Commit 2d4521f has been approved by Manishearth

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 3, 2023
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-14 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling rustc_ast_lowering v0.0.0 (/checkout/compiler/rustc_ast_lowering)
   Compiling rustc_query_impl v0.0.0 (/checkout/compiler/rustc_query_impl)
   Compiling rustc_monomorphize v0.0.0 (/checkout/compiler/rustc_monomorphize)
   Compiling rustc_smir v0.0.0 (/checkout/compiler/rustc_smir)
error[E0277]: the trait bound `DiagnosticMessage: From<&std::string::String>` is not satisfied
   --> compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs:537:33
535 | ...                   .struct_span_err(
    |                        --------------- required by a bound introduced by this call
    |                        --------------- required by a bound introduced by this call
536 | ...                       cfi_encoding.span,
537 | ...                       &format!("invalid `cfi_encoding` for `{:?}`", ty.kind()),
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<&std::string::String>` is not implemented for `DiagnosticMessage`
    |
    = note: required for `&std::string::String` to implement `Into<DiagnosticMessage>`
note: required by a bound in `Session::struct_span_err`
    |
    |
409 |         msg: impl Into<DiagnosticMessage>,
    |                   ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Session::struct_span_err`
   --> /checkout/library/alloc/src/macros.rs:119:23
    |
119 |     ($($arg:tt)*) => {*{
    |                       +
    |                       +

error[E0277]: the trait bound `DiagnosticMessage: From<&std::string::String>` is not satisfied
   --> compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs:589:33
587 | ...                   .struct_span_err(
    |                        --------------- required by a bound introduced by this call
    |                        --------------- required by a bound introduced by this call
588 | ...                       cfi_encoding.span,
589 | ...                       &format!("invalid `cfi_encoding` for `{:?}`", ty.kind()),
    |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<&std::string::String>` is not implemented for `DiagnosticMessage`
    |
    = note: required for `&std::string::String` to implement `Into<DiagnosticMessage>`
note: required by a bound in `Session::struct_span_err`
    |
    |
409 |         msg: impl Into<DiagnosticMessage>,
    |                   ^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Session::struct_span_err`
   --> /checkout/library/alloc/src/macros.rs:119:23
    |
119 |     ($($arg:tt)*) => {*{
    |                       +

@Manishearth
Copy link
Member Author

#111163

@Manishearth Manishearth closed this May 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants