Skip to content

Rust: expand attribute macros on AssocItem #19823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

aibaars
Copy link
Contributor

@aibaars aibaars commented Jun 19, 2025

No description provided.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jun 19, 2025
@aibaars aibaars force-pushed the aibaars/rust-expand-assoc-items branch 3 times, most recently from 705f5dc to e69d76c Compare June 20, 2025 09:27
@@ -0,0 +1,3 @@
qltest_cargo_check: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the default, inherited from the toplevel options.yml, so no need to specify it

Comment on lines 81 to 89

#[ctor::ctor]
fn foo_ctor() {}

#[cfg(any(target_os = "linux", not(target_os = "linux")))]
fn bar() {}

#[cfg(all(target_os = "linux", not(target_os = "linux")))]
fn baz() {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is really needed or relevant

  • the ctor::ctor case is covered by our custom macro
  • the cfg cases aren't even macros

So I'd revert this and remove the options.yml file. A test without external dependencies is also a quicker test.

}
};
($($_:tt)*) => {};
}

impl From<crate::trap::Label<generated::AssocItem>> for crate::trap::Label<generated::Item> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please let's put in a TODO that this is temporary while we look for a solution going through the generated schema

@aibaars aibaars force-pushed the aibaars/rust-expand-assoc-items branch from e5ca1eb to 2acce96 Compare June 20, 2025 11:26
@aibaars aibaars marked this pull request as ready for review June 20, 2025 11:26
@aibaars aibaars requested a review from a team as a code owner June 20, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants