mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-02-14 04:58:29 +00:00
Auto merge of #13936 - danieleades:static-mod-depth-limit, r=lnicola
interior-mutable types should be 'static' rather than 'const with the 'tracking' feature enabled, `limit::Limit` is interior mutable, so the `const` `hir_def::nameres::mod_resolution::MOD_DEPTH_LIMIT` is probably meant to be `static` rather than `const`. with `const` you get a new copy of it everywhere it's used, instead of the shared, global value that seems to be the intent. This fix brought to you by the catchily-named `clippy::declare_interior_mutable_const` lint.
This commit is contained in:
commit
80e616e00b
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ use syntax::SmolStr;
|
|||
|
||||
use crate::{db::DefDatabase, HirFileId};
|
||||
|
||||
const MOD_DEPTH_LIMIT: Limit = Limit::new(32);
|
||||
static MOD_DEPTH_LIMIT: Limit = Limit::new(32);
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub(super) struct ModDir {
|
||||
|
|
Loading…
Add table
Reference in a new issue