mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
make parent module cancelable
This commit is contained in:
parent
61518580ed
commit
c4b0d3cd56
3 changed files with 16 additions and 6 deletions
|
@ -238,7 +238,7 @@ pub fn handle_parent_module(
|
|||
) -> Result<Vec<Location>> {
|
||||
let file_id = params.try_conv_with(&world)?;
|
||||
let mut res = Vec::new();
|
||||
for (file_id, symbol) in world.analysis().parent_module(file_id) {
|
||||
for (file_id, symbol) in world.analysis().parent_module(file_id)? {
|
||||
let line_index = world.analysis().file_line_index(file_id);
|
||||
let location = to_location(file_id, symbol.node_range, &world, &line_index)?;
|
||||
res.push(location);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue