@@ -406,14 +406,14 @@ impl TypeParamId {
406406
407407impl TypeParamId {
408408 /// Caller should check if this toc id really belongs to a type
409- pub fn from_unchecked ( x : TypeOrConstParamId ) -> Self {
410- Self ( x )
409+ pub fn from_unchecked ( it : TypeOrConstParamId ) -> Self {
410+ Self ( it )
411411 }
412412}
413413
414414impl From < TypeParamId > for TypeOrConstParamId {
415- fn from ( x : TypeParamId ) -> Self {
416- x . 0
415+ fn from ( it : TypeParamId ) -> Self {
416+ it . 0
417417 }
418418}
419419
@@ -432,14 +432,14 @@ impl ConstParamId {
432432
433433impl ConstParamId {
434434 /// Caller should check if this toc id really belongs to a const
435- pub fn from_unchecked ( x : TypeOrConstParamId ) -> Self {
436- Self ( x )
435+ pub fn from_unchecked ( it : TypeOrConstParamId ) -> Self {
436+ Self ( it )
437437 }
438438}
439439
440440impl From < ConstParamId > for TypeOrConstParamId {
441- fn from ( x : ConstParamId ) -> Self {
442- x . 0
441+ fn from ( it : ConstParamId ) -> Self {
442+ it . 0
443443 }
444444}
445445
@@ -562,14 +562,14 @@ pub enum TypeOwnerId {
562562impl TypeOwnerId {
563563 fn as_generic_def_id ( self ) -> Option < GenericDefId > {
564564 Some ( match self {
565- TypeOwnerId :: FunctionId ( x ) => GenericDefId :: FunctionId ( x ) ,
566- TypeOwnerId :: ConstId ( x ) => GenericDefId :: ConstId ( x ) ,
567- TypeOwnerId :: AdtId ( x ) => GenericDefId :: AdtId ( x ) ,
568- TypeOwnerId :: TraitId ( x ) => GenericDefId :: TraitId ( x ) ,
569- TypeOwnerId :: TraitAliasId ( x ) => GenericDefId :: TraitAliasId ( x ) ,
570- TypeOwnerId :: TypeAliasId ( x ) => GenericDefId :: TypeAliasId ( x ) ,
571- TypeOwnerId :: ImplId ( x ) => GenericDefId :: ImplId ( x ) ,
572- TypeOwnerId :: EnumVariantId ( x ) => GenericDefId :: EnumVariantId ( x ) ,
565+ TypeOwnerId :: FunctionId ( it ) => GenericDefId :: FunctionId ( it ) ,
566+ TypeOwnerId :: ConstId ( it ) => GenericDefId :: ConstId ( it ) ,
567+ TypeOwnerId :: AdtId ( it ) => GenericDefId :: AdtId ( it ) ,
568+ TypeOwnerId :: TraitId ( it ) => GenericDefId :: TraitId ( it ) ,
569+ TypeOwnerId :: TraitAliasId ( it ) => GenericDefId :: TraitAliasId ( it ) ,
570+ TypeOwnerId :: TypeAliasId ( it ) => GenericDefId :: TypeAliasId ( it ) ,
571+ TypeOwnerId :: ImplId ( it ) => GenericDefId :: ImplId ( it ) ,
572+ TypeOwnerId :: EnumVariantId ( it ) => GenericDefId :: EnumVariantId ( it ) ,
573573 TypeOwnerId :: InTypeConstId ( _) | TypeOwnerId :: ModuleId ( _) | TypeOwnerId :: StaticId ( _) => {
574574 return None
575575 }
@@ -592,30 +592,30 @@ impl_from!(
592592 for TypeOwnerId
593593) ;
594594
595- // Every `DefWithBodyId` is a type owner, since bodies can contain type (e.g. `{ let x : Type = _; }`)
595+ // Every `DefWithBodyId` is a type owner, since bodies can contain type (e.g. `{ let it : Type = _; }`)
596596impl From < DefWithBodyId > for TypeOwnerId {
597597 fn from ( value : DefWithBodyId ) -> Self {
598598 match value {
599- DefWithBodyId :: FunctionId ( x ) => x . into ( ) ,
600- DefWithBodyId :: StaticId ( x ) => x . into ( ) ,
601- DefWithBodyId :: ConstId ( x ) => x . into ( ) ,
602- DefWithBodyId :: InTypeConstId ( x ) => x . into ( ) ,
603- DefWithBodyId :: VariantId ( x ) => x . into ( ) ,
599+ DefWithBodyId :: FunctionId ( it ) => it . into ( ) ,
600+ DefWithBodyId :: StaticId ( it ) => it . into ( ) ,
601+ DefWithBodyId :: ConstId ( it ) => it . into ( ) ,
602+ DefWithBodyId :: InTypeConstId ( it ) => it . into ( ) ,
603+ DefWithBodyId :: VariantId ( it ) => it . into ( ) ,
604604 }
605605 }
606606}
607607
608608impl From < GenericDefId > for TypeOwnerId {
609609 fn from ( value : GenericDefId ) -> Self {
610610 match value {
611- GenericDefId :: FunctionId ( x ) => x . into ( ) ,
612- GenericDefId :: AdtId ( x ) => x . into ( ) ,
613- GenericDefId :: TraitId ( x ) => x . into ( ) ,
614- GenericDefId :: TraitAliasId ( x ) => x . into ( ) ,
615- GenericDefId :: TypeAliasId ( x ) => x . into ( ) ,
616- GenericDefId :: ImplId ( x ) => x . into ( ) ,
617- GenericDefId :: EnumVariantId ( x ) => x . into ( ) ,
618- GenericDefId :: ConstId ( x ) => x . into ( ) ,
611+ GenericDefId :: FunctionId ( it ) => it . into ( ) ,
612+ GenericDefId :: AdtId ( it ) => it . into ( ) ,
613+ GenericDefId :: TraitId ( it ) => it . into ( ) ,
614+ GenericDefId :: TraitAliasId ( it ) => it . into ( ) ,
615+ GenericDefId :: TypeAliasId ( it ) => it . into ( ) ,
616+ GenericDefId :: ImplId ( it ) => it . into ( ) ,
617+ GenericDefId :: EnumVariantId ( it ) => it . into ( ) ,
618+ GenericDefId :: ConstId ( it ) => it . into ( ) ,
619619 }
620620 }
621621}
@@ -730,7 +730,7 @@ impl GeneralConstId {
730730 . const_data ( const_id)
731731 . name
732732 . as_ref ( )
733- . and_then ( |x| x . as_str ( ) )
733+ . and_then ( |it| it . as_str ( ) )
734734 . unwrap_or ( "_" )
735735 . to_owned ( ) ,
736736 GeneralConstId :: ConstBlockId ( id) => format ! ( "{{anonymous const {id:?}}}" ) ,
@@ -972,17 +972,17 @@ impl HasModule for MacroId {
972972impl HasModule for TypeOwnerId {
973973 fn module ( & self , db : & dyn db:: DefDatabase ) -> ModuleId {
974974 match self {
975- TypeOwnerId :: FunctionId ( x ) => x . lookup ( db) . module ( db) ,
976- TypeOwnerId :: StaticId ( x ) => x . lookup ( db) . module ( db) ,
977- TypeOwnerId :: ConstId ( x ) => x . lookup ( db) . module ( db) ,
978- TypeOwnerId :: InTypeConstId ( x ) => x . lookup ( db) . owner . module ( db) ,
979- TypeOwnerId :: AdtId ( x ) => x . module ( db) ,
980- TypeOwnerId :: TraitId ( x ) => x . lookup ( db) . container ,
981- TypeOwnerId :: TraitAliasId ( x ) => x . lookup ( db) . container ,
982- TypeOwnerId :: TypeAliasId ( x ) => x . lookup ( db) . module ( db) ,
983- TypeOwnerId :: ImplId ( x ) => x . lookup ( db) . container ,
984- TypeOwnerId :: EnumVariantId ( x ) => x . parent . lookup ( db) . container ,
985- TypeOwnerId :: ModuleId ( x ) => * x ,
975+ TypeOwnerId :: FunctionId ( it ) => it . lookup ( db) . module ( db) ,
976+ TypeOwnerId :: StaticId ( it ) => it . lookup ( db) . module ( db) ,
977+ TypeOwnerId :: ConstId ( it ) => it . lookup ( db) . module ( db) ,
978+ TypeOwnerId :: InTypeConstId ( it ) => it . lookup ( db) . owner . module ( db) ,
979+ TypeOwnerId :: AdtId ( it ) => it . module ( db) ,
980+ TypeOwnerId :: TraitId ( it ) => it . lookup ( db) . container ,
981+ TypeOwnerId :: TraitAliasId ( it ) => it . lookup ( db) . container ,
982+ TypeOwnerId :: TypeAliasId ( it ) => it . lookup ( db) . module ( db) ,
983+ TypeOwnerId :: ImplId ( it ) => it . lookup ( db) . container ,
984+ TypeOwnerId :: EnumVariantId ( it ) => it . parent . lookup ( db) . container ,
985+ TypeOwnerId :: ModuleId ( it ) => * it ,
986986 }
987987 }
988988}
0 commit comments