File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -40,20 +40,15 @@ pub trait CrateDef {
4040 fn def_id ( & self ) -> DefId ;
4141
4242 /// Return the fully qualified name of the current definition.
43+ ///
44+ /// See [`DefId::name`] for more details
4345 fn name ( & self ) -> Symbol {
4446 self . def_id ( ) . name ( )
4547 }
4648
4749 /// Return a trimmed name of this definition.
4850 ///
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
5752 fn trimmed_name ( & self ) -> Symbol {
5853 self . def_id ( ) . trimmed_name ( )
5954 }
You can’t perform that action at this time.
0 commit comments