Unnamed repository; edit this file 'description' to name the repository.
Merge pull request #22663 from rust-lang/rustc-pull
Rustc pull update
| -rw-r--r-- | crates/hir-ty/src/infer/callee.rs | 2 | ||||
| -rw-r--r-- | crates/hir-ty/src/lib.rs | 1 | ||||
| -rw-r--r-- | crates/hir-ty/src/lower.rs | 1 | ||||
| -rw-r--r-- | crates/hir-ty/src/next_solver/interner.rs | 1 | ||||
| -rw-r--r-- | crates/hir-ty/src/next_solver/ty.rs | 1 | ||||
| -rw-r--r-- | rust-version | 2 |
6 files changed, 7 insertions, 1 deletions
diff --git a/crates/hir-ty/src/infer/callee.rs b/crates/hir-ty/src/infer/callee.rs index 057ba7fa86..a661731e60 100644 --- a/crates/hir-ty/src/infer/callee.rs +++ b/crates/hir-ty/src/infer/callee.rs @@ -173,6 +173,8 @@ impl<'db> InferenceContext<'_, 'db> { // 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 cc48ba06db..1fddfc09c6 100644 --- a/crates/hir-ty/src/lib.rs +++ b/crates/hir-ty/src/lib.rs @@ -464,6 +464,7 @@ pub fn callable_sig_from_fn_trait<'db>( 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 fae63ddc2d..d63ac7f7a0 100644 --- a/crates/hir-ty/src/lower.rs +++ b/crates/hir-ty/src/lower.rs @@ -637,6 +637,7 @@ impl<'db, 'a> TyLoweringContext<'db, 'a> { 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 ef626fc0c8..3c2976eccd 100644 --- a/crates/hir-ty/src/next_solver/interner.rs +++ b/crates/hir-ty/src/next_solver/interner.rs @@ -2238,6 +2238,7 @@ impl<'db> DbInterner<'db> { 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 fe31d44207..d57d824e32 100644 --- a/crates/hir-ty/src/next_solver/ty.rs +++ b/crates/hir-ty/src/next_solver/ty.rs @@ -1514,6 +1514,7 @@ impl<'db> DbInterner<'db> { 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) }) } diff --git a/rust-version b/rust-version index 5db47ca8fc..f930573748 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -942ac9ce4116d4ea784c9882659372b34978b1f8 +7fb284d9037fa54f6a9b24261c82b394472cbfd7 |