Skip to content

Remove special handling of obsolete impl Trait for .. syntax#121072

Closed
nnethercote wants to merge 1 commit intorust-lang:masterfrom
nnethercote:TyKind-Err-guar
Closed

Remove special handling of obsolete impl Trait for .. syntax#121072
nnethercote wants to merge 1 commit intorust-lang:masterfrom
nnethercote:TyKind-Err-guar

Conversation

@nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Feb 14, 2024

The ancient (pre-1.0) RFC 19 suggested using impl Trait for .. syntax for default traits. That was later changed to auto trait Trait {} syntax. The parser has special treatment for the .. syntax, suggesting the auto syntax.

Given that default traits have not be stabilized and the .. syntax is so old, the special case seems unnecessary, and it gets in the way of adding ErrorGuaranteed to TyKind::Err. This commit removes it and the tests.

r? @oli-obk

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants