mutants-0.0.3/.cargo_vcs_info.json0000644000000001530000000000100125260ustar { "git": { "sha1": "9685de346012afb9c379432eaf9c6960e22185df" }, "path_in_vcs": "mutants_attrs" }mutants-0.0.3/.gitignore000064400000000000000000000000230072674642500133320ustar 00000000000000target/ Cargo.lock mutants-0.0.3/Cargo.toml0000644000000013440000000000100105270ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "mutants" version = "0.0.3" description = "Decorator attributes to be used with cargo-mutants" categories = ["development-tools::testing"] license = "MIT" repository = "https://github.com/sourcefrog/cargo-mutants" [lib] proc-macro = true mutants-0.0.3/Cargo.toml.orig000064400000000000000000000004210072674642500142330ustar 00000000000000[package] name = "mutants" version = "0.0.3" edition = "2018" license = "MIT" description = "Decorator attributes to be used with cargo-mutants" repository = "https://github.com/sourcefrog/cargo-mutants" categories = ["development-tools::testing"] [lib] proc-macro = true mutants-0.0.3/README.md000064400000000000000000000005130072674642500126250ustar 00000000000000# cargo-mutants `#[mutants]` attrs [![crates.io](https://img.shields.io/crates/v/mutants.svg)](https://crates.io/crates/mutants) This small crate defines attributes that can be attached into Rust code to guide `cargo-mutants`. The primary documentation is in the [`cargo-mutants` crate](https://crates.io/crates/cargo-mutants). mutants-0.0.3/src/lib.rs000064400000000000000000000015610072674642500132550ustar 00000000000000// Copyright 2021 Martin Pool //! Attribute macros to control how [cargo-mutants](https://crates.io/crates/cargo-mutants) mutates code. //! //! For example, a function that is difficult to test, or has disruptive effects when mutated, can //! be marked with [macro@skip]. //! //! # Changelog //! //! ## 0.0.3 //! //! * Reset edition to 2018 for broader compatibility. use proc_macro::TokenStream; /// `cargo mutants` should not mutate functions marked with this attribute. /// /// This can currently only be applied to functions, not modules or other syntactic constructs. /// /// ``` /// #[mutants::skip] /// pub fn some_difficult_function() { /// // ... /// } /// ``` /// /// This is a no-op during compilation, but is seen by cargo-mutants as it processes the source. #[proc_macro_attribute] pub fn skip(_attr: TokenStream, item: TokenStream) -> TokenStream { item }