@@ -24,7 +24,6 @@ pub use crate::flags::Subcommand;
2424use crate :: flags:: { Color , Flags , Warnings } ;
2525use crate :: util:: { exe, output, t} ;
2626use once_cell:: sync:: OnceCell ;
27- use semver:: Version ;
2827use serde:: { Deserialize , Deserializer } ;
2928use serde_derive:: Deserialize ;
3029
@@ -1118,7 +1117,6 @@ impl Config {
11181117 config. download_beta_toolchain ( ) ;
11191118 config. out . join ( config. build . triple ) . join ( "stage0/bin/rustc" )
11201119 } ) ;
1121-
11221120 config. initial_cargo = build
11231121 . cargo
11241122 . map ( |cargo| {
@@ -1780,42 +1778,6 @@ impl Config {
17801778 self . rust_codegen_backends . get ( 0 ) . cloned ( )
17811779 }
17821780
1783- pub fn check_build_rustc_version ( & self ) {
1784- if self . dry_run ( ) {
1785- return ;
1786- }
1787-
1788- // check rustc version is same or lower with 1 apart from the building one
1789- let mut cmd = Command :: new ( & self . initial_rustc ) ;
1790- cmd. arg ( "--version" ) ;
1791- let rustc_output = output ( & mut cmd)
1792- . lines ( )
1793- . next ( )
1794- . unwrap ( )
1795- . split ( ' ' )
1796- . nth ( 1 )
1797- . unwrap ( )
1798- . split ( '-' )
1799- . next ( )
1800- . unwrap ( )
1801- . to_owned ( ) ;
1802- let rustc_version = Version :: parse ( & rustc_output. trim ( ) ) . unwrap ( ) ;
1803- let source_version =
1804- Version :: parse ( & fs:: read_to_string ( self . src . join ( "src/version" ) ) . unwrap ( ) . trim ( ) )
1805- . unwrap ( ) ;
1806- if !( source_version == rustc_version
1807- || ( source_version. major == rustc_version. major
1808- && source_version. minor == rustc_version. minor + 1 ) )
1809- {
1810- let prev_version = format ! ( "{}.{}.x" , source_version. major, source_version. minor - 1 ) ;
1811- eprintln ! (
1812- "Unexpected rustc version: {}, we should use {}/{} to build source with {}" ,
1813- rustc_version, prev_version, source_version, source_version
1814- ) ;
1815- crate :: detail_exit ( 1 ) ;
1816- }
1817- }
1818-
18191781 /// Returns the commit to download, or `None` if we shouldn't download CI artifacts.
18201782 fn download_ci_rustc_commit ( & self , download_rustc : Option < StringOrBool > ) -> Option < String > {
18211783 // If `download-rustc` is not set, default to rebuilding.
0 commit comments