-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Forbid object types which are not object safe #19482
Comments
backwards incompatible |
True but I think it can only break dead code -- you can't produce instances of those types. Seems like this doesn't have to be fixed for 1.0. |
P-low. Seems like it won't break any useful code. Justabug? |
(That is, it's probably the kind of bug we can fix at some point. Not that I don't want to fix it.) |
I think this would also break public functions that take non-object-safe trait objects as parameters (e.g., |
Traige: we did this, didn't we? |
Looks like #21953 is a duplicate which was closed |
Is |
@jonas-schievink yup! |
@bluss |
We currently only check for object safety when coercing a concrete object to a trait object. We should prevent the programmer writing object types which are not object safe.
The text was updated successfully, but these errors were encountered: