@@ -24,7 +24,6 @@ pub use crate::flags::Subcommand;
24
24
use crate :: flags:: { Color , Flags , Warnings } ;
25
25
use crate :: util:: { exe, output, t} ;
26
26
use once_cell:: sync:: OnceCell ;
27
- use semver:: Version ;
28
27
use serde:: { Deserialize , Deserializer } ;
29
28
use serde_derive:: Deserialize ;
30
29
@@ -1118,7 +1117,6 @@ impl Config {
1118
1117
config. download_beta_toolchain ( ) ;
1119
1118
config. out . join ( config. build . triple ) . join ( "stage0/bin/rustc" )
1120
1119
} ) ;
1121
-
1122
1120
config. initial_cargo = build
1123
1121
. cargo
1124
1122
. map ( |cargo| {
@@ -1780,42 +1778,6 @@ impl Config {
1780
1778
self . rust_codegen_backends . get ( 0 ) . cloned ( )
1781
1779
}
1782
1780
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
-
1819
1781
/// Returns the commit to download, or `None` if we shouldn't download CI artifacts.
1820
1782
fn download_ci_rustc_commit ( & self , download_rustc : Option < StringOrBool > ) -> Option < String > {
1821
1783
// If `download-rustc` is not set, default to rebuilding.
0 commit comments