Skip to content
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

Switch to using bitflags for FSA #156

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

jacob-hughes
Copy link
Collaborator

There are now various combinations of possible checks that FSA can perform which can change dynamically based on previously identified errors (e.g. the discovery of a thread-local means that we no longer check for other things). By passing this around as bit flags it becomes easier to write out the conditional logic.

if self.visited_fns.contains(&instance) {
// We've already checked this function. Ignore it!
continue;
}
self.visited_fns.insert(instance);
// if instance.def.get_attrs(self.ecx.tcx, sym::rustc_fsa_safe_fn).next().is_some() {
Copy link
Member

Choose a reason for hiding this comment

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

Commented code. Please force push an update.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops. Force-pushed an update

@ltratt ltratt added this pull request to the merge queue Jan 31, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 31, 2025
@jacob-hughes
Copy link
Collaborator Author

Ah that's annoying. These test failures are fixed in my next PR. I only broke it out like this because it was becoming unmanagable. Are you ok if I #ignore them and then immediately fix them in the next one?

@ltratt
Copy link
Member

ltratt commented Jan 31, 2025

Can you just push the necessary commits in here?

@jacob-hughes
Copy link
Collaborator Author

I can, but that branch (the FSA intrinsic support) is currently failing 2 of the auto-trait UI tests on bootstrap stage 2. I can push it as part of this PR once I've got them working.

@ltratt
Copy link
Member

ltratt commented Jan 31, 2025

OK, then please force push an update here that #ignore tests.

There are now various combinations of possible checks that FSA can
perform which can change dynamically based on previously identified
errors (e.g. the discovery of a thread-local means that we no longer
check for other things). By passing this around as bit flags it becomes
easier to write out the conditional logic.
@jacob-hughes
Copy link
Collaborator Author

Force pushed an update

@ltratt ltratt added this pull request to the merge queue Jan 31, 2025
Merged via the queue into softdevteam:master with commit d8ba0a0 Jan 31, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants