@@ -857,7 +857,7 @@ impl dyn Error + Send + Sync {
857
857
/// ```
858
858
#[ unstable( feature = "error_reporter" , issue = "90172" ) ]
859
859
pub struct Report < E > {
860
- source : E ,
860
+ error : E ,
861
861
show_backtrace : bool ,
862
862
pretty : bool ,
863
863
}
@@ -868,8 +868,8 @@ where
868
868
{
869
869
/// Create a new `Report` from an input error.
870
870
#[ unstable( feature = "error_reporter" , issue = "90172" ) ]
871
- pub fn new ( source : E ) -> Report < E > {
872
- Report { source , show_backtrace : false , pretty : false }
871
+ pub fn new ( error : E ) -> Report < E > {
872
+ Report { error , show_backtrace : false , pretty : false }
873
873
}
874
874
875
875
/// Enable pretty-printing the report.
@@ -889,9 +889,9 @@ where
889
889
/// Format the report as a single line.
890
890
#[ unstable( feature = "error_reporter" , issue = "90172" ) ]
891
891
fn fmt_singleline ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
892
- write ! ( f, "{}" , self . source ) ?;
892
+ write ! ( f, "{}" , self . error ) ?;
893
893
894
- let sources = self . source . source ( ) . into_iter ( ) . flat_map ( <dyn Error >:: chain) ;
894
+ let sources = self . error . source ( ) . into_iter ( ) . flat_map ( <dyn Error >:: chain) ;
895
895
896
896
for cause in sources {
897
897
write ! ( f, ": {}" , cause) ?;
@@ -903,7 +903,7 @@ where
903
903
/// Format the report as multiple lines, with each error cause on its own line.
904
904
#[ unstable( feature = "error_reporter" , issue = "90172" ) ]
905
905
fn fmt_multiline ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
906
- let error = & self . source ;
906
+ let error = & self . error ;
907
907
908
908
write ! ( f, "{}" , error) ?;
909
909
@@ -950,8 +950,8 @@ impl<E> From<E> for Report<E>
950
950
where
951
951
E : Error ,
952
952
{
953
- fn from ( source : E ) -> Self {
954
- Report :: new ( source )
953
+ fn from ( error : E ) -> Self {
954
+ Report :: new ( error )
955
955
}
956
956
}
957
957
0 commit comments