rust/compiler/rustc_ty_utils/src
bors dd2559e08e Auto merge of #116167 - RalfJung:structural-eq, r=lcnr
remove StructuralEq trait

The documentation given for the trait is outdated: *all* function pointers implement `PartialEq` and `Eq` these days. So the `StructuralEq` trait doesn't really seem to have any reason to exist any more.

One side-effect of this PR is that we allow matching on some consts that do not implement `Eq`. However, we already allowed matching on floats and consts containing floats, so this is not new, it is just allowed in more cases now. IMO it makes no sense at all to allow float matching but also sometimes require an `Eq` instance. If we want to require `Eq` we should adjust https://github.com/rust-lang/rust/pull/115893 to check for `Eq`, and rule out float matching for good.

Fixes https://github.com/rust-lang/rust/issues/115881
2024-01-26 00:17:00 +00:00
..
abi.rs Rollup merge of #119969 - compiler-errors:simplify-closure-env-ty, r=oli-obk 2024-01-16 17:55:23 +01:00
assoc.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
common_traits.rs Move expansion of query macros in rustc_middle to rustc_middle::query 2023-05-15 08:49:13 +02:00
consts.rs Rollup merge of #119307 - compiler-errors:pat-lifetimes, r=Nadrieril 2023-12-26 13:29:14 -05:00
errors.rs Re-use error code for duplicate error 2023-06-22 15:51:14 +00:00
implied_bounds.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
instance.rs Rollup merge of #120139 - compiler-errors:fnonce-shim, r=BoxyUwU 2024-01-23 21:53:56 +01:00
layout.rs Rollup merge of #119971 - compiler-errors:zip-eq, r=nnethercote 2024-01-15 08:44:49 +01:00
layout_sanity_check.rs fix failure to detect a too-big-type after adding padding 2023-10-27 18:07:53 +02:00
lib.rs Use rustc_fluent_macro::fluent_messages! directly. 2023-11-26 08:38:40 +11:00
needs_drop.rs Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
opaque_types.rs Limit impl trait in assoc type defining scope 2024-01-22 14:35:46 +00:00
representability.rs Reduce exposure of some items. 2023-11-20 14:10:19 +11:00
sig_types.rs Move some methods from tcx.hir() to tcx 2023-12-12 06:40:29 -08:00
structural_match.rs remove StructuralEq trait 2024-01-24 07:56:23 +01:00
ty.rs Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00