diff options
| author | ljedrz <ljedrz@gmail.com> | 2019-02-26 11:48:34 +0100 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2019-03-01 11:18:49 +0100 |
| commit | c2e517e0c4eabda5f71bec1124ed5bb746c39eb0 (patch) | |
| tree | 22417bf2d8b51d6c99beb91a2c64edd4bf488526 /src/librustc_mir/lints.rs | |
| parent | e72584c3a1b74dcc8f2ef51fb1d934c397b524aa (diff) | |
| download | rust-c2e517e0c4eabda5f71bec1124ed5bb746c39eb0.tar.gz rust-c2e517e0c4eabda5f71bec1124ed5bb746c39eb0.zip | |
ty: HirIdify some lints
Diffstat (limited to 'src/librustc_mir/lints.rs')
| -rw-r--r-- | src/librustc_mir/lints.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_mir/lints.rs b/src/librustc_mir/lints.rs index bf6d6e1ba73..bfc977c28cd 100644 --- a/src/librustc_mir/lints.rs +++ b/src/librustc_mir/lints.rs @@ -129,12 +129,12 @@ fn check_fn_for_unconditional_recursion(tcx: TyCtxt<'a, 'tcx, 'tcx>, // no break */ }`) shouldn't be linted unless it actually // recurs. if !reached_exit_without_self_call && !self_call_locations.is_empty() { - let node_id = tcx.hir().as_local_node_id(def_id).unwrap(); + let hir_id = tcx.hir().as_local_hir_id(def_id).unwrap(); let sp = tcx.sess.source_map().def_span(tcx.hir().span_by_hir_id(hir_id)); - let mut db = tcx.struct_span_lint_node(UNCONDITIONAL_RECURSION, - node_id, - sp, - "function cannot return without recursing"); + let mut db = tcx.struct_span_lint_hir(UNCONDITIONAL_RECURSION, + hir_id, + sp, + "function cannot return without recursing"); db.span_label(sp, "cannot return without recursing"); // offer some help to the programmer. for location in &self_call_locations { |
