rust/compiler/rustc_const_eval/src/transform
Matthias Krüger c4b83ebe7c
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?
2022-08-20 07:08:59 +02:00
..
check_consts suggest lazy-static for non-const statics 2022-08-14 23:07:47 +01:00
mod.rs Don't re-export MirPass 2021-11-29 12:58:15 -08:00
promote_consts.rs Erase regions better in promote_candidate 2022-08-12 03:48:40 +00:00
validate.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00