We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
use std::mem; trait Mirror { type Image; } impl<T> Mirror for T { type Image = T; } struct S1<T>(<T as Mirror>::Image); struct S2<T>(T); fn main() { println!("with: {}", mem::size_of::<Option<S1<&u8>>>()); println!("without: {}", mem::size_of::<Option<S2<&u8>>>()); }
Nullable field optimization should be triggered in both cases
with: 8 without: 16
The text was updated successfully, but these errors were encountered:
I think you swapped the results by accident
Sorry, something went wrong.
It looks like the issue is just a couple missing calls to monomorphize::normalize_associated_type; I'm working on a fix.
monomorphize::normalize_associated_type
Fix bug with associated types and nullable pointer optimization.
cab47a3
Fixes rust-lang#27532.
I will fix this with my ADTDef patch (coming real soon now) - I should have made that clearer.
c533f96
arielb1
No branches or pull requests
STR
Expected Result
Nullable field optimization should be triggered in both cases
Result
The text was updated successfully, but these errors were encountered: