about summary refs log tree commit diff
path: root/src/tools/rust-analyzer
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-07-22 09:36:15 +0000
committerbors <bors@rust-lang.org>2024-07-22 09:36:15 +0000
commite651da9ff366c5df78fcd6e8ba161fdcc5470c95 (patch)
treed5c958b2be5a39beb91e311980ab9038e7a8034e /src/tools/rust-analyzer
parenta187a8992db7b278007c54256f30fea8e9e5cd80 (diff)
parentd30f78730ecb6037824a9a5e866abfffce501ada (diff)
downloadrust-e651da9ff366c5df78fcd6e8ba161fdcc5470c95.tar.gz
rust-e651da9ff366c5df78fcd6e8ba161fdcc5470c95.zip
Auto merge of #17668 - Veykril:incorrect-nevers, r=Veykril
Remove incorrect never! invocations

These can crop up when the `Future` related lang items are missing
Diffstat (limited to 'src/tools/rust-analyzer')
-rw-r--r--src/tools/rust-analyzer/crates/hir/src/display.rs4
-rw-r--r--src/tools/rust-analyzer/crates/hir/src/lib.rs1
2 files changed, 2 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/crates/hir/src/display.rs b/src/tools/rust-analyzer/crates/hir/src/display.rs
index a0dbead2216..f80ccf84a2c 100644
--- a/src/tools/rust-analyzer/crates/hir/src/display.rs
+++ b/src/tools/rust-analyzer/crates/hir/src/display.rs
@@ -134,9 +134,9 @@ impl HirDisplay for Function {
                         .as_ref()
                         .unwrap()
                     }
-                    _ => panic!("Async fn ret_type should be impl Future"),
+                    _ => &TypeRef::Error,
                 },
-                _ => panic!("Async fn ret_type should be impl Future"),
+                _ => &TypeRef::Error,
             }
         };
 
diff --git a/src/tools/rust-analyzer/crates/hir/src/lib.rs b/src/tools/rust-analyzer/crates/hir/src/lib.rs
index 2bd0008c701..bb149a01e83 100644
--- a/src/tools/rust-analyzer/crates/hir/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/hir/src/lib.rs
@@ -1977,7 +1977,6 @@ impl Function {
                 return Type::new_with_resolver_inner(db, &resolver, output_eq.ty).into();
             }
         }
-        never!("Async fn ret_type should be impl Future");
         None
     }