rust/compiler/rustc_codegen_cranelift/src
bors fdbc4329cb Auto merge of #108340 - eggyal:remove_traversal_trait_aliases, r=oli-obk
Remove type-traversal trait aliases

#107924 moved the type traversal (folding and visiting) traits into the type library, but created trait aliases in `rustc_middle` to minimise both the API churn for trait consumers and the arising boilerplate.  As mentioned in that PR, an alternative approach of defining subtraits with blanket implementations of the respective supertraits was also considered at that time but was ruled out as not adding much value.

Unfortunately, it has since emerged that rust-analyzer has difficulty with these trait aliases at present, resulting in a degraded contributor experience (see the recent [r-a has become useless](https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/r-a.20has.20become.20useless) topic on the #t-compiler/help Zulip stream).

This PR removes the trait aliases, and accordingly the underlying type library traits are now used directly; they are parameterised by `TyCtxt<'tcx>` rather than just the `'tcx` lifetime, and imports have been updated to reflect the fact that the trait aliases' explicitly named traits are no longer automatically brought into scope.  These changes also roll-back the (no-longer required) workarounds to #107747 that were made in b409329c62.

Since this PR is just a find+replace together with the changes necessary for compilation & tidy to pass, it's currently just one mega-commit.  Let me know if you'd like it broken up.

r? `@oli-obk`
2023-02-22 18:26:51 +00:00
..
abi Merge commit '7d53619064' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
debuginfo Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
driver if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r) 2023-02-16 15:26:00 +00:00
intrinsics Stop implementing _with_overflow intrinsics in codegen backends. 2023-02-18 22:06:29 +00:00
optimize Merge commit '598f090956' into sync_cg_clif-2023-01-24 2023-01-24 18:56:42 +01:00
allocator.rs Merge commit '7d53619064' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
analyze.rs Replace Body::basic_blocks() with field access 2022-08-26 14:27:08 +02:00
archive.rs Rewrite LLVM's archive writer in Rust 2022-11-26 19:35:32 +00:00
base.rs Adapt cg_clif. 2023-02-18 21:35:02 +00:00
cast.rs Merge commit '2bb3996244' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
codegen_i128.rs Replace mk_foo calls with infer_foo where possible. 2023-02-17 22:24:31 +11:00
common.rs Remove type-traversal trait aliases 2023-02-22 17:04:58 +00:00
compiler_builtins.rs Merge commit '7d53619064' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
concurrency_limiter.rs Merge commit '266e96785a' into sync_cg_clif-2022-10-23 2022-10-23 16:22:55 +02:00
config.rs Merge commit '7d53619064' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
constant.rs Update codegen cranelift for ConstEvalCounter 2023-01-23 23:56:22 +00:00
cranelift_native.rs Fix CI 2023-01-25 16:27:28 +01:00
discriminant.rs Merge commit '2bb3996244' into sync_cg_clif-2022-12-14 2022-12-14 19:30:46 +01:00
global_asm.rs Merge commit '7d53619064' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
inline_asm.rs Merge commit '7d53619064' into sync_cg_clif-2023-02-09 2023-02-09 12:38:16 +01:00
lib.rs Auto merge of #108340 - eggyal:remove_traversal_trait_aliases, r=oli-obk 2023-02-22 18:26:51 +00:00
linkage.rs Sync rustc_codegen_cranelift 'ddd4ce2553' 2021-04-30 14:49:58 +02:00
main_shim.rs Replace mk_foo calls with infer_foo where possible. 2023-02-17 22:24:31 +11:00
num.rs Replace mk_foo calls with infer_foo where possible. 2023-02-17 22:24:31 +11:00
pointer.rs Merge commit '0969bc6dde' into sync_cg_clif-2021-03-29 2021-03-29 10:45:09 +02:00
pretty_clif.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
toolchain.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
trap.rs Merge commit 'e9d1a0a7b0' into sync_cg_clif-2022-08-24 2022-08-24 18:40:58 +02:00
unsize.rs s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
value_and_place.rs s/eval_usize/eval_target_usize/ for clarity 2023-02-14 08:51:19 +00:00
vtable.rs Merge commit '266e96785a' into sync_cg_clif-2022-10-23 2022-10-23 16:22:55 +02:00