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

BuildHasher is no longer object safe in 1.55 #87991

Closed
Tracked by #87749
tmandry opened this issue Aug 12, 2021 · 1 comment · Fixed by #88031
Closed
Tracked by #87749

BuildHasher is no longer object safe in 1.55 #87991

tmandry opened this issue Aug 12, 2021 · 1 comment · Fixed by #88031
Labels
C-bug Category: This is a bug. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Milestone

Comments

@tmandry
Copy link
Member

tmandry commented Aug 12, 2021

From 1.55 crater run #87749, log:

[INFO] [stdout] error[E0038]: the trait `BuildHasher` cannot be made into an object
[INFO] [stdout]    --> src/pcsa/pcsa.rs:19:27
[INFO] [stdout]     |
[INFO] [stdout] 19  |     pub hasher:       Box<dyn BuildHasher<Hasher = HasherType>>,
[INFO] [stdout]     |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `BuildHasher` cannot be made into an object
[INFO] [stdout]     |
[INFO] [stdout] note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>

#86151 added a generic method to the trait, making it no longer object safe.

This only caused one crate in crater to fail, and the source for that crate seems to have been removed from github. Still, I don't think this is technically allowed breakage.

@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged +T-libs +I-nominated

cc @scottmcm

@tmandry tmandry added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels Aug 12, 2021
@rustbot rustbot added I-nominated regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-untriaged Untriaged performance or correctness regression. and removed regression-untriaged Untriaged performance or correctness regression. I-nominated regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Aug 12, 2021
@tmandry tmandry added I-nominated regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed regression-untriaged Untriaged performance or correctness regression. labels Aug 12, 2021
@thomcc
Copy link
Member

thomcc commented Aug 12, 2021

I think this just needs a where Self: Sized on that method, no? Probably was just overlooked during review.

@m-ou-se m-ou-se removed I-nominated I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Aug 18, 2021
@m-ou-se m-ou-se added this to the 1.55.0 milestone Aug 18, 2021
@tmandry tmandry mentioned this issue Aug 19, 2021
7 tasks
@bors bors closed this as completed in 9b7c771 Aug 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants