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 11 pull requests #107314

Merged
merged 32 commits into from
Jan 26, 2023
Merged

Rollup of 11 pull requests #107314

merged 32 commits into from
Jan 26, 2023

Conversation

matthiaskrgr
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

mejrs and others added 30 commits January 12, 2023 00:11
Parse `-> Ty | OtherTy`.
Parse type ascription in top level patterns.
there were fixmes for this already

i am about to remove is_ptr (since callers need to properly distinguish
between pointers in different address spaces), so might as well do this
at the same time
...and remove it from `PointeeInfo`, which isn't meant for this.

There are still various places (marked with FIXMEs) that assume all pointers
have the same size and alignment. Fixing this requires parsing non-default
address spaces in the data layout string, which will be done in a followup.
Teach parser to understand fake anonymous enum syntax

Parse `Ty | OtherTy` in function argument and return types.
Parse type ascription in top level patterns.

Minimally address rust-lang#100741.
…i-obk

Custom MIR: Support binary and unary operations

Lower binary and unary operations directly to corresponding unchecked MIR
operations. Ultimately this might not be syntax we want, but it allows for
experimentation in the meantime.

r? ````@oli-obk```` ````@JakobDegen````
…, r=albertlarsan68

Print PID holding bootstrap build lock on Linux

Partially address rust-lang#107077

Parse `/proc/locks` to find the PID of the process which created the build directory lock
…ush, r=estebank

Fix escaping inference var ICE in `point_at_expr_source_of_inferred_type`

Fixes rust-lang#107158

`point_at_expr_source_of_inferred_type` uses `lookup_probe` to adjust the self type of a method receiver -- but that method returns inference variables from inside a probe. That means that the ty vars are no longer valid, so we can't use any infcx methods on them.

Also, pass some extra span info to hack a quick solution to bad labels, resulting in this diagnostic improvement:

```rust
fn example2() {
    let mut x = vec![1];
    x.push("");
}
```

```diff
  error[E0308]: mismatched types
   --> src/main.rs:5:12
    |
  5 |     x.push("");
    |       ---- ^^
    |       |    |
    |       |    expected integer, found `&str`
-   |       |    this is of type `&'static str`, which causes `x` to be inferred as `Vec<{integer}>`
    |       arguments to this method are incorrect
```
(since that "which causes `x` to be inferred as `Vec<{integer}>` part is wrong)

r? `@estebank`

(we really should make this code better in general, cc rust-lang#106590, but that's a bit bigger issue that needs some more thinking about)
…etrochenkov

suggest qualifying bare associated constants

Fixes rust-lang#107199.
abi: add AddressSpace field to Primitive::Pointer

...and remove it from `PointeeInfo`, which isn't meant for this.

There are still various places (marked with FIXMEs) that assume all pointers
have the same size and alignment. Fixing this requires parsing non-default
address spaces in the data layout string (and various other changes),
which will be done in a followup.
(That is, if it's actually worth it to support multiple different pointer sizes.
There is a lot of code that would be affected by that.)

Fixes rust-lang#106367

r? ``@oli-obk``
cc ``@Patryk27``
…edicates, r=lcnr

Implement ObjectSafe and WF in the new solver

r? ``@lcnr``
…and-generator, r=lcnr

Implement `Generator` and `Future` in the new solver

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

ICE in new solver if we see an inference variable

By construction, we do not expect to see any `ty::Infer(ty::TyVar(_))` inference types in the solver (we treat this as ambiguous, since we need to be able to structurally resolve the self type at least one layer to assemble candidates for it). Additionally, since we're doing no freshening, we also don't expect to see any fresh vars of any kind in the solver.

Let's make that an ICE so we can catch any mistakes.

When rust-lang#107282 lands, we should also ICE there too if we see a non-int/float infer.

r? `@lcnr`
…bot, r=joshtriplett

Add Style Team Triagebot config
@rustbot rustbot added A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) rollup A PR which is a rollup labels Jan 26, 2023
@matthiaskrgr
Copy link
Member Author

@bors r+ rollup=never p=11

@bors
Copy link
Contributor

bors commented Jan 26, 2023

📌 Commit 267d626 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 Jan 26, 2023
@bors
Copy link
Contributor

bors commented Jan 26, 2023

⌛ Testing commit 267d626 with merge e187f88...

@bors
Copy link
Contributor

bors commented Jan 26, 2023

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 26, 2023
@bors bors merged commit e187f88 into rust-lang:master Jan 26, 2023
@rustbot rustbot added this to the 1.69.0 milestone Jan 26, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e187f88): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
0.6% [0.4%, 0.7%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

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)
- - 0
Regressions ❌
(secondary)
2.5% [1.6%, 3.5%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.3% [-1.5%, -1.2%] 4
All ❌✅ (primary) - - 0

Cycles

Results

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)
- - 0
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Feb 9, 2023
…iaskrgr

Rollup of 11 pull requests

Successful merges:

 - rust-lang#106407 (Improve proc macro attribute diagnostics)
 - rust-lang#106960 (Teach parser to understand fake anonymous enum syntax)
 - rust-lang#107085 (Custom MIR: Support binary and unary operations)
 - rust-lang#107086 (Print PID holding bootstrap build lock on Linux)
 - rust-lang#107175 (Fix escaping inference var ICE in `point_at_expr_source_of_inferred_type`)
 - rust-lang#107204 (suggest qualifying bare associated constants)
 - rust-lang#107248 (abi: add AddressSpace field to Primitive::Pointer )
 - rust-lang#107272 (Implement ObjectSafe and WF in the new solver)
 - rust-lang#107285 (Implement `Generator` and `Future` in the new solver)
 - rust-lang#107286 (ICE in new solver if we see an inference variable)
 - rust-lang#107313 (Add Style Team Triagebot config)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@matthiaskrgr matthiaskrgr deleted the rollup-j40lnlj branch March 16, 2024 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. 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.