llogiq/mutagen

error[E0425]: cannot find value `__self_mutated` in this scope

bbigras opened this issue · 1 comments

mutagen dfc844f
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.28.0-nightly (e3bf634e0 2018-06-28)

This builds without the #[cfg_attr(test, mutate)].

enum One {
    Value(f64),
}

impl One {
    #[cfg_attr(test, mutate)]
    fn something(&self) -> f64 {
        match self {
            One::Value(v) => *v,
        }
    }
}
error[E0425]: cannot find value `__self_mutated` in this scope
error[E0614]: type `f64` cannot be dereferenced
   --> src/main.rs:601:17
    |
601 |                 *v
    |                 ^^
error: aborting due to 2 previous errors

I'm having a similar issue. My error message doesn't give me any context about a particular line, but I get the same error message:

polarization!$ cargo test --verbose                   1.63s [master●] ~/Projects/polarization
    Blocking waiting for file lock on build directory
       Fresh version_check v0.1.4
       Fresh libc v0.2.43
       Fresh rand_core v0.2.1
       Fresh libm v0.1.2
       Fresh remove_dir_all v0.5.1
       Fresh rawpointer v0.1.0
       Fresh ucd-util v0.1.1
       Fresh quick-error v1.2.2
       Fresh fnv v1.0.6
       Fresh bit-vec v0.5.0
       Fresh bitflags v1.0.4
       Fresh byteorder v1.2.4
       Fresh assert_approx_eq v1.0.0
       Fresh wait-timeout v0.1.5
       Fresh rand v0.5.5
       Fresh regex-syntax v0.6.2
       Fresh bit-set v0.5.0
       Fresh num-traits v0.2.5
       Fresh typenum v1.10.0
       Fresh matrixmultiply v0.1.14
       Fresh tempfile v3.0.3
       Fresh num-integer v0.1.39
       Fresh approx v0.3.0
       Fresh num-complex v0.2.0
       Fresh generic-array v0.11.1
       Fresh lazy_static v1.1.0
       Fresh rusty-fork v0.2.0
       Fresh num-bigint v0.2.0
       Fresh num-iter v0.1.37
       Fresh alga v0.7.1
       Fresh mutagen v0.1.2
       Fresh proptest v0.8.5
       Fresh num-rational v0.2.1
       Fresh nalgebra v0.16.0
       Fresh mutagen-plugin v0.1.2
       Fresh num v0.2.0
   Compiling polarization v0.1.4 (/Users/zmitchell/Projects/polarization)
     Running `rustc --crate-name polarization src/lib.rs --color always --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=64feaf08295cd368 -C extra-filename=-64feaf08295cd368 --out-dir /Users/zmitchell/Projects/polarization/target/debug/deps -C incremental=/Users/zmitchell/Projects/polarization/target/debug/incremental -L dependency=/Users/zmitchell/Projects/polarization/target/debug/deps --extern nalgebra=/Users/zmitchell/Projects/polarization/target/debug/deps/libnalgebra-086f3aad071658ec.rlib --extern num=/Users/zmitchell/Projects/polarization/target/debug/deps/libnum-823b832c5027f926.rlib`
     Running `rustc --crate-name polarization src/lib.rs --color always --emit=dep-info,link -C debuginfo=2 --test -C metadata=f57dbeeb7deeba25 -C extra-filename=-f57dbeeb7deeba25 --out-dir /Users/zmitchell/Projects/polarization/target/debug/deps -C incremental=/Users/zmitchell/Projects/polarization/target/debug/incremental -L dependency=/Users/zmitchell/Projects/polarization/target/debug/deps --extern assert_approx_eq=/Users/zmitchell/Projects/polarization/target/debug/deps/libassert_approx_eq-1736b77f716e3fc0.rlib --extern mutagen=/Users/zmitchell/Projects/polarization/target/debug/deps/libmutagen-4cfddce55057edc7.rlib --extern mutagen_plugin=/Users/zmitchell/Projects/polarization/target/debug/deps/libmutagen_plugin-20d90636d35182d5.dylib --extern nalgebra=/Users/zmitchell/Projects/polarization/target/debug/deps/libnalgebra-086f3aad071658ec.rlib --extern num=/Users/zmitchell/Projects/polarization/target/debug/deps/libnum-823b832c5027f926.rlib --extern proptest=/Users/zmitchell/Projects/polarization/target/debug/deps/libproptest-8e3fa95ae9deecc8.rlib`
error[E0425]: cannot find value `__self_mutated` in this scope

error: aborting due to previous error

For more information about this error, try `rustc --explain E0425`.
error: Could not compile `polarization`.

Caused by:
  process didn't exit successfully: `rustc --crate-name polarization src/lib.rs --color always --emit=dep-info,link -C debuginfo=2 --test -C metadata=f57dbeeb7deeba25 -C extra-filename=-f57dbeeb7deeba25 --out-dir /Users/zmitchell/Projects/polarization/target/debug/deps -C incremental=/Users/zmitchell/Projects/polarization/target/debug/incremental -L dependency=/Users/zmitchell/Projects/polarization/target/debug/deps --extern assert_approx_eq=/Users/zmitchell/Projects/polarization/target/debug/deps/libassert_approx_eq-1736b77f716e3fc0.rlib --extern mutagen=/Users/zmitchell/Projects/polarization/target/debug/deps/libmutagen-4cfddce55057edc7.rlib --extern mutagen_plugin=/Users/zmitchell/Projects/polarization/target/debug/deps/libmutagen_plugin-20d90636d35182d5.dylib --extern nalgebra=/Users/zmitchell/Projects/polarization/target/debug/deps/libnalgebra-086f3aad071658ec.rlib --extern num=/Users/zmitchell/Projects/polarization/target/debug/deps/libnum-823b832c5027f926.rlib --extern proptest=/Users/zmitchell/Projects/polarization/target/debug/deps/libproptest-8e3fa95ae9deecc8.rlib` (exit code: 1)