@@ -241,12 +241,14 @@ bitflags::bitflags! {
241241}
242242
243243impl < E : Encoder > Encodable < E > for RemapPathScopeComponents {
244+ #[ inline]
244245 fn encode ( & self , s : & mut E ) {
245246 s. emit_u8 ( self . bits ( ) ) ;
246247 }
247248}
248249
249250impl < D : Decoder > Decodable < D > for RemapPathScopeComponents {
251+ #[ inline]
250252 fn decode ( s : & mut D ) -> RemapPathScopeComponents {
251253 RemapPathScopeComponents :: from_bits ( s. read_u8 ( ) )
252254 . expect ( "invalid bits for RemapPathScopeComponents" )
@@ -308,6 +310,7 @@ struct InnerRealFileName {
308310}
309311
310312impl Hash for RealFileName {
313+ #[ inline]
311314 fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
312315 // To prevent #70924 from happening again we should only hash the
313316 // remapped path if that exists. This is because remapped paths to
@@ -327,6 +330,7 @@ impl RealFileName {
327330 /// ## Panic
328331 ///
329332 /// Only one scope components can be given to this function.
333+ #[ inline]
330334 pub fn path ( & self , scope : RemapPathScopeComponents ) -> & Path {
331335 assert ! (
332336 scope. bits( ) . count_ones( ) == 1 ,
@@ -351,6 +355,7 @@ impl RealFileName {
351355 /// ## Panic
352356 ///
353357 /// Only one scope components can be given to this function.
358+ #[ inline]
354359 pub fn embeddable_name ( & self , scope : RemapPathScopeComponents ) -> ( & Path , & Path ) {
355360 assert ! (
356361 scope. bits( ) . count_ones( ) == 1 ,
@@ -369,6 +374,7 @@ impl RealFileName {
369374 /// if this information exists.
370375 ///
371376 /// May not exists if the filename was imported from another crate.
377+ #[ inline]
372378 pub fn local_path ( & self ) -> Option < & Path > {
373379 if !self . was_remapped ( ) {
374380 Some ( & self . maybe_remapped . name )
@@ -381,6 +387,7 @@ impl RealFileName {
381387 /// if this information exists.
382388 ///
383389 /// May not exists if the filename was imported from another crate.
390+ #[ inline]
384391 pub fn into_local_path ( self ) -> Option < PathBuf > {
385392 if !self . was_remapped ( ) {
386393 Some ( self . maybe_remapped . name )
@@ -404,6 +411,7 @@ impl RealFileName {
404411 /// Returns an empty `RealFileName`
405412 ///
406413 /// Useful as the working directory input to `SourceMap::to_real_filename`.
414+ #[ inline]
407415 pub fn empty ( ) -> RealFileName {
408416 RealFileName {
409417 local : Some ( InnerRealFileName {
@@ -549,6 +557,7 @@ impl FileName {
549557 /// if this information exists.
550558 ///
551559 /// Avoid embedding this in build artifacts. Prefer using the `display` method.
560+ #[ inline]
552561 pub fn prefer_remapped_unconditionally ( & self ) -> FileNameDisplay < ' _ > {
553562 FileNameDisplay { inner : self , display_pref : FileNameDisplayPreference :: Remapped }
554563 }
@@ -557,16 +566,19 @@ impl FileName {
557566 /// if this information exists.
558567 ///
559568 /// Avoid embedding this in build artifacts. Prefer using the `display` method.
569+ #[ inline]
560570 pub fn prefer_local_unconditionally ( & self ) -> FileNameDisplay < ' _ > {
561571 FileNameDisplay { inner : self , display_pref : FileNameDisplayPreference :: Local }
562572 }
563573
564574 /// Returns a short (either the filename or an empty string).
575+ #[ inline]
565576 pub fn short ( & self ) -> FileNameDisplay < ' _ > {
566577 FileNameDisplay { inner : self , display_pref : FileNameDisplayPreference :: Short }
567578 }
568579
569580 /// Returns a `Display`-able path for the given scope.
581+ #[ inline]
570582 pub fn display ( & self , scope : RemapPathScopeComponents ) -> FileNameDisplay < ' _ > {
571583 FileNameDisplay { inner : self , display_pref : FileNameDisplayPreference :: Scope ( scope) }
572584 }
0 commit comments