about summary refs log tree commit diff
path: root/compiler/rustc_sanitizers/src
AgeCommit message (Collapse)AuthorLines
2025-09-30Split Bound into Canonical and Boundjackh726-2/+3
2025-09-17Remove `DynKind`León Orell Valerian Liehr-8/+6
2025-09-12Introduce trait_item_ofCameron Steffen-2/+1
2025-08-09rename `TraitRef::from_method` to `from_assoc`Deadbeef-2/+2
also add a note to `GenericArgs::truncate_to`
2025-07-28Rename impl_of_method -> impl_of_assocCameron Steffen-1/+1
2025-07-28Rename trait_of_item -> trait_of_assocCameron Steffen-3/+3
2025-07-01Remove support for dyn*Michael Goulet-1/+0
2025-06-05Replace some `Option<Span>` with `Span` and use DUMMY_SP instead of NoneOli Scherer-4/+4
2025-06-03Rollup merge of #141569 - workingjubilee:canonicalize-abi, r=bjorn3Matthias Krüger-2/+3
Replace ad-hoc ABI "adjustments" with an `AbiMap` to `CanonAbi` Our `conv_from_spec_abi`, `adjust_abi`, and `is_abi_supported` combine to give us a very confusing way of reasoning about what _actual_ calling convention we want to lower our code to and whether we want to compile the resulting code at all. Instead of leaving this code as a miniature adventure game in which someone tries to combine stateful mutations into a Rube Goldberg machine that will let them escape the maze and arrive at the promised land of codegen, we let `AbiMap` devour this complexity. Once you have an `AbiMap`, you can answer which `ExternAbi`s will lower to what `CanonAbi`s (and whether they will lower at all). Removed: - `conv_from_spec_abi` replaced by `AbiMap::canonize_abi` - `adjust_abi` replaced by same - `Conv::PreserveAll` as unused - `Conv::Cold` as unused - `enum Conv` replaced by `enum CanonAbi` target-spec.json changes: - If you have a target-spec.json then now your "entry-abi" key will be specified in terms of one of the `"{abi}"` strings Rust recognizes, e.g. ```json "entry-abi": "C", "entry-abi": "win64", "entry-abi": "aapcs", ```
2025-06-03compiler: change Conv to CanonAbiJubilee Young-2/+3
2025-05-27Rename unpack to kindMichael Goulet-2/+2
2025-05-12update cfg(bootstrap)Pietro Albini-1/+0
2025-05-07Add `DefPathData::OpaqueLifetime` to avoid conflicts for remapped opaque ↵John Kåre Alsaker-0/+1
lifetimes
2025-05-02Add `DefPathData::NestedStatic` instead of reusing `DefPathData::AnonConst`John Kåre Alsaker-0/+1
2025-04-29Remove global `next_disambiguator` state and handle it with a ↵John Kåre Alsaker-1/+1
`DisambiguatorState` type
2025-04-23Make #![feature(let_chains)] bootstrap conditional in compiler/est31-1/+1
2025-04-15Rollup merge of #139669 - nnethercote:overhaul-AssocItem, r=oli-obkStuart Cook-2/+2
Overhaul `AssocItem` `AssocItem` has multiple fields that only make sense some of the time. E.g. the `name` can be empty if it's an RPITIT associated type. It's clearer and less error prone if these fields are moved to the relevant `kind` variants. r? ``@fee1-dead``
2025-04-15Move `opt_rpitit_info` field to `hir::AssocKind::Type`.Nicholas Nethercote-1/+1
From `hir::AssocItem`.
2025-04-14Move `has_self` field to `hir::AssocKind::Fn`.Nicholas Nethercote-1/+1
`hir::AssocItem` currently has a boolean `fn_has_self_parameter` field, which is misplaced, because it's only relevant for associated fns, not for associated consts or types. This commit moves it (and renames it) to the `AssocKind::Fn` variant, where it belongs. This requires introducing a new C-style enum, `AssocTag`, which is like `AssocKind` but without the fields. This is because `AssocKind` values are passed to various functions like `find_by_ident_and_kind` to indicate what kind of associated item should be searched for, and having to specify `has_self` isn't relevant there. New methods: - Predicates `AssocItem::is_fn` and `AssocItem::is_method`. - `AssocItem::as_tag` which converts `AssocItem::kind` to `AssocTag`. Removed `find_by_name_and_kinds`, which is unused. `AssocItem::descr` can now distinguish between methods and associated functions, which slightly improves some error messages.
2025-04-14Auto merge of #124141 - ↵bors-1/+0
nnethercote:rm-Nonterminal-and-TokenKind-Interpolated, r=petrochenkov Remove `Nonterminal` and `TokenKind::Interpolated` A third attempt at this; the first attempt was #96724 and the second was #114647. r? `@ghost`
2025-04-11Introduce `DefPathData::AnonAssocTy`.Nicholas Nethercote-1/+2
PR #137977 changed `DefPathData::TypeNs` to contain `Option<Symbol>` to account for RPITIT assoc types being anonymous. This commit changes it back to `Symbol` and gives anonymous assoc types their own variant. It makes things a bit nicer overall.
2025-04-02Remove `recursion_limit` increases.Nicholas Nethercote-1/+0
These are no longer needed now that `Nonterminal` is gone.
2025-03-30Encode synthetic by-move coroutine body with a different DefPathDataMichael Goulet-0/+1
2025-03-15Squash fold into tyMichael Goulet-2/+1
2025-03-12Auto merge of #138414 - matthiaskrgr:rollup-9ablqdb, r=matthiaskrgrbors-1/+0
Rollup of 7 pull requests Successful merges: - #137314 (change definitely unproductive cycles to error) - #137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - #138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - #138331 (Use `RUSTC_LINT_FLAGS` more) - #138345 (Some autodiff cleanups) - #138387 (intrinsics: remove unnecessary leading underscore from argument names) - #138390 (fix incorrect tracing log) r? `@ghost` `@rustbot` modify labels: rollup
2025-03-11Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
It's no longer necessary now that `-Wunreachable_pub` is being passed.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-0/+1
Revert <https://github.com/rust-lang/rust/pull/138084> to buy time to consider options that avoids breaking downstream usages of cargo on distributed `rustc-src` artifacts, where such cargo invocations fail due to inability to inherit `lints` from workspace root manifest's `workspace.lints` (this is only valid for the source rust-lang/rust workspace, but not really the distributed `rustc-src` artifacts). This breakage was reported in <https://github.com/rust-lang/rust/issues/138304>. This reverts commit 48caf81484b50dca5a5cebb614899a3df81ca898, reversing changes made to c6662879b27f5161e95f39395e3c9513a7b97028.
2025-03-08Remove `#![warn(unreachable_pub)]` from all `compiler/` crates.Nicholas Nethercote-1/+0
(Except for `rustc_codegen_cranelift`.) It's no longer necessary now that `unreachable_pub` is in the workspace lints.
2025-03-07Increase recursion_limit in numerous crates.Nicholas Nethercote-0/+1
This is temporarily needed for `x doc compiler` to work. They can be removed once the `Nonterminal` is removed (#124141).
2025-02-24Change span field accesses to method callsJana Dönszelmann-2/+2
2025-01-30check the types in `ty::Value` to value conversionLukas Markeffsky-2/+8
and remove `ty::Const::try_to_scalar` because it becomes redundant
2025-01-30introduce `ty::Value`Lukas Markeffsky-11/+11
Co-authored-by: FedericoBruzzone <federico.bruzzone.i@gmail.com>
2025-01-07Eliminate an unnecessary `Symbol::to_string`; use `as_str`Josh Triplett-5/+4
2024-12-22Begin to implement type system layer of unsafe bindersMichael Goulet-1/+7
2024-12-10Remove more traces of anonymous ADTsMichael Goulet-2/+1
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-12/+14
the behavior of the type system not only depends on the current assumptions, but also the currentnphase of the compiler. This is mostly necessary as we need to decide whether and how to reveal opaque types. We track this via the `TypingMode`.
2024-11-02compiler: Add rustc_abi to _sanitizersJubilee Young-6/+5
2024-10-22Rollup merge of #131049 - compiler-errors:more-validation, r=spastorinoMatthias Krüger-8/+13
Validate args are correct for `UnevaluatedConst`, `ExistentialTraitRef`/`ExistentialProjection` For the `Existential*` ones, we have to do some adjustment to the args list to deal with the missing `Self` type, so we introduce a `debug_assert_existential_args_compatible` function to the interner as well.
2024-10-19Get rid of const eval_* and try_eval_* helpersMichael Goulet-2/+6
2024-10-04Fix some pub(crate) that were undetected bc of instrumentMichael Goulet-2/+2
2024-09-30Validate ExistentialPredicate argsMichael Goulet-8/+13
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-2/+2
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-9/+9
2024-09-20Only expect mono consts in CFIMichael Goulet-2/+2
2024-09-20Normalize transparent struct field type in CFIMichael Goulet-1/+4
2024-09-11Also fix if in elseMichael Goulet-7/+5
2024-09-03Auto merge of #129777 - nnethercote:unreachable_pub-4, r=Urgaubors-6/+7
Add `unreachable_pub`, round 4 A follow-up to #129732. r? `@Urgau`
2024-09-03Add `warn(unreachable_pub)` to `rustc_sanitizers`.Nicholas Nethercote-6/+7
2024-09-02chore: Fix typos in 'compiler' (batch 2)Alexander Cyon-3/+3
2024-08-21Rollup merge of #129345 - compiler-errors:scratch4, r=jieyouxuMatthias Krüger-1/+1
Use shorthand field initialization syntax more aggressively in the compiler Caught these when cleaning up #129344 and decided to run clippy to find the rest