pub struct Resolution { /* private fields */ }Expand description
What a compiler resolved the names in a file to, by the byte each name starts at.
The preservation rules above are lexical guesses at a question a compiler answers outright, and they are wrong in both directions: a local closure named like a method is preserved when it should be renamed, and a lowercase free function from another crate is renamed when it should be preserved. Where a compiler has spoken, its answer replaces the guess — in both directions, because correcting only the misses would leave the over-preservation the guess causes, which is the half that costs recall.
Byte offsets rather than indices: the resolution is about a file, and a fragment is a slice of one. A token’s own start byte survives being sliced out; its position in the slice does not.
Implementations§
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Resolution
impl Debug for Resolution
Source§impl Default for Resolution
impl Default for Resolution
Source§fn default() -> Resolution
fn default() -> Resolution
impl Eq for Resolution
Source§impl PartialEq for Resolution
impl PartialEq for Resolution
impl StructuralPartialEq for Resolution
Auto Trait Implementations§
impl Freeze for Resolution
impl RefUnwindSafe for Resolution
impl Send for Resolution
impl Sync for Resolution
impl Unpin for Resolution
impl UnsafeUnpin for Resolution
impl UnwindSafe for Resolution
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.