Skip to content

Conversation

@ian-p-cooke
Copy link

fixes #1977 as of rust-lang/rust#74060 is available since Rust 1.47

Should I leave the existing tests as-is but target 1.40 as I did (showing I haven't broken anything for previous target) or should I update the expectations?

is issue-648-derive-debug-with-padding correct if targeting 1.47? if I target 1.47 it now derives Debug/Hash but I don't know if it should or not.

@highfive
Copy link

highfive commented Jul 8, 2021

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

@ian-p-cooke
Copy link
Author

this would close #2041 as well.

@emilio
Copy link
Contributor

emilio commented Jul 16, 2021

Should I leave the existing tests as-is but target 1.40 as I did (showing I haven't broken anything for previous target) or should I update the expectations?

Either way is fine. This looks great to me, thanks! I'll merge asap if CI is green (and if it isn't I can fix it up, I'm really sorry for the review lag, was coming back from vacation, so $realjob needed more time :))

@emilio
Copy link
Contributor

emilio commented Jul 16, 2021

Gah, only rustfmt failed, that's unfortunate. Will merge this manually with that fixup.

@emilio
Copy link
Contributor

emilio commented Jul 16, 2021

I'm curious about the Default limitation though, why is that?

@emilio emilio closed this in a380678 Jul 16, 2021
@ian-p-cooke
Copy link
Author

I'm curious about the Default limitation though, why is that?

i don't know - i thought that was weird myself. I thought i was doing something wrong at first when it didn't work. Default is documented though as only working up to length 32: https://doc.rust-lang.org/std/primitive.array.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Derive Debug is not generated for structs with large array fields (len() > 32) (need to add new rustc target)

3 participants