rust/tests
Matthias Krüger 510fc3432e
Rollup merge of #129550 - kornelski:boxasstr, r=joshtriplett,dtolnay
Add str.as_str() for easy Deref to string slices

Working with `Box<str>` is cumbersome, because in places like `iter.filter()` it can end up being `&Box<str>` or even `&&Box<str>`, and such type doesn't always get auto-dereferenced as expected.

Dereferencing such box to `&str` requires ugly syntax like `&**boxed_str` or `&***boxed_str`, with the exact amount of `*`s.

`Box<str>` is [not easily comparable with other string types](https://github.com/rust-lang/rust/pull/129852) via `PartialEq`. `Box<str>` won't work for lookups in types like `HashSet<String>`, because `Borrow<String>` won't take types like `&Box<str>`. OTOH `set.contains(s.as_str())` works nicely regardless of levels of indirection.

`String` has a simple solution for this: the `as_str()` method, and `Box<str>` should too.
2024-09-23 06:45:32 +02:00
..
assembly Add assembly test for the cmse unstable features 2024-09-21 13:05:23 +02:00
auxiliary Clean up users of rust_dbg_call 2024-04-17 15:08:08 -04:00
codegen Auto merge of #129283 - saethlin:unreachable-allocas, r=scottmcm 2024-09-21 13:48:14 +00:00
codegen-units Fix and enable disabled codegen-units tests 2024-08-10 14:03:27 -04:00
coverage Update the minimum external LLVM to 18 2024-09-18 13:53:31 -07:00
coverage-run-rustdoc coverage: Extract hole spans from HIR instead of MIR 2024-07-08 21:22:56 +10:00
crashes Auto merge of #127546 - workingjubilee:5-level-paging-exists, r=saethlin 2024-09-21 16:20:10 +00:00
debuginfo Auto merge of #130052 - khuey:clear-dilocation-after-const-emission, r=michaelwoerister 2024-09-13 08:57:41 +00:00
incremental simd_shuffle: require index argument to be a vector 2024-09-14 14:43:24 +02:00
mir-opt Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
pretty Use doc(hidden) instead of allow(missing_docs) in the test harness 2024-09-11 12:14:35 +02:00
run-make Fix hard-coded stderr in run-make test 2024-09-22 21:56:38 -04:00
run-pass-valgrind Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustdoc rustdoc: rename issue-\d+.rs tests to have meaningful names 2024-09-12 13:47:51 -07:00
rustdoc-gui Add GUI regression test for non-rust code blocks line numbers 2024-09-22 00:18:44 +02:00
rustdoc-js rustdoc-search: allow trailing Foo -> arg search 2024-09-05 17:58:05 -07:00
rustdoc-js-std Bless rustdoc-js-std test 2024-09-22 20:35:10 -04:00
rustdoc-json Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
rustdoc-ui rustdoc: use the correct span for doctests 2024-09-19 13:57:44 -07:00
ui Rollup merge of #129550 - kornelski:boxasstr, r=joshtriplett,dtolnay 2024-09-23 06:45:32 +02:00
ui-fulldeps Auto merge of #130483 - matthiaskrgr:rollup-q1r0g0y, r=matthiaskrgr 2024-09-17 19:37:03 +00:00
COMPILER_TESTS.md Move /src/test to /tests 2023-01-11 09:32:08 +00:00