about summary refs log tree commit diff
path: root/tests/codegen/src-hash-algorithm
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-08-20 07:08:59 +0200
committerGitHub <noreply@github.com>2022-08-20 07:08:59 +0200
commitc4b83ebe7c0e551c5e22abca259ef22d4cb0c509 (patch)
tree23806a75e76323681aa26dae4c953f3a3b8dcbbb /tests/codegen/src-hash-algorithm
parent368f08a65f66cdd0b26298fb86a175188d9c34bb (diff)
parent34e0d9a0bb409bb6c7fc45f1c222340b02989b8b (diff)
downloadrust-c4b83ebe7c0e551c5e22abca259ef22d4cb0c509.tar.gz
rust-c4b83ebe7c0e551c5e22abca259ef22d4cb0c509.zip
Rollup merge of #100507 - cameron1024:suggest-lazy, r=compiler-errors
suggest `once_cell::Lazy` for non-const statics

Addresses https://github.com/rust-lang/rust/issues/100410

Some questions:
 - removing the `if` seems to include too many cases (e.g. calls to non-const functions inside a `const fn`), but this code excludes the following case:
```rust
const FOO: Foo = non_const_fn();
```
Should we suggest `once_cell` in this case as well?
 - The original issue mentions suggesting `AtomicI32` instead of `Mutex<i32>`, should this PR address that as well?
Diffstat (limited to 'tests/codegen/src-hash-algorithm')
0 files changed, 0 insertions, 0 deletions