-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow mutate expressions and statements #79
Comments
First, what code would we mutate here? The only things that may contain exprs outside of Second, we could introduce a |
Ah, I've now revisited the change. It means we could encounter |
Sorry for not making this enough clear. I'm ok with not allowing this, but maybe we should give some feedback to the user. As now Rust allows to annotate expressions and statements, maybe we should, somehow, raise a warning that the annotated expr/stmt won't be mutated. What do you think? |
Good idea. Our |
Since rust-lang/rust#49124, expressions and statements can be mutated if the flag
stmt_expr_attributes
is used.Currently, mutagen assumes that mutations happen only on func/methods contexts. For example, there are some mutations that depends on
methods_info
.We are also assuming this for the coverage information. We are prepending the static var on the beginning of the scope of a method, but we will need to think about how we will report the coverage when we will mutate single expressions or statements.
Related: 15b2e37
The text was updated successfully, but these errors were encountered: