Skip to content

Conversation

Jamesbarford
Copy link
Contributor

Addresses a FIXME for displaying errors on method calls;

Before;

error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |               ^^^^^^^^^^^^^^^^^^^ cannot infer type

After;

error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |             ^ cannot infer type

@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

This PR modifies tests/ui/issues/. If this PR is adding new tests to tests/ui/issues/,
please refrain from doing so, and instead add it to more descriptive subdirectories.

@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 Oct 6, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 6, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
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

@Jamesbarford Jamesbarford force-pushed the fix/method-call-type-inference-error branch from 43436a8 to c682a70 Compare October 7, 2025 08:13
@chenyukang
Copy link
Member

could you please squash into one commit.

@Jamesbarford Jamesbarford force-pushed the fix/method-call-type-inference-error branch from c682a70 to 43f7eaa Compare October 7, 2025 08:51
@chenyukang
Copy link
Member

r? chenyukang @bors r+ rollup

@bors
Copy link
Collaborator

bors commented Oct 7, 2025

📌 Commit 43f7eaa has been approved by chenyukang

It is now in the queue for this repository.

@rustbot rustbot assigned chenyukang and unassigned davidtwco Oct 7, 2025
@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 7, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 7, 2025
…inference-error, r=chenyukang

Fix; correct placement of type inference error for method calls

Addresses a FIXME for displaying errors on method calls;

Before;
```
error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |               ^^^^^^^^^^^^^^^^^^^ cannot infer type
```

After;

```
error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |             ^ cannot infer type
```
bors added a commit that referenced this pull request Oct 7, 2025
Rollup of 7 pull requests

Successful merges:

 - #143900 ([rustdoc] Correctly handle `should_panic` doctest attribute and fix `--no-run` test flag on the 2024 edition)
 - #145608 (Prevent downstream `impl DerefMut for Pin<LocalType>`)
 - #146865 (kcfi: only reify trait methods when dyn-compatible)
 - #147390 (Use globals instead of metadata for std::autodiff)
 - #147398 (Fix; correct placement of type inference error for method calls)
 - #147431 (compiletest: Read the whole test file before parsing directives)
 - #147433 (Fix doc comment)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Oct 7, 2025
…inference-error, r=chenyukang

Fix; correct placement of type inference error for method calls

Addresses a FIXME for displaying errors on method calls;

Before;
```
error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |               ^^^^^^^^^^^^^^^^^^^ cannot infer type
```

After;

```
error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |             ^ cannot infer type
```
bors added a commit that referenced this pull request Oct 7, 2025
Rollup of 8 pull requests

Successful merges:

 - #145608 (Prevent downstream `impl DerefMut for Pin<LocalType>`)
 - #146865 (kcfi: only reify trait methods when dyn-compatible)
 - #147205 (Add a new `wasm32-wasip3` target to Rust)
 - #147390 (Use globals instead of metadata for std::autodiff)
 - #147398 (Fix; correct placement of type inference error for method calls)
 - #147422 (collect-license-metadata: Print a diff of the expected output)
 - #147431 (compiletest: Read the whole test file before parsing directives)
 - #147433 (Fix doc comment)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Oct 7, 2025
Rollup of 8 pull requests

Successful merges:

 - #145608 (Prevent downstream `impl DerefMut for Pin<LocalType>`)
 - #146865 (kcfi: only reify trait methods when dyn-compatible)
 - #147205 (Add a new `wasm32-wasip3` target to Rust)
 - #147390 (Use globals instead of metadata for std::autodiff)
 - #147398 (Fix; correct placement of type inference error for method calls)
 - #147422 (collect-license-metadata: Print a diff of the expected output)
 - #147431 (compiletest: Read the whole test file before parsing directives)
 - #147433 (Fix doc comment)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 7, 2025
…inference-error, r=chenyukang

Fix; correct placement of type inference error for method calls

Addresses a FIXME for displaying errors on method calls;

Before;
```
error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |               ^^^^^^^^^^^^^^^^^^^ cannot infer type
```

After;

```
error[E0282]: type annotations needed
  --> /<location>/src/main.rs:48:15
   |
## |             e.is_conversion_error();
   |             ^ cannot infer type
```
bors added a commit that referenced this pull request Oct 7, 2025
Rollup of 8 pull requests

Successful merges:

 - #146865 (kcfi: only reify trait methods when dyn-compatible)
 - #147205 (Add a new `wasm32-wasip3` target to Rust)
 - #147322 (cg_llvm: Consistently import `llvm::Type` and `llvm::Value`)
 - #147398 (Fix; correct placement of type inference error for method calls)
 - #147410 (Update `S-waiting-on-team` refs to new `S-waiting-on-{team}` labels)
 - #147422 (collect-license-metadata: Print a diff of the expected output)
 - #147431 (compiletest: Read the whole test file before parsing directives)
 - #147433 (Fix doc comment)

Failed merges:

 - #147390 (Use globals instead of metadata for std::autodiff)

r? `@ghost`
`@rustbot` modify labels: rollup
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