diff options
| author | Ralf Jung <post@ralfj.de> | 2023-09-12 07:49:25 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2023-09-14 07:27:30 +0200 |
| commit | b2d5d68c58a745c80bc0187dba8c85e1519faabc (patch) | |
| tree | 5db410f35482cd314b2ff742cb007ba9bd5f5259 /clippy_lints/src | |
| parent | 2aaaeb4e8166cf7ba52cf606eec2219730a06395 (diff) | |
| download | rust-b2d5d68c58a745c80bc0187dba8c85e1519faabc.tar.gz rust-b2d5d68c58a745c80bc0187dba8c85e1519faabc.zip | |
cleanup op_to_const a bit; rename ConstValue::ByRef → Indirect
Diffstat (limited to 'clippy_lints/src')
| -rw-r--r-- | clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs b/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs index f66f33fee16..4a5b6fa5c18 100644 --- a/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs +++ b/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs @@ -232,7 +232,7 @@ fn path_to_matched_type(cx: &LateContext<'_>, expr: &hir::Expr<'_>) -> Option<Ve cx.tcx.type_of(def_id).instantiate_identity(), ), Res::Def(DefKind::Const, def_id) => match cx.tcx.const_eval_poly(def_id).ok()? { - ConstValue::ByRef { alloc, offset } if offset.bytes() == 0 => { + ConstValue::Indirect { alloc, offset } if offset.bytes() == 0 => { read_mir_alloc_def_path(cx, alloc.inner(), cx.tcx.type_of(def_id).instantiate_identity()) }, _ => None, |
