This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +9
-12
lines changed Expand file tree Collapse file tree 9 files changed +9
-12
lines changed Original file line number Diff line number Diff line change @@ -172,9 +172,6 @@ borrowed_box = "allow"
172172derived_hash_with_manual_eq = " allow"
173173forget_non_drop = " allow"
174174needless_doctest_main = " allow"
175- non_canonical_clone_impl = " allow"
176- non_canonical_partial_ord_impl = " allow"
177- self_named_constructors = " allow"
178175too_many_arguments = " allow"
179176type_complexity = " allow"
180177wrong_self_convention = " allow"
Original file line number Diff line number Diff line change @@ -317,7 +317,7 @@ fn parse_comma_sep<S>(subtree: &tt::Subtree<S>) -> Vec<SmolStr> {
317317}
318318
319319impl AttrsWithOwner {
320- pub fn attrs_with_owner ( db : & dyn DefDatabase , owner : AttrDefId ) -> Self {
320+ pub fn new ( db : & dyn DefDatabase , owner : AttrDefId ) -> Self {
321321 Self { attrs : db. attrs ( owner) , owner }
322322 }
323323
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ impl<N> FileItemTreeId<N> {
372372
373373impl < N > Clone for FileItemTreeId < N > {
374374 fn clone ( & self ) -> Self {
375- Self ( self . 0 )
375+ * self
376376 }
377377}
378378impl < N > Copy for FileItemTreeId < N > { }
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ pub struct ItemLoc<N: ItemTreeModItemNode> {
219219
220220impl < N : ItemTreeModItemNode > Clone for ItemLoc < N > {
221221 fn clone ( & self ) -> Self {
222- Self { container : self . container , id : self . id }
222+ * self
223223 }
224224}
225225
@@ -248,7 +248,7 @@ pub struct AssocItemLoc<N: ItemTreeModItemNode> {
248248
249249impl < N : ItemTreeModItemNode > Clone for AssocItemLoc < N > {
250250 fn clone ( & self ) -> Self {
251- Self { container : self . container , id : self . id }
251+ * self
252252 }
253253}
254254
Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ impl PartialEq for AstIdMap {
155155impl Eq for AstIdMap { }
156156
157157impl AstIdMap {
158- pub ( crate ) fn ast_id_map (
158+ pub ( crate ) fn new (
159159 db : & dyn ExpandDatabase ,
160160 file_id : span:: HirFileId ,
161161 ) -> triomphe:: Arc < AstIdMap > {
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ pub trait ExpandDatabase: SourceDatabase {
6161 #[ salsa:: input]
6262 fn proc_macros ( & self ) -> Arc < ProcMacros > ;
6363
64- #[ salsa:: invoke( AstIdMap :: ast_id_map ) ]
64+ #[ salsa:: invoke( AstIdMap :: new ) ]
6565 fn ast_id_map ( & self , file_id : HirFileId ) -> Arc < AstIdMap > ;
6666
6767 /// Main public API -- parses a hir file, not caring whether it's a real
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ macro_rules! impl_has_attrs {
3030 impl HasAttrs for $def {
3131 fn attrs( self , db: & dyn HirDatabase ) -> AttrsWithOwner {
3232 let def = AttrDefId :: $def_id( self . into( ) ) ;
33- AttrsWithOwner :: attrs_with_owner ( db. upcast( ) , def)
33+ AttrsWithOwner :: new ( db. upcast( ) , def)
3434 }
3535 fn attr_id( self ) -> AttrDefId {
3636 AttrDefId :: $def_id( self . into( ) )
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ impl<N: AstNode + std::fmt::Debug> std::fmt::Debug for AstPtr<N> {
3636impl < N : AstNode > Copy for AstPtr < N > { }
3737impl < N : AstNode > Clone for AstPtr < N > {
3838 fn clone ( & self ) -> AstPtr < N > {
39- AstPtr { raw : self . raw , _ty : PhantomData }
39+ * self
4040 }
4141}
4242
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ impl<T> Ord for Idx<T> {
7070
7171impl < T > PartialOrd for Idx < T > {
7272 fn partial_cmp ( & self , other : & Self ) -> Option < cmp:: Ordering > {
73- self . raw . partial_cmp ( & other. raw )
73+ Some ( self . cmp ( other) )
7474 }
7575}
7676
You can’t perform that action at this time.
0 commit comments