about summary refs log tree commit diff
path: root/compiler/rustc_metadata
AgeCommit message (Collapse)AuthorLines
2025-09-26Make `def_path_hash_to_def_id` not panic when passed an invalid hashLi-yao Xia-7/+8
2025-09-21Add panic=immediate-abortBen Kimock-11/+57
2025-09-12Don't store defaultness for inherent impl itemsCameron Steffen-1/+4
2025-09-12Split AssocContainer::{InherentImpl,TraitImpl}Cameron Steffen-38/+14
2025-09-12Rename AssocItemContainer -> AssocContainerCameron Steffen-8/+8
2025-09-04Auto merge of #138736 - azhogin:azhogin/sanitizers-target-modificators, ↵bors-5/+13
r=rcvalle Sanitizers target modificators Depends on bool flag fix: https://github.com/rust-lang/rust/pull/138483. Some sanitizers need to be target modifiers, and some do not. For now, we should mark all sanitizers as target modifiers except for these: AddressSanitizer, LeakSanitizer For kCFI, the helper flag -Zsanitizer-cfi-normalize-integers should also be a target modifier. Many test errors was with sanizer flags inconsistent with std deps. Tests are fixed with `-C unsafe-allow-abi-mismatch`.
2025-09-02Revert introduction of `[workspace.dependencies]`.Nicholas Nethercote-5/+5
This was done in #145740 and #145947. It is causing problems for people using r-a on anything that uses the rustc-dev rustup package, e.g. Miri, clippy. This repository has lots of submodules and subtrees and various different projects are carved out of pieces of it. It seems like `[workspace.dependencies]` will just be more trouble than it's worth.
2025-08-29Rollup merge of #145947 - nnethercote:workspace-members-2, r=KobzolStuart Cook-3/+3
Add more to the `[workspace.dependencies]` section in the top-level `Cargo.toml` Following on from rust-lang/rust#145740. r? `@Kobzol`
2025-08-28Add `odht` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-28Add `tempfile` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-28Add `libc` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-27Port the `#[link]` attribute to the new parserJonathan Brouwer-611/+36
2025-08-27Add `tracing` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-27Add `bitflags` to `[workspace.dependencies]`.Nicholas Nethercote-1/+1
2025-08-21-Zsanitize and -Zsanitizer-cfi-normalize-integers flags are now target ↵Andrew Zhogin-5/+13
modifiers with custom consistency check function
2025-08-19Auto merge of #145600 - jieyouxu:rollup-jw0bpnt, r=jieyouxubors-1/+1
Rollup of 15 pull requests Successful merges: - rust-lang/rust#145338 (actually provide the correct args to coroutine witnesses) - rust-lang/rust#145429 (Couple of codegen_fn_attrs improvements) - rust-lang/rust#145452 (Do not strip binaries in bootstrap everytime if they are unchanged) - rust-lang/rust#145464 (Stabilize `const_pathbuf_osstring_new` feature) - rust-lang/rust#145474 (Properly recover from parenthesized use-bounds (precise capturing lists) plus small cleanups) - rust-lang/rust#145486 (Fix `unicode_data.rs` mention message) - rust-lang/rust#145490 (Trace some basic I/O operations in bootstrap) - rust-lang/rust#145493 (remove `should_render` in `PrintAttribute` derive) - rust-lang/rust#145500 (Port must_use to the new target checking) - rust-lang/rust#145505 (Simplify span caches) - rust-lang/rust#145510 (Visit and print async_fut local for async drop.) - rust-lang/rust#145511 (Rust build fails on OpenBSD after using file_lock feature) - rust-lang/rust#145532 (resolve: debug for block module) - rust-lang/rust#145533 (Reorder `lto` options from most to least optimizing) - rust-lang/rust#145537 (Do not consider a `T: !Sized` candidate to satisfy a `T: !MetaSized` obligation.) r? `@ghost` `@rustbot` modify labels: rollup
2025-08-15Detect missing `derive` on unresolved attribute even when not importedEsteban Küber-0/+21
``` error: cannot find attribute `sede` in this scope --> $DIR/missing-derive-3.rs:20:7 | LL | #[sede(untagged)] | ^^^^ | help: the derive macros `Deserialize` and `Serialize` accept the similarly named `serde` attribute | LL | #[serde(untagged)] | + error: cannot find attribute `serde` in this scope --> $DIR/missing-derive-3.rs:14:7 | LL | #[serde(untagged)] | ^^^^^ | note: `serde` is imported here, but it is a crate, not an attribute --> $DIR/missing-derive-3.rs:4:1 | LL | extern crate serde; | ^^^^^^^^^^^^^^^^^^^ help: `serde` is an attribute that can be used by the derive macros `Deserialize` and `Serialize`, you might be missing a `derive` attribute | LL + #[derive(Deserialize, Serialize)] LL | enum B { | ```
2025-08-15Merge link_name and export_namebjorn3-1/+1
2025-08-12Switch to a bitflags `MacroKinds` to support macros with more than one kindJosh Triplett-6/+24
Review everything that uses `MacroKind`, and switch anything that could refer to more than one kind to use `MacroKinds`. Add a new `SyntaxExtensionKind::MacroRules` for `macro_rules!` macros, using the concrete `MacroRulesMacroExpander` type, and have it track which kinds it can handle. Eliminate the separate optional `attr_ext`, now that a `SyntaxExtension` can handle multiple macro kinds. This also avoids the need to downcast when calling methods on `MacroRulesMacroExpander`, such as `get_unused_rule`. Integrate macro kind checking into name resolution's `sub_namespace_match`, so that we only find a macro if it's the right type, and eliminate the special-case hack for attributes.
2025-08-10Detect struct construction with private field in field with defaultEsteban Küber-0/+1
When trying to construct a struct that has a public field of a private type, suggest using `..` if that field has a default value. ``` error[E0603]: struct `Priv1` is private --> $DIR/non-exhaustive-ctor.rs:25:39 | LL | let _ = S { field: (), field1: m::Priv1 {} }; | ------ ^^^^^ private struct | | | while setting this field | note: the struct `Priv1` is defined here --> $DIR/non-exhaustive-ctor.rs:14:4 | LL | struct Priv1 {} | ^^^^^^^^^^^^ help: the field `field1` you're trying to set has a default value, you can use `..` to use it | LL | let _ = S { field: (), .. }; | ~~ ```
2025-08-09Auto merge of #145146 - fee1-dead-contrib:push-zmqrkurlzrxy, r=nnethercotebors-1/+1
remove `P` Previous work: rust-lang/rust#141603 MCP: https://github.com/rust-lang/compiler-team/issues/878 cc `@nnethercote`
2025-08-09remove `P`Deadbeef-1/+1
2025-08-09Rollup merge of #145103 - fee1-dead-contrib:push-plompruwywvk, r=compiler-errorsStuart Cook-87/+1
rustc_metadata: remove unused private trait impls These are impls for non-reachable traits that don't appear to be used. Please let me know if there is value in keeping some of them for now. cc `@cjgillot`
2025-08-08rustc_metadata: remove unused private trait implsDeadbeef-87/+1
2025-08-08Add target_env = "macabi" and target_env = "sim"Mads Marquart-1/+1
2025-08-07Move metadata symbol export from exported_non_generic_symbols to ↵bjorn3-14/+2
exported_symbols The metadata symbol must not be encoded in the crate metadata, and must be exported from proc-macros. Handling the export of the metadata symbol in exported_symbols handles both things at once without requiring manual fixups elsewhere.
2025-07-31remove rustc_attr_data_structuresJana Dönszelmann-16/+17
2025-07-31Move `rustc_middle::parameterized` to `rustc_metadata`.Nicholas Nethercote-32/+170
It's only used there.
2025-07-28Support multiple crate versions in --extern-html-root-urlKornel-0/+8
2025-07-28Save names of used extern cratesKornel-0/+20
Tracks association between `self.sess.opts.externs` (aliases in `--extern alias=rlib`) and resolved `CrateNum` Intended to allow Rustdoc match the aliases in `--extern-html-root-url` Force-injected extern crates aren't included, since they're meant for the linker only
2025-07-28Clarify update_extern_crateKornel-5/+27
2025-07-28Avoid redundant lookup in CrateLoader::existing_matchKornel-1/+1
2025-07-28Auto merge of #144469 - Kivooeo:chains-cleanup, r=SparrowLiibors-9/+8
Some `let chains` clean-up Not sure if this kind of clean-up is welcoming because of size, but I decided to try out one r? compiler
2025-07-28use let chains in hir, lint, mirKivooeo-9/+8
2025-07-26Use the new attributes throughout the codebaseJonathan Brouwer-11/+6
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-25Limit defaultness to impl of traitCameron Steffen-2/+2
2025-07-24generate elf symbol version in raw-dylibusamoi-1/+24
2025-07-18Rollup merge of #144059 - LorrensP-2158466:remove-crate-loader, r=petrochenkovMatthias Krüger-137/+149
Refactor `CrateLoader` into the `CStore` Removes the `CrateLoader` and moves the code to `CStore`. Now, if you want to use the `CrateLoader`, you can just use `CStore`. Should we rename `creader.rs` to `cstore.rs`? r? ``@petrochenkov``
2025-07-18inline CrateLoader inside of CStoreLorrensP-2158466-137/+149
2025-07-17parse `const trait Trait`Deadbeef-1/+1
2025-07-16resolve: Merge `NameBindingKind::Module` into `NameBindingKind::Res`Vadim Petrochenkov-5/+2
2025-07-15Define datastructures for `#[cfg]` attribute, move StrippedCfgItemJonathan Brouwer-1/+1
2025-07-14Rollup merge of #143217 - Periodic1911:link-ordinal, r=jdonszelmannJakub Beránek-7/+3
Port #[link_ordinal] to the new attribute parsing infrastructure Ports link_ordinal to the new attribute parsing infrastructure for https://github.com/rust-lang/rust/issues/131229#issuecomment-2971353197
2025-07-13Retire hir::ForeignItemRef.Camille GILLOT-1/+1
2025-07-13Port `#[link_ordinal]` to the new attribute parsing infrastructure.Anne Stijns-7/+3
2025-07-12Clean up implementation of RPITIT assoc item loweringMichael Goulet-1/+1
2025-07-13query RPITIT in a trait or implbohan-16/+5
2025-07-04Add comment and move assertion.Camille GILLOT-8/+12
2025-07-04Lighten formatting.Camille GILLOT-5/+4
2025-07-04Reuse metadata file from work products.Camille GILLOT-27/+59