@@ -1225,7 +1225,7 @@ impl<'a> quote::ToTokens for ContextSelector<'a> {
12251225 let backtrace_field = match * backtrace_field {
12261226 Some ( ref field) => {
12271227 let name = & field. name ;
1228- quote ! { #name: std :: default :: Default :: default ( ) , }
1228+ quote ! { #name: core :: default :: Default :: default ( ) , }
12291229 }
12301230 None => quote ! { } ,
12311231 } ;
@@ -1235,7 +1235,7 @@ impl<'a> quote::ToTokens for ContextSelector<'a> {
12351235 . zip ( user_fields)
12361236 . map ( |( gen_ty, f) | {
12371237 let Field { ref ty, .. } = * f;
1238- quote ! { #gen_ty: std :: convert:: Into <#ty> }
1238+ quote ! { #gen_ty: core :: convert:: Into <#ty> }
12391239 } )
12401240 . chain ( self . 0 . provided_where_clauses ( ) )
12411241 . collect ( ) ;
@@ -1246,16 +1246,16 @@ impl<'a> quote::ToTokens for ContextSelector<'a> {
12461246 quote ! {
12471247 impl <#( #generic_names, ) * > #selector_name
12481248 {
1249- #visibility fn fail<#( #original_generics_without_defaults, ) * __T>( self ) -> std :: result:: Result <__T, #parameterized_enum_name>
1249+ #visibility fn fail<#( #original_generics_without_defaults, ) * __T>( self ) -> core :: result:: Result <__T, #parameterized_enum_name>
12501250 where
12511251 #( #where_clauses) , *
12521252 {
12531253 let Self { #( #names) , * } = self ;
12541254 let error = #enum_name:: #variant_name {
12551255 #backtrace_field
1256- #( #names: std :: convert:: Into :: into( #names2) ) , *
1256+ #( #names: core :: convert:: Into :: into( #names2) ) , *
12571257 } ;
1258- std :: result:: Result :: Err ( error)
1258+ core :: result:: Result :: Err ( error)
12591259 }
12601260 }
12611261 }
@@ -1294,7 +1294,7 @@ impl<'a> quote::ToTokens for ContextSelector<'a> {
12941294 quote ! {
12951295 impl #generics_list snafu:: IntoError <#parameterized_enum_name> for #selector_name
12961296 where
1297- #parameterized_enum_name: std :: error :: Error + snafu:: ErrorCompat ,
1297+ #parameterized_enum_name: snafu :: Error + snafu:: ErrorCompat ,
12981298 #( #where_clauses) , *
12991299 {
13001300 type Source = #source_ty;
@@ -1381,11 +1381,11 @@ impl<'a> quote::ToTokens for DisplayImpl<'a> {
13811381
13821382 stream. extend ( {
13831383 quote ! {
1384- impl <#( #original_generics) , * > std :: fmt:: Display for #parameterized_enum_name
1384+ impl <#( #original_generics) , * > core :: fmt:: Display for #parameterized_enum_name
13851385 where
13861386 #( #where_clauses) , *
13871387 {
1388- fn fmt( & self , f: & mut std :: fmt:: Formatter ) -> std :: fmt:: Result {
1388+ fn fmt( & self , f: & mut core :: fmt:: Formatter ) -> core :: fmt:: Result {
13891389 #[ allow( unused_variables) ]
13901390 match * self {
13911391 #( #variants_to_display) *
@@ -1437,13 +1437,13 @@ impl<'a> ErrorImpl<'a> {
14371437 } = * source_field;
14381438 quote ! {
14391439 #enum_name:: #variant_name { ref #field_name, .. } => {
1440- std :: option:: Option :: Some ( #field_name. as_error_source( ) )
1440+ core :: option:: Option :: Some ( #field_name. as_error_source( ) )
14411441 }
14421442 }
14431443 }
14441444 None => {
14451445 quote ! {
1446- #enum_name:: #variant_name { .. } => { std :: option:: Option :: None }
1446+ #enum_name:: #variant_name { .. } => { core :: option:: Option :: None }
14471447 }
14481448 }
14491449 }
@@ -1471,7 +1471,7 @@ impl<'a> quote::ToTokens for ErrorImpl<'a> {
14711471 let variants_to_source = & self . variants_to_source ( ) ;
14721472
14731473 let cause_fn = quote ! {
1474- fn cause( & self ) -> Option <& std :: error :: Error > {
1474+ fn cause( & self ) -> Option <& snafu :: Error > {
14751475 use snafu:: AsErrorSource ;
14761476 match * self {
14771477 #( #variants_to_source) *
@@ -1481,7 +1481,7 @@ impl<'a> quote::ToTokens for ErrorImpl<'a> {
14811481
14821482 let source_fn = if cfg ! ( feature = "rust_1_30" ) {
14831483 quote ! {
1484- fn source( & self ) -> Option <& ( std :: error :: Error + ' static ) > {
1484+ fn source( & self ) -> Option <& ( snafu :: Error + ' static ) > {
14851485 use snafu:: AsErrorSource ;
14861486 match * self {
14871487 #( #variants_to_source) *
@@ -1494,9 +1494,9 @@ impl<'a> quote::ToTokens for ErrorImpl<'a> {
14941494
14951495 stream. extend ( {
14961496 quote ! {
1497- impl <#( #original_generics) , * > std :: error :: Error for #parameterized_enum_name
1497+ impl <#( #original_generics) , * > snafu :: Error for #parameterized_enum_name
14981498 where
1499- Self : std :: fmt:: Debug + std :: fmt:: Display ,
1499+ Self : core :: fmt:: Debug + core :: fmt:: Display ,
15001500 #( #where_clauses) , *
15011501 {
15021502 #description_fn
@@ -1537,11 +1537,11 @@ impl<'a> ErrorCompatImpl<'a> {
15371537 ..
15381538 } = * backtrace_field;
15391539 quote ! {
1540- #enum_name:: #variant_name { ref #field_name, .. } => { std :: option:: Option :: Some ( #field_name) }
1540+ #enum_name:: #variant_name { ref #field_name, .. } => { core :: option:: Option :: Some ( #field_name) }
15411541 }
15421542 } else {
15431543 quote ! {
1544- #enum_name:: #variant_name { .. } => { std :: option:: Option :: None }
1544+ #enum_name:: #variant_name { .. } => { core :: option:: Option :: None }
15451545 }
15461546 }
15471547 } ) . collect ( )
@@ -1602,20 +1602,20 @@ impl StructInfo {
16021602
16031603 let description_fn = quote ! {
16041604 fn description( & self ) -> & str {
1605- std :: error :: Error :: description( & self . 0 )
1605+ snafu :: Error :: description( & self . 0 )
16061606 }
16071607 } ;
16081608
16091609 let cause_fn = quote ! {
1610- fn cause( & self ) -> Option <& std :: error :: Error > {
1611- std :: error :: Error :: cause( & self . 0 )
1610+ fn cause( & self ) -> Option <& snafu :: Error > {
1611+ snafu :: Error :: cause( & self . 0 )
16121612 }
16131613 } ;
16141614
16151615 let source_fn = if cfg ! ( feature = "rust_1_30" ) {
16161616 quote ! {
1617- fn source( & self ) -> Option <& ( std :: error :: Error + ' static ) > {
1618- std :: error :: Error :: source( & self . 0 )
1617+ fn source( & self ) -> Option <& ( snafu :: Error + ' static ) > {
1618+ snafu :: Error :: source( & self . 0 )
16191619 }
16201620 }
16211621 } else {
@@ -1633,7 +1633,7 @@ impl StructInfo {
16331633 } ;
16341634
16351635 let error_impl = quote ! {
1636- impl #generics std :: error :: Error for #parameterized_struct_name
1636+ impl #generics snafu :: Error for #parameterized_struct_name
16371637 where
16381638 #( #where_clauses) , *
16391639 {
@@ -1653,18 +1653,18 @@ impl StructInfo {
16531653 } ;
16541654
16551655 let display_impl = quote ! {
1656- impl #generics std :: fmt:: Display for #parameterized_struct_name
1656+ impl #generics core :: fmt:: Display for #parameterized_struct_name
16571657 where
16581658 #( #where_clauses) , *
16591659 {
1660- fn fmt( & self , f: & mut std :: fmt:: Formatter ) -> std :: fmt:: Result {
1661- std :: fmt:: Display :: fmt( & self . 0 , f)
1660+ fn fmt( & self , f: & mut core :: fmt:: Formatter ) -> core :: fmt:: Result {
1661+ core :: fmt:: Display :: fmt( & self . 0 , f)
16621662 }
16631663 }
16641664 } ;
16651665
16661666 let from_impl = quote ! {
1667- impl #generics std :: convert:: From <#inner_type> for #parameterized_struct_name
1667+ impl #generics core :: convert:: From <#inner_type> for #parameterized_struct_name
16681668 where
16691669 #( #where_clauses) , *
16701670 {
0 commit comments