Skip to content

Commit 5033263

Browse files
committed
cleanups
1 parent 12cddf0 commit 5033263

File tree

2 files changed

+9
-19
lines changed

2 files changed

+9
-19
lines changed

compiler/rustc_ast/src/expand/autodiff_attrs.rs

-10
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use std::fmt::{self, Display, Formatter};
77
use std::str::FromStr;
88

9-
//use crate::expand::typetree::TypeTree;
109
use crate::expand::{Decodable, Encodable, HashStable_Generic};
1110
use crate::ptr::P;
1211
use crate::{Ty, TyKind};
@@ -79,10 +78,6 @@ pub struct AutoDiffItem {
7978
/// The name of the function being generated
8079
pub target: String,
8180
pub attrs: AutoDiffAttrs,
82-
///// Describe the memory layout of input types
83-
//pub inputs: Vec<TypeTree>,
84-
///// Describe the memory layout of the output type
85-
//pub output: TypeTree,
8681
}
8782
#[derive(Clone, Eq, PartialEq, Encodable, Decodable, Debug, HashStable_Generic)]
8883
pub struct AutoDiffAttrs {
@@ -266,19 +261,14 @@ impl AutoDiffAttrs {
266261
self,
267262
source: String,
268263
target: String,
269-
//inputs: Vec<TypeTree>,
270-
//output: TypeTree,
271264
) -> AutoDiffItem {
272265
AutoDiffItem { source, target, attrs: self }
273-
//AutoDiffItem { source, target, inputs, output, attrs: self }
274266
}
275267
}
276268

277269
impl fmt::Display for AutoDiffItem {
278270
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
279271
write!(f, "Differentiating {} -> {}", self.source, self.target)?;
280272
write!(f, " with attributes: {:?}", self.attrs)
281-
//write!(f, " with inputs: {:?}", self.inputs)?;
282-
//write!(f, " with output: {:?}", self.output)
283273
}
284274
}

compiler/rustc_codegen_llvm/src/builder.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
10901090
assert!(!flags.contains(MemFlags::NONTEMPORAL), "non-temporal memcpy not supported");
10911091
let size = self.intcast(size, self.type_isize(), false);
10921092
let is_volatile = flags.contains(MemFlags::VOLATILE);
1093-
let val = unsafe {
1093+
unsafe {
10941094
llvm::LLVMRustBuildMemCpy(
10951095
self.llbuilder,
10961096
dst,
@@ -1099,8 +1099,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
10991099
src_align.bytes() as c_uint,
11001100
size,
11011101
is_volatile,
1102-
)
1103-
};
1102+
);
1103+
}
11041104
}
11051105

11061106
fn memmove(
@@ -1115,7 +1115,7 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
11151115
assert!(!flags.contains(MemFlags::NONTEMPORAL), "non-temporal memmove not supported");
11161116
let size = self.intcast(size, self.type_isize(), false);
11171117
let is_volatile = flags.contains(MemFlags::VOLATILE);
1118-
let val = unsafe {
1118+
unsafe {
11191119
llvm::LLVMRustBuildMemMove(
11201120
self.llbuilder,
11211121
dst,
@@ -1124,8 +1124,8 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
11241124
src_align.bytes() as c_uint,
11251125
size,
11261126
is_volatile,
1127-
)
1128-
};
1127+
);
1128+
}
11291129
}
11301130

11311131
fn memset(
@@ -1138,16 +1138,16 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
11381138
) {
11391139
assert!(!flags.contains(MemFlags::NONTEMPORAL), "non-temporal memset not supported");
11401140
let is_volatile = flags.contains(MemFlags::VOLATILE);
1141-
let val = unsafe {
1141+
unsafe {
11421142
llvm::LLVMRustBuildMemSet(
11431143
self.llbuilder,
11441144
ptr,
11451145
align.bytes() as c_uint,
11461146
fill_byte,
11471147
size,
11481148
is_volatile,
1149-
)
1150-
};
1149+
);
1150+
}
11511151
}
11521152

11531153
fn select(

0 commit comments

Comments
 (0)