about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/traits/query.rs
AgeCommit message (Collapse)AuthorLines
2025-09-26allow method calls on opaqueslcnr-0/+1
2025-09-26predefined opaques to `method_autoderef_steps`lcnr-1/+11
2025-04-24Remove `weak` alias terminologyBoxy-1/+1
2025-02-20Remove unused items from `query.rs`.Nicholas Nethercote-6/+0
2025-02-11Deeply normalize signature in new solverMichael Goulet-0/+3
2025-02-11Make DeeplyNormalize a real type opMichael Goulet-0/+7
2025-02-04Two minor `use` fixups.Nicholas Nethercote-2/+1
I *think* this addresses what the `FIXME` comments are asking for.
2024-12-11Arbitrary self types v2: use Receiver traitAdrian Taylor-1/+11
In this new version of Arbitrary Self Types, we no longer use the Deref trait exclusively when working out which self types are valid. Instead, we follow a chain of Receiver traits. This enables methods to be called on smart pointer types which fundamentally cannot support Deref (for instance because they are wrappers for pointers that don't follow Rust's aliasing rules). This includes: * Changes to tests appropriately * New tests for: * The basics of the feature * Ensuring lifetime elision works properly * Generic Receivers * A copy of the method subst test enhanced with Receiver This is really the heart of the 'arbitrary self types v2' feature, and is the most critical commit in the current PR. Subsequent commits are focused on: * Detecting "shadowing" problems, where a smart pointer type can hide methods in the pointee. * Diagnostics and cleanup. Naming: in this commit, the "Autoderef" type is modified so that it no longer solely focuses on the "Deref" trait, but can now consider the "Receiver" trait instead. Should it be renamed, to something like "TraitFollower"? This was considered, but rejected, because * even in the Receiver case, it still considers built-in derefs * the name Autoderef is short and snappy.
2024-10-17move `defining_opaque_types` out of `Canonical`lcnr-11/+14
2024-10-17`DropckOutlives` to `rustc_middle`lcnr-0/+8
2024-10-17remove type_op constructorslcnr-25/+1
2024-10-17`ImpliedOutlivesBounds` to `rustc_middle`lcnr-0/+8
2024-07-29Reformat `use` declarations.Nicholas Nethercote-6/+8
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-06-13Method resolution constrains hidden types instead of rejecting method candidatesOli Scherer-1/+1
2024-06-06Uplift TypeErrorMichael Goulet-7/+0
2024-06-06Make middle not rely on next_trait_solverMichael Goulet-1/+1
2024-05-18Uplift inspect into rustc_type_irMichael Goulet-3/+2
2024-04-29Remove `extern crate rustc_macros` from `rustc_middle`.Nicholas Nethercote-0/+2
2024-02-20Rename some normalization-related itemsLeón Orell Valerian Liehr-3/+3
2024-01-17Correctly handle normalization in implied boundsAli MJ Al-Nasrawy-1/+1
Special-case Bevy dependents to not error
2023-12-24Remove `Session` methods that duplicate `DiagCtxt` methods.Nicholas Nethercote-1/+1
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier access.
2023-11-23remove unused pub fnklensy-11/+0
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-09-18Remove unused `Lift` derives.Nicholas Nethercote-13/+8
I found these by commenting out all `Lift` derives and then adding back the ones that were necessary to successfully compile.
2023-07-14refactor(rustc_middle): Substs -> GenericArgMahdi Dibaiee-2/+2
2023-06-19initial info dumpBoxy-1/+1
2023-05-25Fallible<_> -> Result<_, NoSolution>Michael Goulet-2/+0
2023-02-22Remove type-traversal trait aliasesAlan Egerton-2/+2
2023-01-19even more unify Projection/Opaque in outlives codeAli MJ Al-Nasrawy-1/+1
2023-01-13Unify Opaque/Projection handling in region outlives codeMichael Goulet-4/+2
2023-01-07make ascribe_user_type a TypeOpAli MJ Al-Nasrawy-7/+4
Projection types in user annotations may contain inference variables. This makes the normalization depend on the unification with the actual type and thus requires a separate TypeOp to track the obligations. Otherwise simply calling `TypeChecker::normalize` would ICE with "unexpected ambiguity"
2022-12-19implement the skeleton of the updated trait solverlcnr-1/+1
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-3/+2
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-09-21Neither require nor imply lifetime bounds on opaque type for well formednessOli Scherer-1/+3
2022-09-05fix comment111-2/+1
2022-09-01Migrate DropCheckOverflow111-10/+3
2022-07-29remove some manual hash stable implslcnr-25/+1
2022-07-05Add #[derive(TypeVisitable)]Alan Egerton-8/+13
2022-03-24Swap DtorckConstraint to DropckConstraintInfRandomness-7/+7
This change was made as per suspicion that this struct was never renamed after consistent use of DropCk. This also clarifies the meaning behind the name of this structure.
2022-02-09Ensure that queries only return Copy types.Camille GILLOT-5/+4
2021-10-03Remove re-export.Camille GILLOT-1/+1
2021-04-08Fix outdated crate names in compiler docspierwill-1/+1
Changes `librustc_X` to `rustc_X`, only in documentation comments. Plain code comments are left unchanged. Also fix incorrect file paths.
2021-03-27Remove (lots of) dead codeJoshua Nelson-12/+0
Found with https://github.com/est31/warnalyzer. Dubious changes: - Is anyone else using rustc_apfloat? I feel weird completely deleting x87 support. - Maybe some of the dead code in rustc_data_structures, in case someone wants to use it in the future? - Don't change rustc_serialize I plan to scrap most of the json module in the near future (see https://github.com/rust-lang/compiler-team/issues/418) and fixing the tests needed more work than I expected. TODO: check if any of the comments on the deleted code should be kept.
2020-09-04Remove unused duplicated `trivial_dropck_outlives`Jonas Schievink-68/+0
2020-09-04Change ty.kind to a methodLeSeulArtichaut-1/+1
2020-08-30mv compiler to compiler/mark-0/+330