Skip to content

Fix range expr expected type suggest#20933

Closed
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:range-expr-suggest
Closed

Fix range expr expected type suggest#20933
A4-Tacks wants to merge 1 commit intorust-lang:masterfrom
A4-Tacks:range-expr-suggest

Conversation

@A4-Tacks
Copy link
Copy Markdown
Member

Example

enum State { Stop }
fn bar(x: core::ops::Range<State>) {}
fn foo() {
    bar(State::Stop..$0)
}

Before this PR

std::ops::Range {…}~ std::ops::Range { start: Idx, end: Idx }

After this PR

State::Stop~ State::Stop

Example
---
```rust
enum State { Stop }
fn bar(x: core::ops::Range<State>) {}
fn foo() {
    bar(State::Stop..$0)
}
```

**Before this PR**

```text
std::ops::Range {…}~ std::ops::Range { start: Idx, end: Idx }
```

**After this PR**

```text
State::Stop~ State::Stop
```
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 29, 2025
@A4-Tacks A4-Tacks mentioned this pull request Nov 19, 2025
41 tasks
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 20, 2026

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

@ChayimFriedman2
Copy link
Copy Markdown
Contributor

I'm closing this since we established than we need a more comprehensive approach for inferring the expected type than replicating inference.

@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 22, 2026
@A4-Tacks A4-Tacks deleted the range-expr-suggest branch March 25, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants