@@ -9,7 +9,7 @@ use anyhow::{anyhow, Error, Result};
9
9
use clap:: { builder:: PossibleValue , Args , CommandFactory , Parser , Subcommand , ValueEnum } ;
10
10
use clap_complete:: Shell ;
11
11
use itertools:: Itertools ;
12
- use tracing:: { error , info, trace, warn} ;
12
+ use tracing:: { info, trace, warn} ;
13
13
14
14
use crate :: {
15
15
cli:: {
@@ -817,16 +817,8 @@ async fn update(cfg: &mut Cfg<'_>, opts: UpdateOpts) -> Result<utils::ExitCode>
817
817
// This needs another pass to fix it all up
818
818
if name. has_triple ( ) {
819
819
let host_arch = TargetTriple :: from_host_or_build ( cfg. process ) ;
820
-
821
820
let target_triple = name. clone ( ) . resolve ( & host_arch) ?. target ;
822
- if !forced && !host_arch. can_run ( & target_triple) ? {
823
- error ! ( "DEPRECATED: future versions of rustup will require --force-non-host to install a non-host toolchain." ) ;
824
- warn ! ( "toolchain '{name}' may not be able to run on this system." ) ;
825
- warn ! (
826
- "If you meant to build software to target that platform, perhaps try `rustup target add {}` instead?" ,
827
- target_triple. to_string( )
828
- ) ;
829
- }
821
+ common:: warn_if_host_is_incompatible ( & name, & host_arch, & target_triple, forced) ?;
830
822
}
831
823
let desc = name. resolve ( & cfg. get_default_host_triple ( ) ?) ?;
832
824
0 commit comments