Skip to content

Commit

Permalink
remove box_syntax uses from cranelift and tools
Browse files Browse the repository at this point in the history
  • Loading branch information
hellow554 authored and est31 committed Aug 18, 2021
1 parent d9c3f0d commit 4123fed
Show file tree
Hide file tree
Showing 3 changed files with 247 additions and 248 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/booleans.rs
Expand Up @@ -116,7 +116,7 @@ impl<'a, 'tcx, 'v> Hir2Qmm<'a, 'tcx, 'v> {
// prevent folding of `cfg!` macros and the like
if !e.span.from_expansion() {
match &e.kind {
ExprKind::Unary(UnOp::Not, inner) => return Ok(Bool::Not(box self.run(inner)?)),
ExprKind::Unary(UnOp::Not, inner) => return Ok(Bool::Not(Box::new(self.run(inner)?))),
ExprKind::Binary(binop, lhs, rhs) => match &binop.node {
BinOpKind::Or => {
return Ok(Bool::Or(self.extract(BinOpKind::Or, &[lhs, rhs], Vec::new())?));
Expand Down
4 changes: 2 additions & 2 deletions clippy_lints/src/doc.rs
Expand Up @@ -578,8 +578,8 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
let filename = FileName::anon_source_code(&code);

let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
let emitter = EmitterWriter::new(box io::sink(), None, false, false, false, None, false);
let handler = Handler::with_emitter(false, None, box emitter);
let emitter = EmitterWriter::new(Box::new(io::sink()), None, false, false, false, None, false);
let handler = Handler::with_emitter(false, None, Box::new(emitter));
let sess = ParseSess::with_span_handler(handler, sm);

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

0 comments on commit 4123fed

Please sign in to comment.