Skip to content

Commit cc30c20

Browse files
committed
Silence some warnings
1 parent 43e23af commit cc30c20

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

src/base.rs

+1
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ fn codegen_fn_content(fx: &mut FunctionCx<'_, '_, impl Backend>) {
283283

284284
fn trans_stmt<'tcx>(
285285
fx: &mut FunctionCx<'_, 'tcx, impl Backend>,
286+
#[allow(unused_variables)]
286287
cur_block: Block,
287288
stmt: &Statement<'tcx>,
288289
) {

src/debuginfo/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ impl<'tcx> DebugContext<'tcx> {
124124
ty::Uint(_) => primitive(&mut self.dwarf, gimli::DW_ATE_unsigned),
125125
ty::Int(_) => primitive(&mut self.dwarf, gimli::DW_ATE_signed),
126126
ty::Float(_) => primitive(&mut self.dwarf, gimli::DW_ATE_float),
127-
ty::Ref(_, pointee_ty, mutbl)
127+
ty::Ref(_, pointee_ty, _mutbl)
128128
| ty::RawPtr(ty::TypeAndMut {
129129
ty: pointee_ty,
130-
mutbl,
130+
mutbl: _mutbl,
131131
}) => {
132132
let type_id = new_entry(&mut self.dwarf, gimli::DW_TAG_pointer_type);
133133

src/intrinsics/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ macro intrinsic_match {
4444
$(
4545
$($($name:tt).*)|+ $(if $cond:expr)?, $(<$($subst:ident),*>)? ($($a:ident $arg:ident),*) $content:block;
4646
)*) => {
47+
let _ = $substs; // Silence warning when substs is unused.
4748
match $intrinsic {
4849
$(
4950
$(intrinsic_pat!($($name).*))|* $(if $cond)? => {

src/intrinsics/simd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
1717
intrinsic_match! {
1818
fx, intrinsic, substs, args,
1919
_ => {
20-
fx.tcx.sess.fatal(&format!("Unknown SIMD intrinsic {}", intrinsic));
20+
fx.tcx.sess.span_fatal(span, &format!("Unknown SIMD intrinsic {}", intrinsic));
2121
};
2222

2323
simd_cast, (c a) {
@@ -104,7 +104,7 @@ pub(super) fn codegen_simd_intrinsic_call<'tcx>(
104104
}
105105
};
106106

107-
simd_insert, (c base, o idx, v val) {
107+
simd_insert, (c base, o idx, v _val) {
108108
let idx_const = if let Some(idx_const) = crate::constant::mir_operand_get_const_val(fx, idx) {
109109
idx_const
110110
} else {

src/optimize/stack2reg.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ impl<'a> OptimizeContext<'a> {
155155

156156
pub(super) fn optimize_function<T: std::fmt::Debug>(
157157
ctx: &mut Context,
158-
clif_comments: &mut crate::pretty_clif::CommentWriter,
158+
_clif_comments: &mut crate::pretty_clif::CommentWriter,
159159
name: T,
160160
) {
161161
combine_stack_addr_with_load_store(&mut ctx.func);

0 commit comments

Comments
 (0)