-
Notifications
You must be signed in to change notification settings - Fork 71
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 Linebender lint set v2. #402
Conversation
|
||
#[cfg(not(any(feature = "std", feature = "libm")))] | ||
compile_error!("kurbo requires either the `std` or `libm` feature"); | ||
|
||
// Suppress the unused_crate_dependencies lint when both std and libm are specified. | ||
#[cfg(all(feature = "std", feature = "libm"))] |
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.
but this shouldn't happen?
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.
If by this you mean:
- both
std
andlibm
together -- well, it easily can, e.g. by using--all-features
libm
being unused when thelibm
feature is specified -- well,std
overrides it so it won't be used
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.
But the case of --all-features
will be a compile error because of the lines directly above this?
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.
I'm not trying to be difficult, just want to understand and I'm kind of dumb at the moment.
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.
No it won't be a compiler error. Our custom compiler error will trigger only when neither std
nor libm
is specified. At least one of those needs to be set. You can achieve that error with just --no-default-features
.
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.
I am so brain dead right now. Going to sleep in shame and infamy.
Actually satisfying a good chunk of these lints is deferred and they are in an
allow
block inlib.rs
.Still, I did satisfy some of the lints.
The
rand
methodgen
has to be a rawr#gen
until they publish a new version. They have that method renamed inmaster
.