-
Notifications
You must be signed in to change notification settings - Fork 109
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
Add read-core feature gate #596
Conversation
It seems that #[derive(Debug)]
struct Foo<#[cfg(foo)] T, #[cfg(not(foo))] T>(T); only works in Rust 1.48+. However it doesn't seem to be mentioned in the release notes. |
Bisection shows that it's changed in rust-lang/rust#76010, which fixes rust-lang/rust#75930. I could manually implement these traits, or perhaps we can bump MSRV to 1.48. |
When does the type checking for type parameters occur? It seems defaulting to Otherwise, 1.48 is okay, it's getting close to a year old. |
It seems that the checking is lazy if the bound depends on generic parameter: trait Bar<U> {}
struct Foo<U, T: Bar<U> = ()>(U, T);
//^ this is lazy, since () may implement Bar<U> for some U, but not necessary all Us and this is eagerly checked: trait Bar {}
struct Foo<T: Bar = ()>(T);
//^ this is eager, so will raise an error |
cfg-gating type params only work in Rust 1.48+
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Does this all look good for a new release now? |
No PRs left to submit from my side! |
Fix #581