rust/tests
Stuart Cook f44f963b03
Rollup merge of #145563 - Kobzol:remove-from-from-prelude, r=petrochenkov
Remove the `From` derive macro from prelude

The new `#[derive(From)]` functionality (implemented in https://github.com/rust-lang/rust/pull/144922) caused name resolution ambiguity issues (https://github.com/rust-lang/rust/issues/145524). The reproducer looks e.g. like this:

```rust
mod foo {
    pub use derive_more::From;
}

use foo::*;

#[derive(From)] // ERROR: `From` is ambiguous
struct S(u32);
```

It's pretty unfortunate that it works like this, but I guess that there's not much to be done here, and we'll have to wait for the next edition to put the `From` macro into the prelude. That will probably require https://github.com/rust-lang/rust/pull/139493 to land.

I created a new module in core (and re-exported it in std) called `from`, where I re-exported the `From` macro. I *think* that since this is a new module, it should not have the same backwards incompatibility issue.

Happy to hear suggestions about the naming - maybe it would make sense as `core::macros::from::From`? But we already had a precedent in the `core::assert_matches` module, so I just followed suit.

Fixes: https://github.com/rust-lang/rust/issues/145524

r? ``@petrochenkov``
2025-08-19 14:18:27 +10:00
..
assembly-llvm Rollup merge of #145309 - winstonallo:issue-145271-fix, r=tgross35 2025-08-18 15:31:11 +10:00
auxiliary Set NumRegisterParameters LLVM module flag to N when -Zregparm=N is 2025-08-13 17:37:30 +02:00
codegen-llvm Rollup merge of #144567 - CaiWeiran:transmute-scalar_test, r=nikic 2025-08-19 14:18:19 +10:00
codegen-units Auto merge of #142893 - Mark-Simulacrum:no-const-collect, r=oli-obk 2025-06-27 12:57:05 +00:00
coverage coverage: Remove all unstable support for MC/DC instrumentation 2025-08-06 22:38:52 +10:00
coverage-run-rustdoc
crashes fix: Reject async assoc fns of const traits/impls in ast_passes 2025-08-15 16:31:10 +09:00
debuginfo Revert "Embed GDB pretty printers in rlibs and dylibs" 2025-08-06 18:00:58 +00:00
incremental Bless incremental tests. 2025-07-13 13:50:01 +00:00
mir-opt Remove the no_sanitize attribute in favor of sanitize 2025-08-18 08:45:28 +00:00
pretty Update autodiff tests for the new intrinsics impl 2025-08-14 18:33:43 +00:00
run-make Rollup merge of #145405 - durin42:test-cleanup-tmpdir, r=lqd 2025-08-19 14:18:24 +10:00
rustdoc rustdoc-search: search backend with partitioned suffix tree 2025-08-15 10:26:03 -07:00
rustdoc-gui rustdoc-search: search backend with partitioned suffix tree 2025-08-15 10:26:03 -07:00
rustdoc-js rustdoc-search: search backend with partitioned suffix tree 2025-08-15 10:26:03 -07:00
rustdoc-js-std rustdoc-search: search backend with partitioned suffix tree 2025-08-15 10:26:03 -07:00
rustdoc-json rustdoc-json: Move #[macro_export] from Other to it's own variant 2025-07-30 19:57:32 +00:00
rustdoc-ui Update uitests 2025-08-14 18:18:42 +02:00
ui Rollup merge of #145563 - Kobzol:remove-from-from-prelude, r=petrochenkov 2025-08-19 14:18:27 +10:00
ui-fulldeps remove P 2025-08-09 15:47:01 +08:00
COMPILER_TESTS.md