about summary refs log tree commit diff
path: root/compiler/rustc_traits
AgeCommit message (Collapse)AuthorLines
2024-07-21Move all error reporting into rustc_trait_selectionMichael Goulet-2/+2
2024-07-09Split out overflow handling into its own moduleMichael Goulet-2/+2
2024-07-08Move trait selection error reporting to its own top-level moduleMichael Goulet-2/+2
2024-06-12Use `tidy` to sort crate attributes for all compiler crates.Nicholas Nethercote-0/+2
We already do this for a number of crates, e.g. `rustc_middle`, `rustc_span`, `rustc_metadata`, `rustc_span`, `rustc_errors`. For the ones we don't, in many cases the attributes are a mess. - There is no consistency about order of attribute kinds (e.g. `allow`/`deny`/`feature`). - Within attribute kind groups (e.g. the `feature` attributes), sometimes the order is alphabetical, and sometimes there is no particular order. - Sometimes the attributes of a particular kind aren't even grouped all together, e.g. there might be a `feature`, then an `allow`, then another `feature`. This commit extends the existing sorting to all compiler crates, increasing consistency. If any new attribute line is added there is now only one place it can go -- no need for arbitrary decisions. Exceptions: - `rustc_log`, `rustc_next_trait_solver` and `rustc_type_ir_macros`, because they have no crate attributes. - `rustc_codegen_gcc`, because it's quasi-external to rustc (e.g. it's ignored in `rustfmt.toml`).
2024-06-03Align Term methods with GenericArg methodsMichael Goulet-1/+1
2024-06-03Add cycle errors to ScrubbedTraitError to remove a couple more calls to ↵Michael Goulet-26/+17
new_with_diagnostics
2024-06-03Move FulfillmentErrorCode to rustc_trait_selection tooMichael Goulet-2/+2
2024-06-03Opt-in diagnostics reporting to avoid doing extra work in the new solverMichael Goulet-13/+21
2024-05-13split out AliasTy -> AliasTermMichael Goulet-8/+2
2024-05-10Apply nits, make some bounds into supertraits on inherent traitsMichael Goulet-1/+1
2024-05-10Lift `Lift`Michael Goulet-1/+1
2024-05-02Use ObligationCtxt in favor of TraitEngine in many placesMichael Goulet-7/+6
2024-04-30Remove `extern crate tracing` from numerous crates.Nicholas Nethercote-3/+5
2024-04-29Remove `extern crate rustc_middle` from numerous crates.Nicholas Nethercote-2/+2
2024-03-07Merge `check_mod_impl_wf` and `check_mod_type_wf`Oli Scherer-1/+8
2024-02-20Rename some normalization-related itemsLeón Orell Valerian Liehr-16/+17
2024-02-19`normalize_projection_ty` is not used with next-solverlcnr-14/+13
2024-02-12Dejargnonize substShoyu Vanilla-1/+1
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-01-25Remove unused featuresclubby789-1/+0
2024-01-17Correctly handle normalization in implied boundsAli MJ Al-Nasrawy-1/+17
Special-case Bevy dependents to not error
2024-01-12Remove redundant Code from FulfillmentErrorCode variantsMichael Goulet-2/+2
2023-12-07add unused `NormalizesTo` predicatelcnr-0/+1
2023-11-22Auto merge of #118120 - compiler-errors:closure-kind, r=lcnrbors-1/+0
Remove `PredicateKind::ClosureKind` We don't need the `ClosureKind` predicate kind -- instead, `Fn`-family trait goals are left as ambiguous, and we only need to make progress on `FnOnce` projection goals for inference purposes. This is similar to how we do confirmation of `Fn`-family trait and projection goals in the new trait solver, which also doesn't use the `ClosureKind` predicate. Some hacky logic is added in the second commit so that we can keep the error messages the same.
2023-11-21Fix `clippy::needless_borrow` in the compilerNilstrieb-1/+1
`x clippy compiler -Aclippy::all -Wclippy::needless_borrow --fix`. Then I had to remove a few unnecessary parens and muts that were exposed now.
2023-11-21Remove ClosureKind predicate kindMichael Goulet-1/+0
2023-11-13Remove `-Zperf-stats`.Nicholas Nethercote-9/+0
The included measurements have varied over the years. At one point there were quite a few more, but #49558 deleted a lot that were no longer used. Today there's just four, and it's a motley collection that doesn't seem particularly valuable. I think it has been well and truly subsumed by self-profiling, which collects way more data.
2023-11-03Auto merge of #117507 - nnethercote:rustc_span, r=Nilstriebbors-1/+1
`rustc_span` cleanups Just some things I found while looking over this crate. r? `@oli-obk`
2023-11-02dropck_outlives check generator witness needs_droplcnr-1/+2
2023-11-02Minimize `pub` usage in `source_map.rs`.Nicholas Nethercote-1/+1
Most notably, this commit changes the `pub use crate::*;` in that file to `use crate::*;`. This requires a lot of `use` items in other crates to be adjusted, because everything defined within `rustc_span::*` was also available via `rustc_span::source_map::*`, which is bizarre. The commit also removes `SourceMap::span_to_relative_line_string`, which is unused.
2023-10-30Clean up `rustc_*/Cargo.toml`.Nicholas Nethercote-3/+5
- Sort dependencies and features sections. - Add `tidy` markers to the sorted sections so they stay sorted. - Remove empty `[lib`] sections. - Remove "See more keys..." comments. Excluded files: - rustc_codegen_{cranelift,gcc}, because they're external. - rustc_lexer, because it has external use. - stable_mir, because it has external use.
2023-09-13Detect cycle errors hidden by opaques during monomorphizationMichael Goulet-1/+25
2023-09-01remove some unused crate depsklensy-3/+0
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-7/+7
2023-07-06get rid of a bit more calls to poly_selectMichael Goulet-2/+2
2023-07-06Separate select calls that don't need a binderMichael Goulet-1/+1
2023-07-03remove TypeWellFormedFromEnvMichael Goulet-2/+1
2023-07-03Remove chalk from the compilerMichael Goulet-2206/+1
2023-07-01Update chalkNilstrieb-3/+5
2023-06-27Remove unnecessary DefineOpaqueTypes::Bubble from codegenMichael Goulet-13/+2
2023-06-26TypeWellFormedInEnvMichael Goulet-9/+10
2023-06-26Migrate predicates_of and caller_bounds to ClauseMichael Goulet-44/+31
2023-06-23Rollup merge of #112963 - oli-obk:tait_solver_decoupling, r=compiler-errorsMichael Goulet-17/+6
Stop bubbling out hidden types from the eval obligation queries r? `@compiler-errors` I don't know why these were added, but they are not needed anymore. The relevant test is unaffected and I didn't see anything interesting in logging that would have justified it. This PR has no effect on the new solver behaviour of https://github.com/rust-lang/rust/blob/cf2dff2b1e3fa55fa5415d524200070d0d7aacfe/tests/ui/impl-trait/issue-99642.rs (which is overflow) and https://github.com/rust-lang/rust/blob/cf2dff2b1e3fa55fa5415d524200070d0d7aacfe/tests/ui/impl-trait/issue-99642-2.rs (which is "unstable certainty ICE")
2023-06-23Stop bubbling out hidden types from the eval obligation queriesOli Scherer-17/+6
2023-06-22Migrate item_bounds to ty::ClauseMichael Goulet-2/+4
2023-06-19s/Clause/ClauseKindMichael Goulet-35/+35
2023-06-17Move ConstEvaluatable to ClauseMichael Goulet-5/+5
2023-06-17Move WF goal to clauseMichael Goulet-5/+5
2023-06-16Add `AliasKind::Weak` for type aliases.Oli Scherer-1/+34
Only use it when the type alias contains an opaque type. Also does wf-checking on such type aliases.
2023-06-14s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedListThe 8472-1/+0