Closed bitemyapp closed 5 years ago
Oh wow, I just noticed the build failure. I tested this with nightly or so I thought! I will try to figure out what has happened.
From my local build:
[ callen@chalcis ~/work/github/intrusive-rs bitemyapp/clippy-cleanup O ]
$ cargo build
Compiling intrusive-collections v0.7.4 (/home/callen/work/github/intrusive-rs)
Finished dev [unoptimized + debuginfo] target(s) in 1.20s
[ callen@chalcis ~/work/github/intrusive-rs bitemyapp/clippy-cleanup O ]
$ rustc --version
rustc 1.30.0-nightly (bb0896af1 2018-09-29)
From TravisCI:
$ rustc --version
rustc 1.30.0-nightly (bb0896af1 2018-09-29)
To test the nightly features you need to add --features nightly
to the build command-line.
@Amanieu thank you, I have the repro now! Is there anywhere I could read about the cause of this type error with the nightly features turned on?
unsafe_ref.rs
has has different code depending on whether the nightly
feature is enabled. You just forgot to update the nightly implementation.
@Amanieu right-o, serves me for coding in the wee hours. Thank you!
Please also fix my comments in the code. Some clippy warnings are too strict and should be explicitly disabled for certain functions.
You can ignore the test failure on nightly. This seems to be a rustc bug, I will look into it.
Gonna kill this PR and restart from scratch if I reprise pursuing a clippy purge. Thank you @Amanieu!
Thanks for publishing this library!
This reduces the clippy warnings to these two:
This is tough. Changing the interface would probably be best long term, but this patch seemed a lesser evil than unnecessary ownership of
Self
in the relevant methods. I cleaned up a couple other clippy warnings. Apologies if this is unwelcome or not a good use of your time. I lint libraries I am learning from and sometimes PR what I changed.