Enable 2021 compatibility lints for all in-tree code
This just applies the suggested fixes from the compatibility warnings, leaving any that are in practice spurious in. This is primarily intended to provide a starting point to identify possible fixes to the migrations (e.g., by avoiding spurious warnings). A secondary commit cleans these up where they are false positives (as is true in many of the cases).
This commit is contained in:
parent
5e1a614b53
commit
45b989a033
12 changed files with 52 additions and 34 deletions
|
@ -41,6 +41,7 @@ crate fn check<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
|
|||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
let sp = tcx.sess.source_map().guess_head_span(tcx.hir().span_with_body(hir_id));
|
||||
tcx.struct_span_lint_hir(UNCONDITIONAL_RECURSION, hir_id, sp, |lint| {
|
||||
let _ = &vis;
|
||||
let mut db = lint.build("function cannot return without recursing");
|
||||
db.span_label(sp, "cannot return without recursing");
|
||||
// offer some help to the programmer.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue