@@ -50,7 +50,7 @@ pub struct Builder<'a> {
5050
5151    /// A stack of [`Step`]s to run before we can run this builder. The output 
5252/// of steps is cached in [`Self::cache`]. 
53- stack :  RefCell < Vec < Box < dyn  Any > > > , 
53+ stack :  RefCell < Vec < Box < dyn  AnyDebug > > > , 
5454
5555    /// The total amount of time we spent running [`Step`]s in [`Self::stack`]. 
5656time_spent_on_dependencies :  Cell < Duration > , 
@@ -69,6 +69,21 @@ impl Deref for Builder<'_> {
6969    } 
7070} 
7171
72+ /// This trait is similar to `Any`, except that it also exposes the underlying 
73+ /// type's [`Debug`] implementation. 
74+ /// 
75+ /// (Trying to debug-print `dyn Any` results in the unhelpful `"Any { .. }"`.) 
76+ trait  AnyDebug :  Any  + Debug  { } 
77+ impl < T :  Any  + Debug >  AnyDebug  for  T  { } 
78+ impl  dyn  AnyDebug  { 
79+     /// Equivalent to `<dyn Any>::downcast_ref`. 
80+ fn  downcast_ref < T :  Any > ( & self )  -> Option < & T >  { 
81+         ( self  as  & dyn  Any ) . downcast_ref ( ) 
82+     } 
83+ 
84+     // Feel free to add other `dyn Any` methods as necessary. 
85+ } 
86+ 
7287pub  trait  Step :  ' static  + Clone  + Debug  + PartialEq  + Eq  + Hash  { 
7388    /// Result type of `Step::run`. 
7489type  Output :  Clone ; 
@@ -1101,6 +1116,7 @@ impl<'a> Builder<'a> {
11011116                run:: GenerateCompletions , 
11021117                run:: UnicodeTableGenerator , 
11031118                run:: FeaturesStatusDump , 
1119+                 run:: CyclicStep , 
11041120            ) , 
11051121            Kind :: Setup  => { 
11061122                describe ! ( setup:: Profile ,  setup:: Hook ,  setup:: Link ,  setup:: Editor ) 
0 commit comments