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

Merged
merged 17 commits into from
Oct 13, 2024
Merged

Rollup of 8 pull requests #131628

merged 17 commits into from
Oct 13, 2024

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

tdittr and others added 17 commits September 23, 2024 14:04
This check was previously only performed on functions not function pointers.

Co-authored-by: Folkert <[email protected]>
These are common pitfalls for beginners, so I think it's worth
making the subtleties more visible.
…eatures

Add missing error annotations and .stderr file

Acknowledge comments
…iler-errors

Check ABI target compatibility for function pointers

Tracking issue: rust-lang#130260
Related tracking issue: rust-lang#87678

Compatibility of an ABI for a target was previously only performed on function definitions and `extern` blocks. This PR adds it also to function pointers to be consistent.

This might have broken some of the `tests/ui/` depending on the platform, so a try run seems like a good idea.

Also this might break existing code, because we now emit extra errors. Does this require a crater run?

# Example
```rust
// build with: --target=x86_64-unknown-linux-gnu

// These raise E0570
extern "thiscall" fn foo() {}
extern "thiscall" { fn bar() }

// This did not raise any error
fn baz(f: extern "thiscall" fn()) { f() }
```

# Open Questions
* [x] Should this report a future incompatibility warning like rust-lang#87678 ?
* [ ] Is this the best place to perform the check?
…c, r=Mark-Simulacrum

make `Step` doc-comments more clear

Aiming to improve complicated `Step` documentation. Once we merge this, I will update [this page](https://rustc-dev-guide.rust-lang.org/building/bootstrapping/how-bootstrap-does-it.html?highlight=Step#synopsis-of--step) too.
…lcnr

Don't assume traits used as type are trait objs in 2021 edition

Fixes rust-lang#127548

When you use a trait as a type, the compiler automatically assumes you meant to use a trait object, which is not always the case.
This PR fixes the bug where you don't need a trait object, so the error message was changed to:
```
error[E0782]: expected a type, found a trait
```
Also fixes some ICEs:
Fixes rust-lang#120241
Fixes rust-lang#120482
Fixes rust-lang#125512
…y-instability-lint-for-clippy, r=xFrednet

Handle `clippy` cases of `rustc::potential_query_instability` lint

This PR removes `#![allow(rustc::potential_query_instability)]` line from [`src/tools/clippy/clippy_lints/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/src/tools/clippy/clippy_lints/src/lib.rs#L30) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.

A somewhat tracking issue: rust-lang#84447
…=Mark-Simulacrum

More clearly document Stdin::read_line

These are common pitfalls for beginners, so I think it's worth making the subtleties more visible.
…ccepted-features, r=jieyouxu

Emit an error for unstable attributes that reference already stable features

Closes rust-lang#129814
Shallowly match opaque key in storage

Using a full eq on the key *and* the hidden type means that in cases where we first ambiguously register a `?t` hidden type then constrain that `?t` to be a type that doesn't actually satisfy its bounds, we end up with bogus entries in the opaque type storage. We should commit to the type in the storage if it's registered.

r? lcnr
…tgross35

remove const_cow_is_borrowed feature gate

The two functions guarded by this are still unstable, and there's no reason to require a separate feature gate for their const-ness -- we can just have `cow_is_borrowed` cover both kinds of stability.

Cc rust-lang#65143
@rustbot rustbot added 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) rollup A PR which is a rollup labels Oct 12, 2024
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=9

@bors
Copy link
Contributor

bors commented Oct 12, 2024

📌 Commit de72917 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 Oct 12, 2024
@bors
Copy link
Contributor

bors commented Oct 12, 2024

⌛ Testing commit de72917 with merge ef4e825...

@bors
Copy link
Contributor

bors commented Oct 13, 2024

☀️ Test successful - checks-actions
Approved by: matthiaskrgr
Pushing ef4e825 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Oct 13, 2024
@bors bors merged commit ef4e825 into rust-lang:master Oct 13, 2024
7 checks passed
@rustbot rustbot added this to the 1.83.0 milestone Oct 13, 2024
@rust-timer
Copy link
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#128784 Check ABI target compatibility for function pointers 70f67789cc40f72e4f630c4d8c21454a0b2474ed (link)
#130965 make Step doc-comments more clear 18d61f5fa5d84fa996f4567de0da21d85adeacb4 (link)
#131239 Don't assume traits used as type are trait objs in 2021 edi… 6a672c5ad3e0577b56d709d191066225a0fe540a (link)
#131277 Handle clippy cases of `rustc::potential_query_instabilit… 6748e58f52e2f9b582db38f6218acb0361c5d95a (link)
#131503 More clearly document Stdin::read_line 0b440b70fd9db409511bf8abec3088f5bc8bf8f2 (link)
#131567 Emit an error for unstable attributes that reference alread… 0c26e20e5f2c5ca9d85254ced464d227dcabd573 (link)
#131599 Shallowly match opaque key in storage b9476fd16fc1438f82b9b56b4fa482cfbfa81b9d (link)
#131617 remove const_cow_is_borrowed feature gate 887bd0ceb96273c49d1cb8f7a9241127824adfad (link)

previous master: 6b9676b454

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ef4e825): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.5% [0.3%, 0.6%] 2
Improvements ✅
(primary)
-0.3% [-0.3%, -0.2%] 8
Improvements ✅
(secondary)
-0.6% [-1.8%, -0.1%] 31
All ❌✅ (primary) -0.3% [-0.3%, -0.2%] 8

Max RSS (memory usage)

Results (primary 0.5%, secondary 2.2%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.5% [0.6%, 2.1%] 3
Regressions ❌
(secondary)
3.4% [2.1%, 4.8%] 7
Improvements ✅
(primary)
-1.2% [-1.4%, -1.0%] 2
Improvements ✅
(secondary)
-2.0% [-2.0%, -2.0%] 2
All ❌✅ (primary) 0.5% [-1.4%, 2.1%] 5

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 780.1s -> 781.811s (0.22%)
Artifact size: 332.11 MiB -> 332.08 MiB (-0.01%)

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. 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.