diff options
| author | bors <bors@rust-lang.org> | 2024-07-22 09:36:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-07-22 09:36:15 +0000 |
| commit | e651da9ff366c5df78fcd6e8ba161fdcc5470c95 (patch) | |
| tree | d5c958b2be5a39beb91e311980ab9038e7a8034e /src/tools/rust-analyzer | |
| parent | a187a8992db7b278007c54256f30fea8e9e5cd80 (diff) | |
| parent | d30f78730ecb6037824a9a5e866abfffce501ada (diff) | |
| download | rust-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.rs | 4 | ||||
| -rw-r--r-- | src/tools/rust-analyzer/crates/hir/src/lib.rs | 1 |
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 } |
