@@ -63,9 +63,19 @@ use crate::util::Config;
63
63
use crate :: util:: { existing_vcs_repo, LockServer , LockServerClient } ;
64
64
use crate :: { drop_eprint, drop_eprintln} ;
65
65
66
+ /// **Internal only.**
67
+ /// Indicates Cargo is in fix-proxy-mode if presents.
68
+ /// The value of it is the socket address of the [`LockServer`] being used.
69
+ /// See the [module-level documentation](mod@super::fix) for more.
66
70
const FIX_ENV : & str = "__CARGO_FIX_PLZ" ;
71
+ /// **Internal only.**
72
+ /// For passing [`FixOptions::broken_code`] through to cargo running in proxy mode.
67
73
const BROKEN_CODE_ENV : & str = "__CARGO_FIX_BROKEN_CODE" ;
74
+ /// **Internal only.**
75
+ /// For passing [`FixOptions::edition`] through to cargo running in proxy mode.
68
76
const EDITION_ENV : & str = "__CARGO_FIX_EDITION" ;
77
+ /// **Internal only.**
78
+ /// For passing [`FixOptions::idioms`] through to cargo running in proxy mode.
69
79
const IDIOMS_ENV : & str = "__CARGO_FIX_IDIOMS" ;
70
80
71
81
pub struct FixOptions {
@@ -339,6 +349,9 @@ to prevent this issue from happening.
339
349
/// Returns `None` if `fix` is not being run (not in proxy mode). Returns
340
350
/// `Some(...)` if in `fix` proxy mode
341
351
pub fn fix_get_proxy_lock_addr ( ) -> Option < String > {
352
+ // ALLOWED: For the internal mechanism of `cargo fix` only.
353
+ // Shouldn't be set directly by anyone.
354
+ #[ allow( clippy:: disallowed_methods) ]
342
355
env:: var ( FIX_ENV ) . ok ( )
343
356
}
344
357
@@ -847,8 +860,14 @@ impl FixArgs {
847
860
}
848
861
849
862
let file = file. ok_or_else ( || anyhow:: anyhow!( "could not find .rs file in rustc args" ) ) ?;
863
+ // ALLOWED: For the internal mechanism of `cargo fix` only.
864
+ // Shouldn't be set directly by anyone.
865
+ #[ allow( clippy:: disallowed_methods) ]
850
866
let idioms = env:: var ( IDIOMS_ENV ) . is_ok ( ) ;
851
867
868
+ // ALLOWED: For the internal mechanism of `cargo fix` only.
869
+ // Shouldn't be set directly by anyone.
870
+ #[ allow( clippy:: disallowed_methods) ]
852
871
let prepare_for_edition = env:: var ( EDITION_ENV ) . ok ( ) . map ( |_| {
853
872
enabled_edition
854
873
. unwrap_or ( Edition :: Edition2015 )
0 commit comments