Skip to content

Commit 4123fed

Browse files
hellow554est31
authored andcommitted
remove box_syntax uses from cranelift and tools
1 parent d9c3f0d commit 4123fed

File tree

3 files changed

+247
-248
lines changed

3 files changed

+247
-248
lines changed

clippy_lints/src/booleans.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
116116
// prevent folding of `cfg!` macros and the like
117117
if !e.span.from_expansion() {
118118
match &e.kind {
119-
ExprKind::Unary(UnOp::Not, inner) => return Ok(Bool::Not(box self.run(inner)?)),
119+
ExprKind::Unary(UnOp::Not, inner) => return Ok(Bool::Not(Box::new(self.run(inner)?))),
120120
ExprKind::Binary(binop, lhs, rhs) => match &binop.node {
121121
BinOpKind::Or => {
122122
return Ok(Bool::Or(self.extract(BinOpKind::Or, &[lhs, rhs], Vec::new())?));

clippy_lints/src/doc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,8 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
578578
let filename = FileName::anon_source_code(&code);
579579

580580
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
581-
let emitter = EmitterWriter::new(box io::sink(), None, false, false, false, None, false);
582-
let handler = Handler::with_emitter(false, None, box emitter);
581+
let emitter = EmitterWriter::new(Box::new(io::sink()), None, false, false, false, None, false);
582+
let handler = Handler::with_emitter(false, None, Box::new(emitter));
583583
let sess = ParseSess::with_span_handler(handler, sm);
584584

585585
let mut parser = match maybe_new_parser_from_source_str(&sess, filename, code) {

0 commit comments

Comments
 (0)