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

Better type_eq #2946

Merged
merged 4 commits into from
Feb 8, 2025
Merged

Better type_eq #2946

merged 4 commits into from
Feb 8, 2025

Conversation

addisoncrump
Copy link
Collaborator

Avoid dependence on std specialization. Fixes #2945.

@addisoncrump
Copy link
Collaborator Author

Autoformatter in IDE bungled the tomls, one sec.

Cargo.toml Outdated
@@ -120,6 +120,7 @@ strum = "0.26.3"
strum_macros = "0.26.4"
toml = "0.8.19" # For parsing the injections toml file
typed-builder = "0.20.0" # Implement the builder pattern at compiletime
typeid = "1" # Safe type_eq that doesn't rely on std specialization
Copy link
Member

Choose a reason for hiding this comment

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

can you please fully specify the version ("1.0.0")?
we moved a few months ago to this convention for other dependencies

@tokatoka tokatoka merged commit 83d8854 into main Feb 8, 2025
21 checks passed
@tokatoka tokatoka deleted the better-type_eq branch February 8, 2025 13:12
// will never be called, meaning that our Cell's content remains true.
let res = [W::<T, U>(&detected, PhantomData)].clone();
res[0].0.get()
typeid::of::<T>() == typeid::of::<U>()
Copy link
Member

Choose a reason for hiding this comment

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

Can we use this typeid for our SerdeAnyMap well?

riesentoaster pushed a commit to riesentoaster/LibAFL that referenced this pull request Feb 12, 2025
* typeid that doesn't suck

* actually, that's not const!

* format, move phantomdata to alloc feature block

* a

---------

Co-authored-by: Dongjia "toka" Zhang <[email protected]>
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.

Specialization hack might stop working in future rust versions.
4 participants