rust/compiler/rustc_ast/src
bors a2b1646c59 Auto merge of #86844 - bjorn3:global_alloc_improvements, r=pnkfelix
Support #[global_allocator] without the allocator shim

This makes it possible to use liballoc/libstd in combination with `--emit obj` if you use `#[global_allocator]`. This is what rust-for-linux uses right now and systemd may use in the future. Currently they have to depend on the exact implementation of the allocator shim to create one themself as `--emit obj` doesn't create an allocator shim.

Note that currently the allocator shim also defines the oom error handler, which is normally required too. Once `#![feature(default_alloc_error_handler)]` becomes the only option, this can be avoided. In addition when using only fallible allocator methods and either `--cfg no_global_oom_handling` for liballoc (like rust-for-linux) or `--gc-sections` no references to the oom error handler will exist.

To avoid this feature being insta-stable, you will have to define `__rust_no_alloc_shim_is_unstable` to avoid linker errors.

(Labeling this with both T-compiler and T-lang as it originally involved both an implementation detail and had an insta-stable user facing change. As noted above, the `__rust_no_alloc_shim_is_unstable` symbol requirement should prevent unintended dependence on this unstable feature.)
2023-05-25 16:59:57 +00:00
..
attr Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
expand Prevent insta-stable no alloc shim support 2023-05-11 14:35:09 +00:00
util Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
ast_traits.rs Fix uninlined_format_args for some compiler crates 2023-01-05 19:01:12 +01:00
ast.rs Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
entry.rs Fixup missing renames from #[main] to #[rustc_main] 2022-06-22 18:24:09 +02:00
format.rs Fix typos in compiler 2023-04-10 22:02:52 +02:00
lib.rs make rustc compilable 2023-04-16 07:25:13 +00:00
mut_visit.rs Rip it out 2023-05-01 16:15:13 +08:00
node_id.rs Various minor Idx-related tweaks 2023-04-16 02:42:50 -07:00
ptr.rs make rustc compilable 2023-04-16 07:25:13 +00:00
token.rs Use Option::is_some_and and Result::is_ok_and in the compiler 2023-05-24 14:20:41 +00:00
tokenstream.rs refactor: add chunks method to TokenStream to obviate rustdoc clones 2023-05-13 16:59:28 -05:00
visit.rs misc nameres changes for anon consts 2023-05-05 21:31:35 +01:00