Skip to content

Allow the unstable attribute on foreign type#158233

Open
kantnero wants to merge 2 commits into
rust-lang:mainfrom
kantnero:allow-unstable-attr-on-target
Open

Allow the unstable attribute on foreign type#158233
kantnero wants to merge 2 commits into
rust-lang:mainfrom
kantnero:allow-unstable-attr-on-target

Conversation

@kantnero

@kantnero kantnero commented Jun 22, 2026

Copy link
Copy Markdown

While working the FnPtr trait in #156176 @carbotaniuman was trying to implement Code as an extern type but got an error as the current stability infrastructure does not allow unstable attribute on foreign type. #158200

This PR fixes that by allowing the unstable attribute on ForeignTy and adds test to verify.

@rustbot r? @JonathanBrouwer

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_attr_parsing

cc @jdonszelmann, @JonathanBrouwer

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) 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 Jun 22, 2026
@rustbot

rustbot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the pull request, and welcome! The Rust Project is excited to review your changes, and you should hear from @JonathanBrouwer (or someone else) some time within the next two weeks.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@rust-log-analyzer

This comment has been minimized.

Signed-off-by: Emmanuel Ugwu <emmanuelugwu121@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) 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.

4 participants