about summary refs log tree commit diff
path: root/compiler/rustc_ast/src/expand
AgeCommit message (Collapse)AuthorLines
2023-08-06Generate better function argument names in global_allocator expansionDavid Tolnay-5/+17
2023-06-01Remember names of `cfg`-ed out items to mention them in diagnosticsNilstrieb-0/+17
`#[cfg]`s are frequently used to gate crate content behind cargo features. This can lead to very confusing errors when features are missing. For example, `serde` doesn't have the `derive` feature by default. Therefore, `serde::Serialize` fails to resolve with a generic error, even though the macro is present in the docs. This commit adds a list of all stripped item names to metadata. This is filled during macro expansion and then, through a fed query, persisted in metadata. The downstream resolver can then access the metadata to look at possible candidates for mentioning in the errors. This slightly increases metadata (800k->809k for the feature-heavy windows crate), but not enough to really matter.
2023-05-11Prevent insta-stable no alloc shim supportbjorn3-0/+2
You will need to add the following as replacement for the old __rust_* definitions when not using the alloc shim. #[no_mangle] static __rust_no_alloc_shim_is_unstable: u8 = 0;
2023-05-11Split AllocatorKind::fn_name in global_fn_name and default_fn_namebjorn3-7/+6
2023-05-11Don't use an allocator shim for `#[global_allocator]`bjorn3-2/+9
This makes it possible to use liballoc/libstd in combination with `--emit obj` if you use `#[global_allocator]`. Making it work for the default libstd allocator would require weak functions, which are not well supported on all systems.
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-2/+2
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2021-06-20Make allocator_kind a query.Camille GILLOT-1/+1
2021-06-01Revert "Reduce the amount of untracked state in TyCtxt"Camille Gillot-1/+1
2021-05-30Make allocator_kind a query.Camille GILLOT-1/+1
2021-04-08Fix outdated crate names in compiler docspierwill-1/+1
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
2020-08-30mv compiler to compiler/mark-0/+56