notes.rs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ///Always use these, in any rust source file (see 'rustc _Whelp' for all):
  2. #![forbid(non_shorthand_field_patterns)]
  3. #![warn(dead_code)]
  4. ///(maybe change to forbid, in real rust source files!)
  5. #![forbid(unsafe_code)]
  6. #![warn(missing_docs)]
  7. ///don't yet know how to add crate docs, so this will warn at the top of the file! (change to allow, for now)
  8. ///crate docs with: //!
  9. #![warn(missing_debug_implementations)]
  10. #![warn(missing_copy_implementations)]
  11. #![warn(box_pointers)]
  12. #![warn(trivial_casts)]
  13. #![warn(trivial_numeric_casts)]
  14. #![warn(unstable_features)]
  15. #![warn(unused_extern_crates)]
  16. #![warn(unused_import_braces)]
  17. #![warn(unused_qualifications)]
  18. #![warn(variant_size_differences)]
  19. ///Use clippy plugin: https://github.com/Manishearth/rust-clippy
  20. ///Add to Cargo.toml
  21. /*
  22. [dependencies]
  23. clippy = "*"
  24. */
  25. ///Add to your .rs file:
  26. #![feature(plugin)]
  27. #![plugin(clippy)]
  28. #![deny(clippy)]
  29. #![deny(clippy_pedantic)]
  30. //#![deny(shadow_unrelated)] //this shouldn't be needed if you also specify the clippy_pedantic group!