Skip to content

Commit ba04457

Browse files
committed
Auto merge of #158455 - JonathanBrouwer:rollup-3fPbHms, r=JonathanBrouwer
Rollup of 15 pull requests Successful merges: - rust-lang/rust#153697 (Add arg splat experiment initial tuple impl) - rust-lang/rust#158360 (Various borrowck cleanups and param_env/opaque_types_defined_by query simplifications for typeck children) - rust-lang/rust#158438 (Use rigidness marker in fast_reject) - rust-lang/rust#157127 (cg_LLVM: Stop needing an alloca for volatile loads) - rust-lang/rust#158376 (Suggest `>=` for `=>` typo in closure and call argument positions) - rust-lang/rust#158185 (perf: Make stable_crate_ids reads lock-free after crate loading) - rust-lang/rust#158244 (Attribute docs `deprecated` , `warn`, `allow`, `cfg`, `deny`, and `forbid` ) - rust-lang/rust#158355 (Fixup the refactoring errors in rust-lang/rust#156246) - rust-lang/rust#158361 (Move `check_ffi_pure` into the attribute parser) - rust-lang/rust#158382 (Add safety section for SliceIndex::get_unchecked(mut)) - rust-lang/rust#158399 (std: truncate thread names on NetBSD) - rust-lang/rust#158418 (Eliminate double length check in `Vec::into_array`) - rust-lang/rust#158430 (Guard clone suggestion against empty obligation errors) - rust-lang/rust#158446 (Update Enzyme submodule) - rust-lang/rust#158448 (Cleanup `NumBuffer` comment and replace `ilog(10)` with `ilog10()`)
2 parents 256413f + 50fdd69 commit ba04457

5 files changed

Lines changed: 6 additions & 0 deletions

File tree

crates/hir-ty/src/infer/callee.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,8 @@ impl<'db> InferenceContext<'_, 'db> {
173173
// impl forces the closure kind to `FnOnce` i.e. `u8`.
174174
let kind_ty = autoderef.ctx().table.next_ty_var(call_expr.into());
175175
let interner = autoderef.ctx().interner();
176+
177+
// Ignore splatting, it is unsupported on closures.
176178
let call_sig = interner.mk_fn_sig(
177179
[coroutine_closure_sig.tupled_inputs_ty],
178180
coroutine_closure_sig.to_coroutine(

crates/hir-ty/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ pub fn callable_sig_from_fn_trait<'db>(
464464
args.tuple_fields(),
465465
ret,
466466
false,
467+
// FIXME(splat): handle splatted arguments
467468
Safety::Safe,
468469
ExternAbi::Rust,
469470
));

crates/hir-ty/src/lower.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ impl<'db, 'a> TyLoweringContext<'db, 'a> {
637637
fn_.abi,
638638
if fn_.is_unsafe { Safety::Unsafe } else { Safety::Safe },
639639
fn_.is_varargs,
640+
// FIXME(splat): handle splatted arguments
640641
),
641642
inputs_and_output: Tys::new_from_slice(&args),
642643
}),

crates/hir-ty/src/next_solver/interner.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2238,6 +2238,7 @@ impl<'db> DbInterner<'db> {
22382238
self.replace_escaping_bound_vars_uncached(value.skip_binder(), delegate)
22392239
}
22402240

2241+
// FIXME: add splat support when the experiment is complete
22412242
pub fn mk_fn_sig<I>(
22422243
self,
22432244
inputs: I,

crates/hir-ty/src/next_solver/ty.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,6 +1514,7 @@ impl<'db> DbInterner<'db> {
15141514
TyKind::Tuple(params) => params,
15151515
_ => panic!(),
15161516
};
1517+
// Ignore splatting, it is unsupported on closures.
15171518
self.mk_fn_sig(params, s.output(), s.c_variadic(), safety, ExternAbi::Rust)
15181519
})
15191520
}

0 commit comments

Comments
 (0)