@@ -1803,9 +1803,13 @@ impl<'a> StaticParts<'a> {
1803
1803
ast:: ItemKind :: Static ( ref static_) => {
1804
1804
( None , "static" , & static_. ty , static_. mutbl , & static_. expr )
1805
1805
}
1806
- ast:: ItemKind :: Const ( ref const_) => {
1807
- ( Some ( const_. defaultness ) , "const" , & const_. ty , ast:: Mutability :: Not , & const_. expr )
1808
- }
1806
+ ast:: ItemKind :: Const ( ref const_) => (
1807
+ Some ( const_. defaultness ) ,
1808
+ "const" ,
1809
+ & const_. ty ,
1810
+ ast:: Mutability :: Not ,
1811
+ & const_. expr ,
1812
+ ) ,
1809
1813
_ => unreachable ! ( ) ,
1810
1814
} ;
1811
1815
StaticParts {
@@ -1822,36 +1826,32 @@ impl<'a> StaticParts<'a> {
1822
1826
1823
1827
pub ( crate ) fn from_trait_item ( ti : & ' a ast:: AssocItem ) -> Self {
1824
1828
match & ti. kind {
1825
- ast:: AssocItemKind :: Const ( const_) => {
1826
- StaticParts {
1827
- prefix : "const" ,
1828
- vis : & ti. vis ,
1829
- ident : ti. ident ,
1830
- ty : & const_. ty ,
1831
- mutability : ast:: Mutability :: Not ,
1832
- expr_opt : const_. expr . as_ref ( ) ,
1833
- defaultness : Some ( const_. defaultness ) ,
1834
- span : ti. span ,
1835
- }
1836
- }
1829
+ ast:: AssocItemKind :: Const ( const_) => StaticParts {
1830
+ prefix : "const" ,
1831
+ vis : & ti. vis ,
1832
+ ident : ti. ident ,
1833
+ ty : & const_. ty ,
1834
+ mutability : ast:: Mutability :: Not ,
1835
+ expr_opt : const_. expr . as_ref ( ) ,
1836
+ defaultness : Some ( const_. defaultness ) ,
1837
+ span : ti. span ,
1838
+ } ,
1837
1839
_ => unreachable ! ( ) ,
1838
1840
}
1839
1841
}
1840
1842
1841
1843
pub ( crate ) fn from_impl_item ( ii : & ' a ast:: AssocItem ) -> Self {
1842
1844
match & ii. kind {
1843
- ast:: AssocItemKind :: Const ( const_) => {
1844
- StaticParts {
1845
- prefix : "const" ,
1846
- vis : & ii. vis ,
1847
- ident : ii. ident ,
1848
- ty : & const_. ty ,
1849
- mutability : ast:: Mutability :: Not ,
1850
- expr_opt : const_. expr . as_ref ( ) ,
1851
- defaultness : Some ( const_. defaultness ) ,
1852
- span : ii. span ,
1853
- }
1854
- }
1845
+ ast:: AssocItemKind :: Const ( const_) => StaticParts {
1846
+ prefix : "const" ,
1847
+ vis : & ii. vis ,
1848
+ ident : ii. ident ,
1849
+ ty : & const_. ty ,
1850
+ mutability : ast:: Mutability :: Not ,
1851
+ expr_opt : const_. expr . as_ref ( ) ,
1852
+ defaultness : Some ( const_. defaultness ) ,
1853
+ span : ii. span ,
1854
+ } ,
1855
1855
_ => unreachable ! ( ) ,
1856
1856
}
1857
1857
}
0 commit comments