about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/visit.rs
AgeCommit message (Collapse)AuthorLines
2025-09-30Split Bound into Canonical and Boundjackh726-2/+4
2025-09-08Move `rustc_middle::MaxUniverse` to `rustc_infer`.Nicholas Nethercote-39/+0
Because `rust_infer` is the only crate that uses it.
2025-06-13TypeVisiting binders no longer requires TypeFolding its interiorMichael Goulet-2/+2
2025-05-07Require T: TypeFoldable in Binder<T> visitMichael Goulet-2/+2
2025-04-24Remove `weak` alias terminologyBoxy-3/+3
2025-04-14Use `newtype_index!`-generated types more idiomaticallyYotam Ofek-9/+3
2025-04-08clean code: remove Deref<Target=RegionKind> impl for Region and use `.kind()`xizheyin-3/+3
Signed-off-by: xizheyin <xizheyin@smail.nju.edu.cn>
2025-03-15Fold visit into tyMichael Goulet-2/+3
2025-03-15Squash fold into tyMichael Goulet-1/+1
2025-02-19Make fewer crates depend on rustc_ast_irMichael Goulet-1/+1
2024-10-02Handle `rustc-hir-analysis` cases of `rustc::potential_query_instability` lintismailarilik-5/+5
2024-07-29Reformat `use` declarations.Nicholas Nethercote-3/+3
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-21Uplift binderMichael Goulet-98/+0
2024-03-05Convert `TypeVisitor` and `DefIdVisitor` to use `VisitorResult`Jason Newcomb-27/+19
2024-02-20Expand weak alias types before collecting constrained and referenced late ↵León Orell Valerian Liehr-8/+10
bound regions
2024-02-20Introduce expand_weak_alias_tysLeón Orell Valerian Liehr-12/+13
2024-02-13Uplift TypeVisitableExt into rustc_type_irMichael Goulet-310/+1
2024-02-12Tweak delayed bug mentions.Nicholas Nethercote-1/+1
Now that we have both `delayed_bug` and `span_delayed_bug`, it makes sense to use the generic term "delayed bug" more.
2024-01-22Tweak error counting.Nicholas Nethercote-2/+5
We have several methods indicating the presence of errors, lint errors, and delayed bugs. I find it frustrating that it's very unclear which one you should use in any particular spot. This commit attempts to instill a basic principle of "use the least general one possible", because that reflects reality in practice -- `has_errors` is the least general one and has by far the most uses (esp. via `abort_if_errors`). Specifics: - Add some comments giving some usage guidelines. - Prefer `has_errors` to comparing `err_count` to zero. - Remove `has_errors_or_span_delayed_bugs` because it's a weird one: in the cases where we need to count delayed bugs, we should really be counting lint errors as well. - Rename `is_compilation_going_to_fail` as `has_errors_or_lint_errors_or_span_delayed_bugs`, for consistency with `has_errors` and `has_errors_or_lint_errors`. - Change a few other `has_errors_or_lint_errors` calls to `has_errors`, as per the "least general" principle. This didn't turn out to be as neat as I hoped when I started, but I think it's still an improvement.
2023-12-24Remove more `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
2023-11-22Cache flags for ty::ConstMichael Goulet-14/+11
2023-11-13update type flagslcnr-7/+7
- `HAS_RE_LATE_BOUND` -> `HAS_RE_BOUND` - `HAS_TY_LATE_BOUND` -> `HAS_TY_BOUND` - `HAS_CT_LATE_BOUND` -> `HAS_CT_BOUND` - `HAS_LATE_BOUND` -> `HAS_BOUND_VARS` - `fn has_late_bound_regions` -> `fn has_bound_regions` - `fnhas_non_region_late_bound` -> `fn has_non_region_bound_vars` - `fn has_late_bound_vars` -> `fn has_bound_vars`
2023-11-13rename `ReLateBound` to `ReBound`lcnr-3/+3
other changes: - `Region::new_late_bound` -> `Region::new_bound` - `Region::is_late_bound` -> `Region::is_bound`
2023-11-04Make sure that predicates with unmentioned bound vars are still considered ↵Michael Goulet-9/+5
global in the old solver
2023-10-26Replace type flag HAS_TY_GENERATOR with HAS_TY_COROUTINELeón Orell Valerian Liehr-1/+1
2023-10-20s/generator/coroutine/Oli Scherer-1/+1
2023-09-14Properly consider binder vars in HasTypeFlagsVisitorMichael Goulet-0/+24
2023-09-13Comments to clarify the working of `HasTypeFlagsVisitor`.Nicholas Nethercote-8/+8
2023-08-03Placeholder nitMichael Goulet-6/+2
2023-05-04IAT: Introduce AliasKind::InherentLeón Orell Valerian Liehr-0/+3
2023-04-27rename `needs_subst` to `has_param`Boxy-3/+3
2023-04-27rename `needs_infer` to `has_infer`Boxy-3/+3
2023-04-17Assure everyone that `has_type_flags` is fastMaybe Waffle-0/+8
2023-04-16Remove `TypeSuper{Foldable,Visitable}` impls for `Region`.Nicholas Nethercote-1/+1
These traits exist so that folders/visitors can recurse into types of interest: binders, types, regions, predicates, and consts. But `Region` is non-recursive and cannot contain other types of interest, so its methods in these traits are trivial. This commit inlines and removes those trivial methods.
2023-04-10Support safe transmute in new solverMichael Goulet-0/+3
2023-02-22Remove type-traversal trait aliasesAlan Egerton-25/+19
2023-02-13Move folding and visiting traits into type libraryAlan Egerton-118/+1
2023-02-13Make visiting traits generic over the InternerAlan Egerton-27/+39
2023-02-13Move TypeVisitableExt from ir moduleAlan Egerton-130/+127
2023-02-13Split TypeVisitableExt from TypeVisitableAlan Egerton-1/+5
2023-02-13Alias folding/visiting traits instead of re-exportAlan Egerton-7/+9
2023-02-13Move folding & visiting traits to ir submodulesAlan Egerton-162/+176
2023-01-27Introduce GeneratorWitnessMIR.Camille GILLOT-0/+3
2023-01-17Stop using `BREAK` & `CONTINUE` in compilerScott McMurray-16/+16
Switching them to `Break(())` and `Continue(())` instead. libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-08Add type flags support for Ty and Const late-bound regionsMichael Goulet-0/+8
2022-12-20tracing: make flag checking less noisyOli Scherer-14/+4
2022-12-13Combine identical alias armsMichael Goulet-1/+1
2022-12-13Combine projection and opaque into aliasMichael Goulet-1/+1
2022-11-25Add documentation for `has_escaping_bound_vars`Deadbeef-1/+7
2022-11-24make `error_reported` check for delayed bugsBoxy-2/+2