Skip to content

Rollup of 8 pull requests #110890

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 25 commits into from

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

MikailBag and others added 25 commits January 8, 2023 22:53
Currently, the `SeqCst` ordering is used, which seems unnecessary:
+ Even `Relaxed` ordering guarantees that all updates are atomic and are executed in total order
+ User code only reads atomic for monitoring purposes, no "happens-before" relationships with actual allocations and deallocations are needed for this

If argumentation above is correct, I propose changing ordering to `Relaxed` to clarify that no synchronization is required here, and improve performance (if somebody copy-pastes this example into their code).
Instead of skipping functions with internal ABIs, check that the
signature doesn't contain any fn-ptr types with external ABIs that
aren't FFI-safe.

Signed-off-by: David Wood <david.wood@huawei.com>
Remove an `unwrap` that assumed FFI-safe types in foreign fn-ptr types.

Signed-off-by: David Wood <david.wood@huawei.com>
Extend previous commit's support for checking for external fn-ptrs in
internal fn types to report errors for multiple found fn-ptrs.

Signed-off-by: David Wood <david.wood@huawei.com>
Extend previous checks for external ABI fn-ptrs to use in internal
statics, constants, type aliases and algebraic data types.

Signed-off-by: David Wood <david.wood@huawei.com>
Because the derived versions are good enough.
docs(std): clarify remove_dir_all errors

When using `remove_dir_all`, I assumed that the function was idempotent and that I could always call it to remove a directory if it existed. That's not the case and it bit me in production, so I figured I'd submit this to clarify the docs.
Change memory ordering in System wrapper example

Currently, the `SeqCst` ordering is used, which seems unnecessary:
+ Even `Relaxed` ordering guarantees that all updates are atomic and are executed in total order
+ User code only reads atomic for monitoring purposes, no "happens-before" relationships with actual allocations and deallocations are needed for this

If argumentation above is correct, I propose changing ordering to `Relaxed` to clarify that no synchronization is required here, and improve performance (if somebody copy-pastes this example into their code).
…-fn-ptr-in-internal-abi-fn, r=jackh726

lint/ctypes: ext. abi fn-ptr in internal abi fn

Fixes rust-lang#94223.

- In the improper ctypes lint, instead of skipping functions with internal ABIs, check that the signature doesn't contain any fn-ptr types with external ABIs that aren't FFI-safe.
- When computing the ABI for fn-ptr types, remove an `unwrap` that assumed FFI-safe types in foreign fn-ptr types.
  - I'm not certain that this is the correct approach.
…w-response, r=lcnr

Clear response values for overflow in new solver

When we have an overflow, return a trivial query response. This fixes an ICE with the code described in rust-lang#110544:

```rust
trait Trait {}

struct W<T>(T);

impl<T, U> Trait for W<(W<T>, W<U>)>
where
    W<T>: Trait,
    W<U>: Trait,
{}

fn impls<T: Trait>() {}

fn main() {
    impls::<W<_>>()
}
```

Where, while proving `W<?0>: Trait`, we overflow but still apply the query response of `?0 = (W<?1>, W<?2>)`. Then while re-processing the query to validate that our evaluation result was stable, we get a different query response that looks like `?1 = (W<?3>, W<?4>), ?2 = (W<?5>, W<?6>)`, and so we trigger the ICE.

Also, by returning a trivial query response we also avoid the infinite-loop/OOM behavior of the old solver.

r? `@lcnr`
…cleanups, r=lcnr

More `Typefoldable`/`TypeVisitable` cleanups

r? `@lcnr`
…=compiler-errors

compiletest: emit assembly-output header in error

Improve the error message.
…ial, r=compiler-errors

Migrate trivially translatable `rustc_parse` diagnostics

cc rust-lang#100717

Migrate diagnostics in `rustc_parse` which are emitted in a single statement. I worked on this by expanding the lint introduced in rust-lang#108760, although that isn't included here as there is much more work to be done to satisfy it
…unsound-issues, r=jackh726

Add `known-bug` tests for 4 unsound issues

This PR adds `known-bug` tests for 4 unsound issues as part of rust-lang#105107
- rust-lang#40582
- rust-lang#49682
- rust-lang#74629
- rust-lang#105782
@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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. labels Apr 27, 2023
@rustbot rustbot added WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Apr 27, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=8

@bors
Copy link
Collaborator

bors commented Apr 27, 2023

📌 Commit 7e34afb has been approved by matthiaskrgr

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 Apr 27, 2023
@bors
Copy link
Collaborator

bors commented Apr 27, 2023

⌛ Testing commit 7e34afb with merge 01ceee1aa1ec4db21068ddd36ded84c442721316...

@rust-log-analyzer
Copy link
Collaborator

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

Click to see the possible cause of the failure (guessed by this bot)
   = note: `#[warn(dead_code)]` implied by `#[warn(warnings)]`

error[E0275]: overflow evaluating the requirement `_: Sized`
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`diesel`)
note: required for `Source` to implement `filter_dsl::FilterDsl<_>`
   |
   |
20 | impl<T, Predicate> FilterDsl<Predicate> for T
   |         ---------  ^^^^^^^^^^^^^^^^^^^^     ^
   |         unsatisfied trait bound introduced here

For more information about this error, try `rustc --explain E0275`.
warning: `diesel` (lib) generated 5 warnings
warning: `diesel` (lib) generated 5 warnings
error: could not compile `diesel` (lib) due to previous error; 5 warnings emitted
warning: build failed, waiting for other jobs to finish...
warning: `diesel` (lib test) generated 5 warnings (5 duplicates)
error: could not compile `diesel` (lib test) due to previous error; 5 warnings emitted
thread 'main' panicked at 'tests failed for https://github.com/diesel-rs/diesel', src/tools/cargotest/main.rs:124:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:17:46
make: *** [Makefile:44: check-aux] Error 1

@bors
Copy link
Collaborator

bors commented Apr 27, 2023

💔 Test failed - checks-actions

@bors bors 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 Apr 27, 2023
@matthiaskrgr matthiaskrgr deleted the rollup-e5589r8 branch March 16, 2024 18:19
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.