@@ -63,9 +63,19 @@ use crate::util::Config;
6363use crate :: util:: { existing_vcs_repo, LockServer , LockServerClient } ;
6464use crate :: { drop_eprint, drop_eprintln} ;
6565
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.
6670const FIX_ENV : & str = "__CARGO_FIX_PLZ" ;
71+ /// **Internal only.**
72+ /// For passing [`FixOptions::broken_code`] through to cargo running in proxy mode.
6773const BROKEN_CODE_ENV : & str = "__CARGO_FIX_BROKEN_CODE" ;
74+ /// **Internal only.**
75+ /// For passing [`FixOptions::edition`] through to cargo running in proxy mode.
6876const EDITION_ENV : & str = "__CARGO_FIX_EDITION" ;
77+ /// **Internal only.**
78+ /// For passing [`FixOptions::idioms`] through to cargo running in proxy mode.
6979const IDIOMS_ENV : & str = "__CARGO_FIX_IDIOMS" ;
7080
7181pub struct FixOptions {
@@ -339,6 +349,9 @@ to prevent this issue from happening.
339349/// Returns `None` if `fix` is not being run (not in proxy mode). Returns
340350/// `Some(...)` if in `fix` proxy mode
341351pub 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) ]
342355 env:: var ( FIX_ENV ) . ok ( )
343356}
344357
@@ -847,8 +860,14 @@ impl FixArgs {
847860 }
848861
849862 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) ]
850866 let idioms = env:: var ( IDIOMS_ENV ) . is_ok ( ) ;
851867
868+ // ALLOWED: For the internal mechanism of `cargo fix` only.
869+ // Shouldn't be set directly by anyone.
870+ #[ allow( clippy:: disallowed_methods) ]
852871 let prepare_for_edition = env:: var ( EDITION_ENV ) . ok ( ) . map ( |_| {
853872 enabled_edition
854873 . unwrap_or ( Edition :: Edition2015 )
0 commit comments