1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//! Shared helpers used across the Rust language pipeline.
use crateParsedEntity;
/// Find the entity index nearest to the given line number.
///
/// Returns the entity whose `start_line` is the largest value still `<=` the
/// requested line. When no entity starts at or before `line` (typical for
/// file-level references like `use` statements that precede every entity),
/// the entity with the smallest `start_line` is returned instead so the
/// reference is attributed to the first entity in the file.
pub