rust/compiler/rustc_const_eval
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
..
src Rollup merge of #100507 - cameron1024:suggest-lazy, r=compiler-errors 2022-08-20 07:08:59 +02:00
Cargo.toml Initial fixes on top of type interner commit 2022-05-28 11:38:22 -07:00