Skip to content

Commit ef6f8b5

Browse files
committed
fix some formats
1 parent 7a2a604 commit ef6f8b5

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

crates/cuda_builder/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,8 @@ impl CudaBuilder {
441441
/// .crate_memory_space("my_crate", MemorySpace::Constant);
442442
/// ```
443443
pub fn crate_memory_space(mut self, crate_name: &str, space: MemorySpace) -> Self {
444-
self.crate_memory_overrides.push((crate_name.to_string(), space));
444+
self.crate_memory_overrides
445+
.push((crate_name.to_string(), space));
445446
self
446447
}
447448

crates/rustc_codegen_nvvm/src/context.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,10 +465,10 @@ impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> {
465465
return AddressSpace(1);
466466
}
467467

468-
// If successfully placed in constant memory: update cumulative usage
468+
// If successfully placed in constant memory: update cumulative usage
469469
self.constant_memory_usage.set(new_usage);
470470

471-
// If approaching the threshold: warns
471+
// If approaching the threshold: warns
472472
if new_usage > CONSTANT_MEMORY_WARNING_THRESHOLD_BYTES
473473
&& current_usage <= CONSTANT_MEMORY_WARNING_THRESHOLD_BYTES
474474
{
@@ -781,7 +781,6 @@ impl MemorySpace {
781781
_ => None,
782782
}
783783
}
784-
785784
}
786785

787786
#[derive(Default, Clone)]
@@ -863,7 +862,9 @@ impl CodegenArgs {
863862
"invalid memory space '{space_str}', expected 'global' or 'constant'"
864863
))
865864
});
866-
cg_args.static_memory_overrides.push((path.to_string(), space));
865+
cg_args
866+
.static_memory_overrides
867+
.push((path.to_string(), space));
867868
} else if let Some(val) = arg.strip_prefix("--crate-memory=") {
868869
// Format: "crate_name=global" or "crate_name=constant"
869870
let (crate_name, space_str) = val.rsplit_once('=').unwrap_or_else(|| {
@@ -876,7 +877,9 @@ impl CodegenArgs {
876877
"invalid memory space '{space_str}', expected 'global' or 'constant'"
877878
))
878879
});
879-
cg_args.crate_memory_overrides.push((crate_name.to_string(), space));
880+
cg_args
881+
.crate_memory_overrides
882+
.push((crate_name.to_string(), space));
880883
} else {
881884
// Do this only after all the other flags above have been tried.
882885
match NvvmOption::from_str(arg) {

0 commit comments

Comments
 (0)