about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/obligation_forest
AgeCommit message (Collapse)AuthorLines
2025-04-09update cfgsBoxy-1/+1
2025-03-12Rollup merge of #138331 - nnethercote:use-RUSTC_LINT_FLAGS-more, ↵Matthias Krüger-1/+1
r=onur-ozkan,jieyouxu Use `RUSTC_LINT_FLAGS` more An alternative to the failed #138084. Fixes #138106. r? ````@jieyouxu````
2025-03-11Auto merge of #128440 - oli-obk:defines, r=lcnrbors-0/+1
Add `#[define_opaques]` attribute and require it for all type-alias-impl-trait sites that register a hidden type Instead of relying on the signature of items to decide whether they are constraining an opaque type, the opaque types that the item constrains must be explicitly listed. A previous version of this PR used an actual attribute, but had to keep the resolved `DefId`s in a side table. Now we just lower to fields in the AST that have no surface syntax, instead a builtin attribute macro fills in those fields where applicable. Note that for convenience referencing opaque types in associated types from associated methods on the same impl will not require an attribute. If that causes problems `#[defines()]` can be used to overwrite the default of searching for opaques in the signature. One wart of this design is that closures and static items do not have generics. So since I stored the opaques in the generics of functions, consts and methods, I would need to add a custom field to closures and statics to track this information. During a T-types discussion we decided to just not do this for now. fixes #131298
2025-03-11Implement `#[define_opaque]` attribute for functions.Oli Scherer-0/+1
2025-03-11Add `unreachable_pub` to `RUSTC_LINT_FLAGS` for `compiler/` crates.Nicholas Nethercote-1/+1
And fix the new errors in the handful of crates that didn't have a `#![warn(unreachable_pub)]`.
2025-03-10Revert "Use workspace lints for crates in `compiler/` #138084"许杰友 Jieyou Xu (Joe)-1/+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-08Add `unreachable_pub` to the default lints for `compiler/` crates.Nicholas Nethercote-1/+1
And fix the new errors in the handful of crates that didn't have a `#![warn(unreachable_pub)]`.
2025-02-08Rustfmtbjorn3-4/+4
2024-12-02Assert that obligations are empty before deeply normalizingMichael Goulet-0/+4
2024-10-12Swap PredicateObligation to ThinVecGnomedDev-33/+38
2024-10-12Swap Vec<PredicateObligation> to type aliasGnomedDev-1/+2
2024-09-24Dogfood `feature(file_buffered)`Josh Stone-2/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-4/+4
2024-07-29Reformat `use` declarations.Nicholas Nethercote-7/+10
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-12Require any function with a tait in its signature to actually constrain a ↵Oli Scherer-11/+16
hidden type
2024-05-08Remove `extern crate tracing`.Nicholas Nethercote-1/+1
`use` is a nicer way of doing things.
2023-12-10remove redundant importssurechen-1/+0
detects redundant imports that can be eliminated. for #117772 : In order to facilitate review and modification, split the checking code and removing redundant imports code into two PR.
2023-05-24Use `Option::is_some_and` and `Result::is_ok_and` in the compilerMaybe Waffle-1/+1
2023-03-17Fast path that skips over unchanged obligations in process_obligationsThe 8472-3/+16
- only borrow the refcell once per loop - avoid complex matches to reduce branch paths in the hot loop - use a by-ref fast path that avoids mutations at the expense of having false negatives
2023-03-03Improve comments in `needs_process_obligation`.Nicholas Nethercote-0/+2
And a couple of other places.
2023-01-31Auto merge of #107297 - Mark-Simulacrum:bump-bootstrap, r=pietroalbinibors-4/+1
Bump bootstrap compiler to 1.68 This also changes our stage0.json to include the rustc component for the rustfmt pinned nightly toolchain, which is currently necessary due to rustfmt dynamically linking to that toolchain's librustc_driver and libstd. r? `@pietroalbini`
2023-01-31Download rustc component for rustfmt toolchain as wellMark Rousskov-4/+1
2023-01-21Use a type-alias-impl-trait in `ObligationForest`Nilstrieb-2/+1
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).
2022-09-19Make cycle errors recoverableJoshua Nelson-12/+28
In particular, this allows rustdoc to recover from cycle errors when normalizing associated types for documentation. In the past, `@jackh726` has said we need to be careful about overflow errors: > Off the top of my head, we definitely should be careful about treating overflow errors the same as "not implemented for some reason" errors. Otherwise, you could end up with behavior that is different depending on recursion depth. But, that might be context-dependent. But cycle errors should be safe to unconditionally report; they don't depend on the recursion depth, they will always be an error whenever they're encountered.
2022-09-19Make `OUT` an associated type instead of a generic parameterJoshua Nelson-0/+5
This avoids toil when changing other functions in `ObligationForest` to take an `OUT` parameter.
2022-09-07Use niche-filling optimization even when multiple variants have data.Michael Benfield-0/+4
Fixes #46213
2022-06-06Split `process_obligation` in two.Nicholas Nethercote-5/+14
Because it really has two halves: - A read-only part that checks if further work is needed. - The further work part, which is much less hot. This makes things a bit clearer and nicer.
2022-06-06Handle stalling within `ObligationForest`.Nicholas Nethercote-84/+62
It is simpler if `ObligationForest` does this itself, rather than the caller having to manage it.
2022-06-06Streamline `active_cache` to `done_cache` transfer.Nicholas Nethercote-8/+5
2022-05-02fix most compiler/ doctestsElliot Roberts-1/+1
2022-02-21obligation forest docslcnr-4/+5
2021-10-15Revert "Auto merge of #89709 - clemenswasser:apply_clippy_suggestions_2, ↵Matthias Krüger-6/+6
r=petrochenkov" The PR had some unforseen perf regressions that are not as easy to find. Revert the PR for now. This reverts commit 6ae8912a3e7d2c4c775024f58a7ba4b1aedc4073, reversing changes made to 86d6d2b7389fe1b339402c1798edae8b695fc9ef.
2021-10-10Remove for loop rangeClemens Wasser-2/+2
2021-10-10Apply clippy suggestionsClemens Wasser-5/+5
2021-07-17Some perf optimizations and loggingjackh726-0/+2
2021-06-06Rollup merge of #85436 - tamird:save-clone, r=estebankYuki Okushi-3/+2
Avoid cloning cache key r? `@estebank`
2021-05-31Remove unnecessary unboxed_closures feature usagebjorn3-18/+1
It has been possible to clone closures for a while now
2021-05-18Simplify `map | unwrap_or` to `map_or`Tamir Duberstein-2/+1
2021-05-18Avoid cloning cache keyTamir Duberstein-2/+2
2021-05-04Only compute Obligation `cache_key` once in `register_obligation_at`Esteban Küber-3/+4
2020-10-15Turn Outcome into an opaque type to remove some runtime checksDániel Buga-341/+315
2020-10-15Reuse memory for process_cyclesDániel Buga-8/+8
2020-10-15Make sure cold code is as small as possibleDániel Buga-1/+2
2020-10-13Replace absolute paths with relative onesest31-1/+1
Modern compilers allow reaching external crates like std or core via relative paths in modules outside of lib.rs and main.rs.
2020-08-30mv compiler to compiler/mark-0/+1322