-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add missing gc feature gates
#12074
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
Add missing gc feature gates
#12074
Conversation
| /// this module. | ||
| #[cfg(any(feature = "gc", feature = "debug"))] | ||
| #[cfg(feature = "gc")] | ||
| pub(crate) fn text_offset(&self, pc: usize) -> u32 { | ||
| u32::try_from(pc - self.inner.module.text().as_ptr() as usize).unwrap() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is only called when the gc feature is enabled, so I removed the debug gate (it produced a warning). But maybe this was intentional as it may be needed with the debug feature in the future. Should I revert this back? The PR that introduced the function is #11769
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah that's ok, we basically just frob things until warnings and such go away
alexcrichton
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Could you also extend the list of checks here with the combination that didn't build? (to help ensure no future regressions)
| /// this module. | ||
| #[cfg(any(feature = "gc", feature = "debug"))] | ||
| #[cfg(feature = "gc")] | ||
| pub(crate) fn text_offset(&self, pc: usize) -> u32 { | ||
| u32::try_from(pc - self.inner.module.text().as_ptr() as usize).unwrap() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah that's ok, we basically just frob things until warnings and such go away
* add more `gc` feature gates * test debug gc feature combination
* add more `gc` feature gates * test debug gc feature combination Co-authored-by: primoly <168267431+primoly@users.noreply.github.com>
Add missing
gcfeature gates.Fixes #12071