The answer was of course:
pub struct Error(pub String);
But the error message really didn't help much. I really wanted this error message to say something like "error[E0603]: tuple struct Error is marked pub but has a private member, Maybe the member should be marked 'pub' as well?"
Agree / Disagree? I'm happy to go compiler diving to try and improve the error message, but thought I should get consensus on what a better error message might look like first.
It's referring to the constructor of the struct, which I thought had a correct error message in earlier rust builds.
Either the compiler internals know the correct error - E0451 and it's wrongly communicated to the user.
Or someone wrongly implemented the procedure to find out the correct error for the provided code.
I couldn't say which one it is, but I have noticed the same issue once before where the compiler returns a more general message instead.