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
38
39
40
41
42
use ;
/// A simple idx in the code that can be used to track back to the original source location
///
/// Used in two places:
/// - In the `CallBody` to track the location of hotreloadable literals
/// - In the `Body` to track the ID of each template
///
/// We need an ID system, unfortunately, to properly disambiguate between different templates since
/// rustc assigns them all the same line!() and column!() information. Before, we hashed spans but
/// that has collision issues and is eventually relied on specifics of proc macros that aren't available
/// in testing (like snapshot testing). So, we just need an ID for each of these items, hence this struct.
///
/// This is "transparent" to partialeq and eq, so it will always return true when compared to another DynIdx.