rust/compiler/rustc_infer/src/infer
bors dfa88b328f Auto merge of #120500 - oli-obk:intrinsics2.0, r=WaffleLapkin
Implement intrinsics with fallback bodies

fixes #93145 (though we can port many more intrinsics)
cc #63585

The way this works is that the backend logic for generating custom code for intrinsics has been made fallible. The only failure path is "this intrinsic is unknown". The `Instance` (that was `InstanceDef::Intrinsic`) then gets converted to `InstanceDef::Item`, which represents the fallback body. A regular function call to that body is then codegenned. This is currently implemented for

* codegen_ssa (so llvm and gcc)
* codegen_cranelift

other backends will need to adjust, but they can just keep doing what they were doing if they prefer (though adding new intrinsics to the compiler will then require them to implement them, instead of getting the fallback body).

cc `@scottmcm` `@WaffleLapkin`

### todo

* [ ] miri support
* [x] default intrinsic name to name of function instead of requiring it to be specified in attribute
* [x] make sure that the bodies are always available (must be collected for metadata)
2024-02-16 09:53:01 +00:00
..
canonical remove questionable calls to commit_if_ok 2024-02-13 05:44:46 +01:00
error_reporting Auto merge of #120500 - oli-obk:intrinsics2.0, r=WaffleLapkin 2024-02-16 09:53:01 +00:00
higher_ranked Add higher_ranked to relate submodule 2023-12-15 18:13:40 +00:00
lexical_region_resolve Use fewer delayed bugs. 2024-02-14 20:30:37 +11:00
opaque_types Bump indexmap 2024-02-13 21:03:34 +00:00
outlives Use fewer delayed bugs. 2024-02-14 20:30:37 +11:00
region_constraints Auto merge of #118824 - aliemjay:perf-region-cons, r=compiler-errors 2023-12-22 20:28:48 +00:00
relate Dejargnonize subst 2024-02-12 15:46:35 +09:00
at.rs remove questionable calls to commit_if_ok 2024-02-13 05:44:46 +01:00
free_regions.rs review + fix CI 2023-11-14 13:41:28 +00:00
freshen.rs cleanup effect var handling 2024-02-05 10:51:18 +01:00
fudge.rs don't store const var origins for known vars 2024-01-16 11:06:42 +01:00
mod.rs also try to normalize opaque types in alias-relate 2024-02-13 04:47:32 +01:00
opaque_types.rs Dejargnonize subst 2024-02-12 15:46:35 +09:00
projection.rs -Ztrait-solver=next: stop depending on old solver 2023-07-04 10:06:39 +02:00
resolve.rs cleanup effect var handling 2024-02-05 10:51:18 +01:00
type_variable.rs Dejargnonize subst 2024-02-12 15:46:35 +09:00
undo_log.rs cleanup type variable storage 2023-12-08 14:28:57 +01:00