Rollup merge of #158448 - GuillaumeGomez:cleanup-numbuffer, r=Amanieu Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()` A [nice person from mastodon](https://toot.cat/@jamey/116815991086205506) pointed out that a `FIXME` comment should have been removed alongside the others in https://github.com/rust-lang/rust/pull/157976, and also pointed out that the documentation mentions that `ilog10` is more optimized than `ilog(10)`. Shouldn't matter much here but since I already made a PR to remove the FIXME comment... r? @Amanieu
diff --git a/crates/hir-ty/src/infer/callee.rs b/crates/hir-ty/src/infer/callee.rs index 057ba7f..a661731 100644 --- a/crates/hir-ty/src/infer/callee.rs +++ b/crates/hir-ty/src/infer/callee.rs
@@ -173,6 +173,8 @@ // impl forces the closure kind to `FnOnce` i.e. `u8`. let kind_ty = autoderef.ctx().table.next_ty_var(call_expr.into()); let interner = autoderef.ctx().interner(); + + // Ignore splatting, it is unsupported on closures. let call_sig = interner.mk_fn_sig( [coroutine_closure_sig.tupled_inputs_ty], coroutine_closure_sig.to_coroutine(
diff --git a/crates/hir-ty/src/lib.rs b/crates/hir-ty/src/lib.rs index cc48ba0..1fddfc0 100644 --- a/crates/hir-ty/src/lib.rs +++ b/crates/hir-ty/src/lib.rs
@@ -464,6 +464,7 @@ args.tuple_fields(), ret, false, + // FIXME(splat): handle splatted arguments Safety::Safe, ExternAbi::Rust, ));
diff --git a/crates/hir-ty/src/lower.rs b/crates/hir-ty/src/lower.rs index fae63dd..d63ac7f 100644 --- a/crates/hir-ty/src/lower.rs +++ b/crates/hir-ty/src/lower.rs
@@ -637,6 +637,7 @@ fn_.abi, if fn_.is_unsafe { Safety::Unsafe } else { Safety::Safe }, fn_.is_varargs, + // FIXME(splat): handle splatted arguments ), inputs_and_output: Tys::new_from_slice(&args), }),
diff --git a/crates/hir-ty/src/next_solver/interner.rs b/crates/hir-ty/src/next_solver/interner.rs index ef626fc..3c2976e 100644 --- a/crates/hir-ty/src/next_solver/interner.rs +++ b/crates/hir-ty/src/next_solver/interner.rs
@@ -2238,6 +2238,7 @@ self.replace_escaping_bound_vars_uncached(value.skip_binder(), delegate) } + // FIXME: add splat support when the experiment is complete pub fn mk_fn_sig<I>( self, inputs: I,
diff --git a/crates/hir-ty/src/next_solver/ty.rs b/crates/hir-ty/src/next_solver/ty.rs index fe31d44..d57d824 100644 --- a/crates/hir-ty/src/next_solver/ty.rs +++ b/crates/hir-ty/src/next_solver/ty.rs
@@ -1514,6 +1514,7 @@ TyKind::Tuple(params) => params, _ => panic!(), }; + // Ignore splatting, it is unsupported on closures. self.mk_fn_sig(params, s.output(), s.c_variadic(), safety, ExternAbi::Rust) }) }