rust/tests/ui/deriving
Matthias Krüger 19437666d9
Rollup merge of #141724 - Sol-Ell:issue-141141-fix, r=nnethercote
fix(#141141): When expanding `PartialEq`, check equality of scalar types first.

Fixes rust-lang/rust#141141.

Now, `cs_eq` function of `partial_eq.rs` compares [scalar types](https://doc.rust-lang.org/rust-by-example/primitives.html#scalar-types) first.

- Add `is_scalar` field to `FieldInfo`.
- Add `is_scalar` method to `TyKind`.
- Pass `FieldInfo` via `CsFold::Combine` and refactor code relying on it.
- Implement `TryFrom<&str>` and `TryFrom<Symbol>` for FloatTy.
- Implement `TryFrom<&str>` and `TryFrom<Symbol>` for IntTy.
- Implement `TryFrom<&str>` and `TryFrom<Symbol>` for UintTy.
2025-06-03 15:00:32 +02:00
..
auxiliary Remove let_chains feature gate from even more tests 2025-04-18 15:57:29 +02:00
built-in-proc-macro-scope.rs Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00
built-in-proc-macro-scope.stdout Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00
coerce-pointee-bounds-issue-127647.rs s/SmartPointer/CoerceReferent/g 2024-10-24 02:14:09 +08:00
derive-no-std.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
derive-partialord-correctness.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-all-codegen.rs Separately check equality of the scalar types and compound types in the order of declaration. 2025-06-02 15:29:34 +03:00
deriving-all-codegen.stdout Separately check equality of the scalar types and compound types in the order of declaration. 2025-06-02 15:29:34 +03:00
deriving-associated-types.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-bounds.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-clone-array.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-clone-enum.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-clone-generic-enum.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-clone-generic-struct.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-clone-generic-tuple-struct.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-clone-struct.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-clone-tuple-struct.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-cmp-generic-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-cmp-generic-struct-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-cmp-generic-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-cmp-generic-tuple-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-cmp-shortcircuit.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-coerce-pointee-expanded.rs Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00
deriving-coerce-pointee-expanded.stdout Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00
deriving-coerce-pointee-neg.rs Deduplicate CoerceUnsized and DispatchFromDyn impl errors 2025-02-24 19:34:54 +00:00
deriving-coerce-pointee-neg.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
deriving-coerce-pointee.rs s/SmartPointer/CoerceReferent/g 2024-10-24 02:14:09 +08:00
deriving-copyclone.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-default-box.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-default-enum.rs Detect unused structs which derived Default 2024-06-25 23:29:44 +08:00
deriving-enum-single-variant.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-eq-ord-boxed-slice.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-hash.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-in-fn.rs Mark format! with must_use hint 2024-07-06 14:24:20 +02:00
deriving-in-macro.rs Refactor the two-phase check for impls and impl items 2025-05-27 22:03:21 +08:00
deriving-meta-multiple.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-meta.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-self-lifetime-totalord-totaleq.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-show-2.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-show.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-c-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-hash-enum.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-hash-struct.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
deriving-via-extension-struct-empty.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-struct-like-enum-variant.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-struct-tuple.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-struct.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-via-extension-type-params.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
deriving-with-helper.rs tests: use minicore more 2025-02-24 09:26:54 +00:00
deriving-with-repr-packed.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
do-not-suggest-calling-fn-in-derive-macro.rs Skip suggestions in derived code 2025-01-24 22:08:39 +00:00
do-not-suggest-calling-fn-in-derive-macro.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
issue-3935.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-6341.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-15689-1.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-15689-2.rs tests: remove //@ pretty-expanded usages 2024-11-26 02:50:48 +08:00
issue-18738.rs Move tests 2024-03-03 16:30:48 -03:00
issue-19358.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-58319.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-89188-gat-hrtb.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-103157.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
issue-103157.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
multiple-defaults.rs [AUTO-GENERATED] Migrate ui tests from // to //@ directives 2024-02-16 20:02:50 +00:00
multiple-defaults.stderr Do not suggest using -Zmacro-backtrace for builtin macros 2025-03-14 19:50:03 +00:00
proc-macro-attribute-mixing.rs Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00
proc-macro-attribute-mixing.stdout Explicitly annotate edition for unpretty=expanded and unpretty=hir tests 2025-04-16 11:10:10 +02:00