rust/compiler/rustc_middle/src/ty
Matthias Krüger ad2d91ce11
Rollup merge of #141507 - RalfJung:atomic-intrinsics, r=bjorn3
atomic_load intrinsic: use const generic parameter for ordering

We have a gazillion intrinsics for the atomics because we encode the ordering into the intrinsic name rather than making it a parameter. This is particularly bad for those operations that take two orderings. Let's fix that!

This PR only converts `load`, to see if there's any feedback that would fundamentally change the strategy we pursue for the const generic intrinsics.

The first two commits are preparation and could be a separate PR if you prefer.

`@BoxyUwU` -- I hope this is a use of const generics that is unlikely to explode? All we need is a const generic of enum type. We could funnel it through an integer if we had to but an enum is obviously nicer...

`@bjorn3` it seems like the cranelift backend entirely ignores the ordering?
2025-05-30 07:01:30 +02:00
..
consts get rid of rustc_codegen_ssa::common::AtomicOrdering 2025-05-28 22:57:55 +02:00
context Represent diagnostic side effects as dep nodes 2025-03-14 16:01:58 +01:00
inhabitedness Remove weak alias terminology 2025-04-24 11:59:20 +01:00
print Rename unpack to kind 2025-05-27 11:14:45 +00:00
abstract_const.rs Clean up trivial traversal/lift impl generator macro calls. 2025-02-06 13:31:43 +11:00
adjustment.rs Rollup merge of #138528 - dianne:implicit-deref-patterns, r=Nadrieril 2025-04-18 05:16:28 +02:00
adt.rs Re-remove AdtFlags::IS_ANONYMOUS 2025-04-18 21:40:53 -04:00
assoc.rs Update docs for AssocItems::filter_by_name_unhygienic 2025-04-19 21:06:52 +02:00
cast.rs Simplify intra-crate qualifiers. 2025-02-11 14:59:13 +11:00
closure.rs Handle e2021 precise capturing of unsafe binder 2025-05-28 12:17:18 +00:00
codec.rs yeet CanonicalVarInfo 2025-05-23 12:10:53 +00:00
consts.rs Review Comments 2025-05-22 12:47:19 +01:00
context.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
diagnostics.rs Auto merge of #131160 - ismailarilik:handle-potential-query-instability-lint-for-rustc-middle, r=oli-obk 2025-05-06 01:36:23 +00:00
elaborate_impl.rs Uplift elaboration 2024-07-07 11:28:01 -04:00
erase_regions.rs add additional TypeFlags fast paths 2025-05-26 19:57:48 +00:00
error.rs Remove weak alias terminology 2025-04-24 11:59:20 +01:00
fast_reject.rs Use DeepRejectCtxt to quickly reject ParamEnv candidates 2024-09-02 19:59:18 +03:00
fold.rs add additional TypeFlags fast paths 2025-05-26 19:57:48 +00:00
generic_args.rs Fix some var names 2025-05-27 11:14:47 +00:00
generics.rs Remove kw::Empty uses from rustc_middle. 2025-03-26 12:03:23 +11:00
impls_ty.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
instance.rs Rename Instance::new to Instance::new_raw and add a note that it is raw 2025-05-05 13:17:35 +00:00
intrinsic.rs add new rustc_const_stable_intrinsic attribute for const-stable intrinsics 2024-11-04 23:27:46 +01:00
layout.rs remove compiler support for extern "rust-intrinsic" blocks 2025-04-06 21:32:58 +02:00
list.rs Move FlagComputation, PatternKind, and TypeWalker to rustc_type_ir 2025-04-12 22:46:11 +00:00
mod.rs atomic_load intrinsic: use const generic parameter for ordering 2025-05-28 22:57:55 +02:00
normalize_erasing_regions.rs Squash fold into ty 2025-03-15 06:34:36 +00:00
opaque_types.rs Fix some var names 2025-05-27 11:14:47 +00:00
parameterized.rs Introduce tcx.anon_const_kind query 2025-05-21 20:20:19 +01:00
pattern.rs Add or-patterns to pattern types 2025-04-28 07:50:18 +00:00
predicate.rs add additional TypeFlags fast paths 2025-05-26 19:57:48 +00:00
region.rs clean code: remove Deref<Target=RegionKind> impl for Region and use .kind() 2025-04-08 10:51:41 +08:00
relate.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
rvalue_scopes.rs Remove ScopeDepth entirely. 2025-03-28 08:31:47 +01:00
significant_drop_order.rs Introduce DefPathData::AnonAssocTy. 2025-04-11 19:08:14 +10:00
structural_impls.rs Auto merge of #141581 - lcnr:fold-clauses, r=compiler-errors 2025-05-29 02:29:01 +00:00
sty.rs Fast path for sized pred 2025-05-18 12:18:44 +00:00
trait_def.rs Remove a function that has no necessary callers 2025-04-02 07:30:11 +00:00
typeck_results.rs Fix some var names 2025-05-27 11:14:47 +00:00
util.rs Fix some var names 2025-05-27 11:14:47 +00:00
visit.rs Require T: TypeFoldable in Binder<T> visit 2025-05-07 16:00:21 +00:00
vtable.rs extend allocbytes with associated type 2025-05-26 00:15:16 +02:00