File tree 2 files changed +18
-1
lines changed 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 97
97
Ok ( Option :: deserialize ( deserializer) ?. unwrap_or ( 0.0 ) )
98
98
}
99
99
100
+ pub fn version_supports_doc ( version_str : & str ) -> bool {
101
+ if let Some ( version) = version_str. parse :: < semver:: Version > ( ) . ok ( ) {
102
+ version >= semver:: Version :: new ( 1 , 46 , 0 )
103
+ } else {
104
+ assert ! ( version_str. starts_with( "beta" ) || version_str. starts_with( "master" ) ) ;
105
+ true
106
+ }
107
+ }
108
+
100
109
pub fn version_supports_incremental ( version_str : & str ) -> bool {
101
110
if let Some ( version) = version_str. parse :: < semver:: Version > ( ) . ok ( ) {
102
111
version >= semver:: Version :: new ( 1 , 24 , 0 )
Original file line number Diff line number Diff line change @@ -646,6 +646,14 @@ fn main_result() -> anyhow::Result<i32> {
646
646
} else {
647
647
RunKind :: all_non_incr ( )
648
648
} ;
649
+ let build_kinds = if collector:: version_supports_doc ( toolchain) {
650
+ BuildKind :: all ( )
651
+ } else {
652
+ let mut all = BuildKind :: all ( ) ;
653
+ let doc = all. iter ( ) . position ( |bk| * bk == BuildKind :: Doc ) . unwrap ( ) ;
654
+ all. remove ( doc) ;
655
+ all
656
+ } ;
649
657
650
658
let which = |tool| {
651
659
String :: from_utf8 (
@@ -672,7 +680,7 @@ fn main_result() -> anyhow::Result<i32> {
672
680
& mut rt,
673
681
conn,
674
682
& ArtifactId :: Artifact ( toolchain. to_string ( ) ) ,
675
- & BuildKind :: all ( ) ,
683
+ & build_kinds ,
676
684
& run_kinds,
677
685
Compiler {
678
686
rustc : Path :: new ( rustc. trim ( ) ) ,
You can’t perform that action at this time.
0 commit comments