diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-10-14 13:48:19 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-14 13:48:19 +0200 |
| commit | 30b2cc0cc38b168b8e271d490ce2ef4d869c9d6b (patch) | |
| tree | b4c055da67b2b842121552fdca8fa2cb8ec1a15e /compiler/rustc_lint/src | |
| parent | f29dbe8885c551aa244a9ea6fc4788877451d3e8 (diff) | |
| parent | feedd68f80e15616511493feda4c9c60d5571e73 (diff) | |
| download | rust-30b2cc0cc38b168b8e271d490ce2ef4d869c9d6b.tar.gz rust-30b2cc0cc38b168b8e271d490ce2ef4d869c9d6b.zip | |
Rollup merge of #116679 - estebank:rewrap-unwrap, r=oli-obk
Remove some unnecessary `unwrap`s
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/unused.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_lint/src/unused.rs b/compiler/rustc_lint/src/unused.rs index d5beff4f101..1e7a839e931 100644 --- a/compiler/rustc_lint/src/unused.rs +++ b/compiler/rustc_lint/src/unused.rs @@ -353,7 +353,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedResults { ty::Generator(def_id, ..) => { // async fn should be treated as "implementor of `Future`" let must_use = if cx.tcx.generator_is_async(def_id) { - let def_id = cx.tcx.lang_items().future_trait().unwrap(); + let def_id = cx.tcx.lang_items().future_trait()?; is_def_must_use(cx, def_id, span) .map(|inner| MustUsePath::Opaque(Box::new(inner))) } else { |
