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

Use short ty string for binop and unop errors #136315

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

estebank
Copy link
Contributor

@estebank estebank commented Jan 30, 2025

error[E0369]: cannot add `(..., ..., ..., ...)` to `(..., ..., ..., ...)`
  --> $DIR/binop.rs:10:7
   |
LL |     x + x;
   |     - ^ - (..., ..., ..., ...)
   |     |
   |     (..., ..., ..., ...)
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
error[E0600]: cannot apply unary operator `!` to type `(..., ..., ..., ...)`
  --> $DIR/binop.rs:14:5
   |
LL |     !x;
   |     ^^ cannot apply unary operator `!`
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console

CC #135919.

@rustbot
Copy link
Collaborator

rustbot commented Jan 30, 2025

r? @SparrowLii

rustbot has assigned @SparrowLii.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 30, 2025
@estebank
Copy link
Contributor Author

#136328 will conflict with this PR.

@theemathas
Copy link
Contributor

What about unary operators?

@rustbot
Copy link
Collaborator

rustbot commented Jan 31, 2025

Some changes occurred in need_type_info.rs

cc @lcnr

Some changes occurred in match checking

cc @Nadrieril

@estebank
Copy link
Contributor Author

Rebased on top of #136328, so it will have to wait for that PR.

Added handling for unops as well.

@estebank estebank changed the title Use short ty string for binop errors Use short ty string for binop and unop errors Jan 31, 2025
@estebank estebank added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Jan 31, 2025
@bors
Copy link
Contributor

bors commented Feb 2, 2025

☔ The latest upstream changes (presumably #136433) made this pull request unmergeable. Please resolve the merge conflicts.

```
error[E0369]: cannot add `((..., ..., ..., ...), ..., ..., ...)` to `((..., ..., ..., ...), ..., ..., ...)`
  --> $DIR/binop.rs:9:7
   |
LL |     x + x;
   |     - ^ - ((..., ..., ..., ...), ..., ..., ...)
   |     |
   |     ((..., ..., ..., ...), ..., ..., ...)
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```

```
error[E0600]: cannot apply unary operator `!` to type `(..., ..., ..., ...)`
  --> $DIR/binop.rs:14:5
   |
LL |     !x;
   |     ^^ cannot apply unary operator `!`
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```

CC rust-lang#135919.
@estebank estebank removed the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Feb 2, 2025
Copy link
Member

@SparrowLii SparrowLii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense! And it just changes the diagnostic, LGTM

@bors r+

@SparrowLii
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Feb 6, 2025

📌 Commit 382caf9 has been approved by SparrowLii

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 Feb 6, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Feb 6, 2025
Use short ty string for binop and unop errors

```
error[E0369]: cannot add `(..., ..., ..., ...)` to `(..., ..., ..., ...)`
  --> $DIR/binop.rs:10:7
   |
LL |     x + x;
   |     - ^ - (..., ..., ..., ...)
   |     |
   |     (..., ..., ..., ...)
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```
```
error[E0600]: cannot apply unary operator `!` to type `(..., ..., ..., ...)`
  --> $DIR/binop.rs:14:5
   |
LL |     !x;
   |     ^^ cannot apply unary operator `!`
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```

CC rust-lang#135919.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…kingjubilee

Rollup of 9 pull requests

Successful merges:

 - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`)
 - rust-lang#136193 (Implement pattern type ffi checks)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136530 (Implement `x perf` directly in bootstrap)
 - rust-lang#136580 (Couple of changes to run rustc in miri)
 - rust-lang#136589 (Enable "jump to def" feature on rustc docs)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-gnu-debug
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-gnu-debug
@bors bors merged commit c2c4d5e into rust-lang:master Feb 6, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 6, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
…kingjubilee

Rollup of 9 pull requests

Successful merges:

 - rust-lang#135439 (Make `-O` mean `OptLevel::Aggressive`)
 - rust-lang#136193 (Implement pattern type ffi checks)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136530 (Implement `x perf` directly in bootstrap)
 - rust-lang#136580 (Couple of changes to run rustc in miri)
 - rust-lang#136589 (Enable "jump to def" feature on rustc docs)

r? `@ghost`
`@rustbot` modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 6, 2025
Rollup merge of rust-lang#136315 - estebank:long-ty-binop, r=SparrowLii

Use short ty string for binop and unop errors

```
error[E0369]: cannot add `(..., ..., ..., ...)` to `(..., ..., ..., ...)`
  --> $DIR/binop.rs:10:7
   |
LL |     x + x;
   |     - ^ - (..., ..., ..., ...)
   |     |
   |     (..., ..., ..., ...)
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```
```
error[E0600]: cannot apply unary operator `!` to type `(..., ..., ..., ...)`
  --> $DIR/binop.rs:14:5
   |
LL |     !x;
   |     ^^ cannot apply unary operator `!`
   |
   = note: the full name for the type has been written to '$TEST_BUILD_DIR/$FILE.long-type-hash.txt'
   = note: consider using `--verbose` to print the full type name to the console
```

CC rust-lang#135919.
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 20, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#136073 (Always compute coroutine layout for eagerly emitting recursive layout errors)
 - rust-lang#136235 (Pretty print pattern type values with transmute if they don't satisfy their pattern)
 - rust-lang#136311 (Ensure that we never try to monomorphize the upcasting or vtable calls of impossible dyn types)
 - rust-lang#136315 (Use short ty string for binop and unop errors)
 - rust-lang#136393 (Fix accidentally not emitting overflowing literals lints anymore in patterns)
 - rust-lang#136435 (Simplify some code for lowering THIR patterns)
 - rust-lang#136630 (Change two std process tests to not output to std{out,err}, and fix test suite stat reset in bootstrap CI test rendering)

r? `@ghost`
`@rustbot` modify labels: rollup

try-job: aarch64-gnu-debug
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants