diff options
| author | Michael Goulet <michael@errs.io> | 2024-09-11 14:58:08 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-09-11 17:52:53 -0400 |
| commit | 6d064295c8fb7413cb0500289f922f8d7feb38dc (patch) | |
| tree | 1c0746343653491bcf5e0290b88db58bfeb253d2 /compiler/rustc_hir_analysis/src | |
| parent | 5a2dd7d4f3210629e65879aeecbe643ba3b86bb4 (diff) | |
| download | rust-6d064295c8fb7413cb0500289f922f8d7feb38dc.tar.gz rust-6d064295c8fb7413cb0500289f922f8d7feb38dc.zip | |
clippy::useless_conversion
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 3627faf8dfc..10b3fe380ab 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1602,7 +1602,7 @@ fn check_fn_or_method<'tcx>( function: def_id, // Note that the `param_idx` of the output type is // one greater than the index of the last input type. - param_idx: idx.try_into().unwrap(), + param_idx: idx, }), ty, ) @@ -1611,7 +1611,7 @@ fn check_fn_or_method<'tcx>( for (idx, ty) in sig.inputs_and_output.iter().enumerate() { wfcx.register_wf_obligation( arg_span(idx), - Some(WellFormedLoc::Param { function: def_id, param_idx: idx.try_into().unwrap() }), + Some(WellFormedLoc::Param { function: def_id, param_idx: idx }), ty.into(), ); } |
