File tree 1 file changed +3
-8
lines changed
1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -40,20 +40,15 @@ pub trait CrateDef {
40
40
fn def_id ( & self ) -> DefId ;
41
41
42
42
/// Return the fully qualified name of the current definition.
43
+ ///
44
+ /// See [`DefId::name`] for more details
43
45
fn name ( & self ) -> Symbol {
44
46
self . def_id ( ) . name ( )
45
47
}
46
48
47
49
/// Return a trimmed name of this definition.
48
50
///
49
- /// This can be used to print more user friendly diagnostic messages.
50
- ///
51
- /// If a symbol name can only be imported from one place for a type, and as
52
- /// long as it was not glob-imported anywhere in the current crate, we trim its
53
- /// path and print only the name.
54
- ///
55
- /// For example, this function may shorten `std::vec::Vec` to just `Vec`,
56
- /// as long as there is no other `Vec` importable anywhere.
51
+ /// See [`DefId::trimmed_name`] for more details
57
52
fn trimmed_name ( & self ) -> Symbol {
58
53
self . def_id ( ) . trimmed_name ( )
59
54
}
You can’t perform that action at this time.
0 commit comments