1
Fork 0

couple of clippy::complexity fixes

This commit is contained in:
Matthias Krüger 2022-04-13 22:51:34 +02:00
parent 0d13f6afeb
commit 7c2d57e0fa
16 changed files with 25 additions and 29 deletions

View file

@ -39,7 +39,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
}
};
Constant { span, user_ty: None, literal: literal.into() }
Constant { span, user_ty: None, literal }
}
ExprKind::NonHirLiteral { lit, user_ty } => {
let user_ty = user_ty.map(|user_ty| {

View file

@ -423,11 +423,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
}
thir::InlineAsmOperand::Const { value, span } => {
mir::InlineAsmOperand::Const {
value: Box::new(Constant {
span,
user_ty: None,
literal: value.into(),
}),
value: Box::new(Constant { span, user_ty: None, literal: value }),
}
}
thir::InlineAsmOperand::SymFn { expr } => mir::InlineAsmOperand::SymFn {

View file

@ -441,7 +441,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
// Need to experiment.
user_ty: None,
literal: method.into(),
literal: method,
})),
args: vec![val, expect],
destination: Some((eq_result, eq_block)),