about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/autoderef.rs
AgeCommit message (Collapse)AuthorLines
2025-09-18support calls on opaque types :<lcnr-2/+13
2025-09-08fixup limit handling codeJana Dönszelmann-1/+1
2025-08-29autoderef final ty is already resolvedlcnr-8/+4
2025-06-03`FIXME(-Znext-solver)` triagelcnr-8/+8
Co-authored-by: Michael Goulet <michael@errs.io>
2025-04-16respect the tcx's recursion limit when peelingdianne-3/+7
2025-01-22Rename `structurally_normalize` to `structurally_normalize_ty`Boxy-4/+4
2024-12-11Arbitrary self types v2: use Receiver traitAdrian Taylor-9/+28
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-12Swap Vec<PredicateObligation> to type aliasGnomedDev-5/+6
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-08-30Remove `#[macro_use] extern crate tracing` from `rustc_hir_analysis`.Nicholas Nethercote-0/+1
2024-07-29Reformat `use` declarations.Nicholas Nethercote-7/+6
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-09Make builtin_deref just return a TyMichael Goulet-21/+20
2024-05-02Take ocx by move for pending obligationsMichael Goulet-1/+1
2024-05-02Use ObligationCtxt in favor of TraitEngine in many placesMichael Goulet-21/+15
2024-02-12fix ICE for deref coercions with type errorsLukas Markeffsky-4/+4
2024-01-23Random type checker changesMichael Goulet-0/+3
2024-01-11Remove special-casing around aliaskind in new solverMichael Goulet-1/+1
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-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-08-07Structurally normalize weak and inherent tooMichael Goulet-1/+1
2023-07-05Move `TyCtxt::mk_x` to `Ty::new_x` where applicableBoxy-2/+5
2023-06-29change snapshot tracking in fulfillment contextslcnr-1/+1
2023-06-06Make TraitEngine::new use the right solver, add compare modeMichael Goulet-2/+1
2023-06-06New trait solver is a property of inference contextMichael Goulet-1/+1
2023-05-22Structurally normalize in the new solverMichael Goulet-22/+54
2023-04-25Replace `tcx.mk_trait_ref` with `ty::TraitRef::new`Maybe Waffle-1/+1
2023-02-22Remove type-traversal trait aliasesAlan Egerton-1/+1
2023-01-23fix: use LocalDefId instead of HirId in trait resVincenzo Palazzo-4/+4
use LocalDefId instead of HirId in trait resolution to simplify the obligation clause resolution Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-01-11Move autoderef to rustc_hir_analysisMichael Goulet-0/+224