rust/tests
Matthias Krüger a4f323ce9c
Rollup merge of #132583 - mejrs:tuples, r=compiler-errors
Suggest creating unary tuples when types don't match a trait

When you want to have a variadic function, a common workaround to implement this is to create a trait and then implement that trait for various tuples. For example in `pyo3` there exists
```rust
/// Calls the object with only positional arguments.
pub fn call1(&self, args: impl IntoPy<Py<PyTuple>>) -> PyResult<&PyAny> {
   ...
}
```

with various impls like
```rust
impl<A: IntoPy<PyObject> IntoPy<Py<PyAny>> for (A,)
impl<A: IntoPy<PyObject, B: IntoPy<PyObject> IntoPy<Py<PyAny>> for (A, B)
... etc
```

This means that if you want to call the method with a single item you have to create a unary tuple, like `(x,)`, rather than just `x`.

This PR implements a suggestion to do that, if applicable.
2024-11-04 18:12:48 +01:00
..
assembly Rollup merge of #132457 - taiki-e:needless-feature, r=workingjubilee 2024-11-02 08:33:13 +01:00
auxiliary Fix typo in tests/auxiliary/minicore.rs 2024-11-03 17:32:33 +09:00
codegen Rollup merge of #132170 - veera-sivarajan:codegen-tests, r=jieyouxu 2024-11-02 08:33:10 +01:00
codegen-units
coverage coverage: Regression test for inlining into an uninstrumented crate 2024-11-02 23:20:14 +11:00
coverage-run-rustdoc
crashes Yeet effects feature 2024-11-03 18:59:31 +00:00
debuginfo
incremental
mir-opt
pretty
run-make Remove is_builtin target spec field 2024-11-03 21:06:49 +00:00
rustdoc Rename the FIXMEs, remove a few that dont matter anymore 2024-11-03 18:59:41 +00:00
rustdoc-gui
rustdoc-js
rustdoc-js-std
rustdoc-json
rustdoc-ui
ui Rollup merge of #132583 - mejrs:tuples, r=compiler-errors 2024-11-04 18:12:48 +01:00
ui-fulldeps Don't test new error messages with the stage 0 compiler 2024-11-03 14:32:25 -08:00
COMPILER_TESTS.md