about summary refs log tree commit diff
path: root/compiler/rustc_traits
AgeCommit message (Collapse)AuthorLines
2025-07-02Remove fast path from codegen_select, since Sized has no methodsMichael Goulet-9/+2
2025-06-25Remove some glob imports from the type systemMichael Goulet-2/+2
2025-06-03`FIXME(-Znext-solver)` triagelcnr-1/+0
Co-authored-by: Michael Goulet <michael@errs.io>
2025-05-20Querify coroutine_hidden_typesMichael Goulet-0/+39
2025-05-01Set groundwork for proper const normalizationBoxy-4/+10
2025-04-24Remove `weak` alias terminologyBoxy-3/+3
2025-04-09re-use sized fast pathDavid Wood-2/+14
There's an existing fast path for the `type_op_prove_predicate` predicate, checking for trivially `Sized` types, which can be re-used when evaluating obligations within queries. This should improve performance, particularly in anticipation of new sizedness traits being added which can take advantage of this.
2025-03-12Rollup merge of #138394 - lcnr:yeet-variant, r=compiler-errorsManish Goregaokar-1/+1
remove unnecessary variant
2025-03-12remove unnecessary variantlcnr-1/+1
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)-3/+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-08Specify rust lints for `compiler/` crates via Cargo.Nicholas Nethercote-0/+3
By naming them in `[workspace.lints.rust]` in the top-level `Cargo.toml`, and then making all `compiler/` crates inherit them with `[lints] workspace = true`. (I omitted `rustc_codegen_{cranelift,gcc}`, because they're a bit different.) The advantages of this over the current approach: - It uses a standard Cargo feature, rather than special handling in bootstrap. So, easier to understand, and less likely to get accidentally broken in the future. - It works for proc macro crates. It's a shame it doesn't work for rustc-specific lints, as the comments explain.
2025-03-04Only use implied bounds hack if bevy, and use deeply normalize in implied ↵Michael Goulet-19/+9
bounds hack
2025-02-22Rollup merge of #137333 - compiler-errors:edition-2024-fresh, r=NadrierilMatthias Krüger-1/+1
Use `edition = "2024"` in the compiler (redux) Most of this is binding mode changes, which I fixed by running `x.py fix`. Also adds some miscellaneous `unsafe` blocks for new unsafe standard library functions (the setenv ones), and a missing `unsafe extern` block in some enzyme codegen code, and fixes some precise capturing lifetime changes (but only when they led to errors). cc ``@ehuss`` ``@traviscross``
2025-02-22Upgrade the compiler to edition 2024Michael Goulet-1/+1
2025-02-21don't leave assoc const unnormalized due to unconstrained paramsLukas Markeffsky-9/+7
2025-02-17Clean up dropck code a bitMatthew Jasper-7/+4
- Remove `Result` that couldn't be Err on valid compilation. - Always compute errors on failure.
2025-01-29Auto merge of #136011 - compiler-errors:query-norm-vaniquishes-us, r=jackh726bors-2/+6
Revert #135914: Remove usages of `QueryNormalizer` in the compiler Reverts #135914. r? jackh726
2025-01-25Pass spans to perform_locally_in_new_solverMichael Goulet-4/+7
2025-01-24Revert "Rollup merge of #135914 - compiler-errors:vanquish-query-norm, ↵Michael Goulet-2/+6
r=jackh726" This reverts commit 556d901c36511560e0ae8ce3058507121a2fb2f0, reversing changes made to be15391703babf217aaef3c854213a7fcd70e00b.
2025-01-23Remove query normalize from normalize type opMichael Goulet-6/+2
2024-11-23Delay a bug when encountering an impl with unconstrained generics in ↵Michael Goulet-6/+15
codegen_select
2024-11-18use `TypingEnv` when no `infcx` is availablelcnr-11/+12
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-10-29TypingMode :thinking:lcnr-4/+4
2024-10-24Implement const effect predicate in new solverMichael Goulet-0/+1
2024-10-17move `defining_opaque_types` out of `Canonical`lcnr-7/+7
2024-10-17`DropckOutlives` to `rustc_middle`lcnr-2/+2
2024-10-17`ImpliedOutlivesBounds` to `rustc_middle`lcnr-5/+6
2024-10-12Swap Vec<PredicateObligation> to type aliasGnomedDev-2/+3
2024-09-25Compiler: Rename "object safe" to "dyn compatible"León Orell Valerian Liehr-1/+1
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-5/+5
2024-09-03Add `warn(unreachable_pub)` to `rustc_traits`.Nicholas Nethercote-1/+2
2024-08-14Remove redundant type opsMichael Goulet-24/+0
2024-07-29Reformat `use` declarations.Nicholas Nethercote-10/+7
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
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