Skip to content

Implement semantic analysis for named fn trait params - #162634

Open
JonathanBrouwer wants to merge 8 commits into
rust-lang:mainfrom
JonathanBrouwer:named-fn-trait-params-semantics
Open

Implement semantic analysis for named fn trait params#162634
JonathanBrouwer wants to merge 8 commits into
rust-lang:mainfrom
JonathanBrouwer:named-fn-trait-params-semantics

Conversation

@JonathanBrouwer

@JonathanBrouwer JonathanBrouwer commented Sep 11, 2026

Copy link
Copy Markdown
Member

This PR can be reviewed commit by commit.
Every commit passes uitests individually.

The goal of this PR is to make the semantic of named fn trait parameters match those of fn pointers, which is what was decided on the RFC: rust-lang/rfcs#3955.
This is achieved, which can be observed by the fact that the output of the named-fn-trait-params.rs test matches that of fn-ptr-pattern.rs.

This PR also marks the feature as complete.

Tracking issue: #158499

@JonathanBrouwer JonathanBrouwer added the F-named_fn_trait_parameters `#![feature(named_fn_trait_parameters)]` label Sep 11, 2026
@rustbot

rustbot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

The parser was modified, potentially altering the grammar of (stable) Rust
which would be a breaking change.

cc @fmease

@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 Sep 11, 2026
@rustbot

rustbot commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

r? @folkertdev

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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 76 candidates
  • Random selection from 21 candidates

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

Labels

F-named_fn_trait_parameters `#![feature(named_fn_trait_parameters)]` 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants