Closed
Description
I'm running clippy v0.0.115
This code
pub const ART_VALID_STR: &'static str = "(REQ|SPC|RSK|TST)(-[A-Z0-9_-]*[A-Z0-9_])?";
lazy_static!{
// must start with artifact type, followed by "-", followed by at least 1 valid character
// cannot end with "-"
pub static ref ART_VALID: Regex = Regex::new(
&format!("^{}$", ART_VALID_STR)).unwrap();
pub static ref PARENT_PATH: PathBuf = PathBuf::from("PARENT");
pub static ref INCREMENTING_ID: AtomicUsize = AtomicUsize::new(0);
}
Is generating this error repeatedely:
warning: `0 as *const _` detected. Consider using `ptr::null()`
--> src/core/types.rs:26:1
|
26 | lazy_static!{
| _^ starting here...
27 | | // must start with artifact type, followed by "-", followed by at least 1 valid character
28 | | // cannot end with "-"
29 | | pub static ref ART_VALID: Regex = Regex::new(
30 | | &format!("^{}$", ART_VALID_STR)).unwrap();
31 | | pub static ref PARENT_PATH: PathBuf = PathBuf::from("PARENT");
32 | | pub static ref INCREMENTING_ID: AtomicUsize = AtomicUsize::new(0);
33 | | }
| |_^ ...ending here
|
= note: #[warn(zero_ptr)] on by default
= help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#zero_ptr
= note: this error originates in a macro outside of the current crate
This never happened before. All I did was update clippy to the latest version.