-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Struct constness/mutability needs to be represented in metadata #3177
Comments
Seems like this bug even manifests with non-cross-crate structs:
This seems like it shouldn't compile, as |
@bblum is this still an issue? |
No, it isn't. The test has bitrotted slightly and should now be:
Anyone who updates it should close. |
Actually, yes it is. The cant-nest-rw-arcs test seems to work fine, but the OP test case is still broken, not even cross-crate. It correctly falis to compile if the struct has a mutable thing inside ( I don't know why the mutable tag works for RWARC but not for this.
|
The |
DAMMIT |
…ace-leading-ws Format brace-delimited macros with a space after the name
…Jung libc-misc test freebsd fixes attempt
Dependency upgrade resulting from `cargo update`. --------- Co-authored-by: tautschnig <[email protected]> Co-authored-by: Zyad Hassan <[email protected]>
Whether or not a struct is const is forgotten across crate boundaries. The compiler should reject this program:
const.rs:
nonconst.rc:
nonconst.rs:
If you change the type
nonconst
to be e.g. an old-style record type, the program is correctly rejected.The text was updated successfully, but these errors were encountered: