Skip to content

Commit 7996df9

Browse files
committed
Run format.
1 parent 7ca1b2f commit 7996df9

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

src/librustc_codegen_ssa/back/link.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,8 @@ fn link_args<'a, B: ArchiveBuilder<'a>>(
12881288
let more_args = &sess.opts.cg.link_arg;
12891289
let mut args = args.iter().chain(more_args.iter()).chain(used_link_args.iter());
12901290

1291-
if is_pic(sess) && !sess.crt_static(Some(crate_type)) && !args.any(|x| *x == "-static") {
1291+
if is_pic(sess) && !sess.crt_static(Some(crate_type)) && !args.any(|x| *x == "-static")
1292+
{
12921293
position_independent_executable = true;
12931294
}
12941295
}

src/librustc_codegen_utils/link.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,9 @@ pub fn invalid_output_for_target(sess: &Session, crate_type: config::CrateType)
167167
if !sess.target.target.options.dynamic_linking {
168168
return true;
169169
}
170-
if sess.crt_static(Some(crate_type)) && !sess.target.target.options.crt_static_allows_dylibs {
170+
if sess.crt_static(Some(crate_type))
171+
&& !sess.target.target.options.crt_static_allows_dylibs
172+
{
171173
return true;
172174
}
173175
}

src/librustc_metadata/dependency_format.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ fn calculate_type(tcx: TyCtxt<'_>, ty: config::CrateType) -> DependencyList {
9797

9898
// If the global prefer_dynamic switch is turned off, or the final
9999
// executable will be statically linked, prefer static crate linkage.
100-
config::CrateType::Executable if !sess.opts.cg.prefer_dynamic || sess.crt_static(Some(ty)) => {
100+
config::CrateType::Executable
101+
if !sess.opts.cg.prefer_dynamic || sess.crt_static(Some(ty)) =>
102+
{
101103
Linkage::Static
102104
}
103105
config::CrateType::Executable => Linkage::Dynamic,

src/librustc_session/session.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ impl Session {
564564
Some(config::CrateType::ProcMacro) => found_positive,
565565
Some(_) => !found_negative,
566566
None => {
567-
// FIXME: When crate_type is not available,
567+
// FIXME: When crate_type is not available,
568568
// we use compiler options to determine the crate_type.
569569
// We can't check `#![crate_type = "proc-macro"]` here.
570570
if self.opts.crate_types.contains(&config::CrateType::ProcMacro) {

0 commit comments

Comments
 (0)