rust-lang / rust-lang/rust-analyzer
no definition found for method, but definition location can be identified when params is wrong
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: 0.3.2129-standalone
rustc version: rustc 1.81.0 (eeb90cda1 2024-09-04)
editor or extension: VSCode
relevant settings: Default
repository link (if public, optional): ldk-node
code snippet to reproduce:
this line
match self.channel_manager.send_payment(
payment_hash,
recipient_onion,
payment_id,
route_params,
retry_strategy,
)
channel_manger is a very complex struct with many generic parameters. It has a method called send_payment. In vscode, F12 jumps to the definition, and ra cannot recognize this method. But if I comment out a parameter, there will be such a prompt.
I can only use this method to jump to the corresponding location. But I don't have this problem when using rustrover. . . Is there any configuration method that can be used to solve this problem?
channel_manger is indeed a very complex struct. . . send_payment is just one example, there are many methods that cannot be recognized.
channel_manager: Arc<ChannelManager<Arc<ChainMonitor<InMemorySigner, Arc<EsploraSyncClient<Arc<FilesystemLogger, Global>>, Global>, Arc<TransactionBroadcaster<Arc<FilesystemLogger, Global>>, Global>, Arc<OnchainFeeEstimator<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>, Arc<dyn KVStore + Send + Sync, Global>>, Global>, Arc<TransactionBroadcaster<Arc<FilesystemLogger, Global>>, Global>, Arc<WalletKeysManager<Arc<TransactionBroadcaster<Arc<FilesystemLogger, Global>>, Global>, Arc<OnchainFeeEstimator<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>>, Global>, Arc<WalletKeysManager<Arc<TransactionBroadcaster<Arc<FilesystemLogger, Global>>, Global>, Arc<OnchainFeeEstimator<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>>, Global>, Arc<WalletKeysManager<Arc<TransactionBroadcaster<Arc<FilesystemLogger, Global>>, Global>, Arc<OnchainFeeEstimator<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>>, Global>, Arc<OnchainFeeEstimator<Arc<FilesystemLogger, Global>>, Global>, Arc<DefaultRouter<Arc<NetworkGraph<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>, Arc<WalletKeysManager<Arc<TransactionBroadcaster<Arc<FilesystemLogger, Global>>, Global>, Arc<OnchainFeeEstimator<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>>, Global>, Arc<Mutex<ProbabilisticScorer<Arc<NetworkGraph<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>>>, Global>, ProbabilisticScoringFeeParameters, ProbabilisticScorer<Arc<NetworkGraph<Arc<FilesystemLogger, Global>>, Global>, Arc<FilesystemLogger, Global>>>, Global>, Arc<FilesystemLogger, Global>>, Global>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked ldk-node reproduction at src/payment/bolt11.rs line 252 and compare go-to-definition behavior with the incorrect-parameter case. The report names no rust-analyzer source file or test; done would mean resolving send_payment and similar methods correctly for the complex generic type, with a regression test covering the reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100