about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-10-03 00:31:12 +0200
committerGitHub <noreply@github.com>2020-10-03 00:31:12 +0200
commit65228686649c68f491d3b763e9dde52c23fea9d7 (patch)
treef2868cb1c2c8fb3c56235745a1232c4b76b7501a /src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
parentccc020ab42b4209940b821ba4fd0e1240d3f7561 (diff)
parent804d159c6276025e26ade90a6ef013bda33207c3 (diff)
downloadrust-65228686649c68f491d3b763e9dde52c23fea9d7.tar.gz
rust-65228686649c68f491d3b763e9dde52c23fea9d7.zip
Rollup merge of #77251 - dtolnay:drop, r=Aaron1011
Bypass const_item_mutation if const's type has Drop impl

Follow-up to #75573. This PR disables the const_item_mutation lint in cases that the const has a Drop impl which observes the mutation.

```rust
struct Log { msg: &'static str }
const LOG: Log = Log { msg: "" };
impl Drop for Log {
    fn drop(&mut self) { println!("{}", self.msg); }
}

LOG.msg = "wow";  // prints "wow"
```

r? @Aaron1011
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs')
0 files changed, 0 insertions, 0 deletions