summary refs log tree commit diff
path: root/compiler/rustc_middle/src/traits
AgeCommit message (Collapse)AuthorLines
2023-01-20Auto merge of #106090 - WaffleLapkin:dereffffffffff, r=Nilstriebbors-11/+13
Remove some `ref` patterns from the compiler Previous PR: https://github.com/rust-lang/rust/pull/105368 r? `@Nilstrieb`
2023-01-19even more unify Projection/Opaque in outlives codeAli MJ Al-Nasrawy-1/+1
2023-01-17Don't call closures immediately, use `try{}` blocksMaybe Waffle-11/+13
2023-01-13Unify Opaque/Projection handling in region outlives codeMichael Goulet-4/+2
2023-01-12attempt to make a minimal example workDeadbeef-1/+3
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-24Rollup merge of #105975 - jeremystucki:rustc-remove-needless-lifetimes, r=eholkMatthias Krüger-41/+32
rustc: Remove needless lifetimes
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-41/+32
2022-12-19implement the skeleton of the updated trait solverlcnr-1/+2
2022-12-13squash OpaqueTy and ProjectionTy into AliasTyMichael Goulet-4/+3
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-11-27Prefer doc comments over `//`-comments in compilerMaybe Waffle-1/+1
2022-11-25add commentlcnr-0/+6
2022-11-25move 2 candidates into builtin candidatelcnr-41/+0
2022-11-24Avoid `GenFuture` shim when compiling async constructsArpad Borsos-0/+36
Previously, async constructs would be lowered to "normal" generators, with an additional `from_generator` / `GenFuture` shim in between to convert from `Generator` to `Future`. The compiler will now special-case these generators internally so that async constructs will *directly* implement `Future` without the need to go through the `from_generator` / `GenFuture` shim. The primary motivation for this change was hiding this implementation detail in stack traces and debuginfo, but it can in theory also help the optimizer as there is less abstractions to see through.
2022-11-19Improve spans for RPITIT object-safety errorsMichael Goulet-2/+8
2022-11-08selection failure: recompute applicable implslcnr-3/+0
2022-11-05Enforce rust-check ABI in signatures, callsMichael Goulet-0/+2
2022-11-04Rollup merge of #103937 - BoxyUwU:misc_cleanups, r=compiler-errorsMatthias Krüger-1/+8
minor changes to make method lookup diagnostic code easier to read The end result of around 4 days of trying to understand this 1000+ line long function- a bunch of tiny nitpicks r? `@compiler-errors`
2022-11-04Rollup merge of #103915 - chenyukang:yukang/fix-103874, r=lcnrMatthias Krüger-1/+1
Improve use of ErrorGuaranteed and code cleanup Part of #103874
2022-11-03CleanupsBoxy-1/+8
2022-11-03change error_reported to use Result instead of an optionyukang-1/+1
2022-10-30better error for rustc_strict_coherence misuseMichael Goulet-2/+15
2022-10-27Revert "Make ClosureOutlivesRequirement not rely on an unresolved type"Michael Goulet-1/+1
This reverts commit a6b5f95fb028f9feb4a2957c06b35035be2c6155.
2022-10-19Make ClosureOutlivesRequirement not rely on an unresolved typeMichael Goulet-1/+1
2022-10-17Duplicate comment in mod.rsSamuel Moelius-5/+0
2022-10-10Rollup merge of #102786 - compiler-errors:no-tuple-candidate, r=lcnrDylan DPC-14/+2
Remove tuple candidate, nothing special about it r? `@lcnr` you mentioned this during the talk you gave i think
2022-10-07Remove tuple candidate, nothing special about itMichael Goulet-14/+2
2022-10-07Remove `DefId` from some `SelectionCandidate` variantsDeadbeef-2/+2
2022-09-21Neither require nor imply lifetime bounds on opaque type for well formednessOli Scherer-1/+3
2022-09-20Auto merge of #101989 - ↵bors-2/+3
fee1-dead-contrib:const_trait_impl-assoc-caller-bounds, r=oli-obk make projection bounds with const bounds satisfy const Fixes #101982.
2022-09-18make projection bounds with const bounds satisfy constDeadbeef-2/+3
2022-09-16Add AscribeUserTypeProvePredicateJack Huey-0/+5
2022-09-16Add to_constraint_category to ObligationCause and SubregionOriginJack Huey-0/+8
2022-09-16Revert "Better errors for implied static bound"Jack Huey-13/+0
This reverts commit c75817b0a75d4b6b01ee10900ba5d01d4915e6a8.
2022-09-13Better errors for implied static boundJack Huey-0/+13
2022-09-12Rollup merge of #101681 - compiler-errors:rpitit-obj-safety, r=lcnrDylan DPC-0/+9
Deny return-position `impl Trait` in traits for object safety Fixes #101667
2022-09-12Auto merge of #100251 - compiler-errors:tuple-trait-2, r=jackh726bors-2/+14
Implement `std::marker::Tuple` Split out from #99943 (https://github.com/rust-lang/rust/pull/99943#pullrequestreview-1064459183). Implements part of rust-lang/compiler-team#537 r? `@jackh726`
2022-09-11Deny RPITIT for object safetyMichael Goulet-0/+9
2022-09-09rename `codegen_fulfill_obligation`lcnr-1/+1
2022-09-08Add associated item binding to non-param-ty where clause suggestionsMichael Goulet-2/+2
2022-09-05fix comment111-2/+1
2022-09-01Migrate DropCheckOverflow111-10/+3
2022-08-31Fix a bunch of typoDezhi Wu-1/+1
This PR will fix some typos detected by [typos]. I only picked the ones I was sure were spelling errors to fix, mostly in the comments. [typos]: https://github.com/crate-ci/typos
2022-08-24Note binding obligation causes for const equate errorsMichael Goulet-0/+7
2022-08-21More docsMichael Goulet-5/+11
2022-08-21Rework point-at-argMichael Goulet-0/+4
2022-08-07Built-in implementation of Tuple traitMichael Goulet-2/+14
2022-08-02Auto merge of #92268 - jswrenn:transmute, r=oli-obkbors-0/+4
Initial implementation of transmutability trait. *T'was the night before Christmas and all through the codebase, not a miri was stirring — no hint of `unsafe`!* This PR provides an initial, **incomplete** implementation of *[MCP 411: Lang Item for Transmutability](https://github.com/rust-lang/compiler-team/issues/411)*. The `core::mem::BikeshedIntrinsicFrom` trait provided by this PR is implemented on-the-fly by the compiler for types `Src` and `Dst` when the bits of all possible values of type `Src` are safely reinterpretable as a value of type `Dst`. What this PR provides is: - [x] [support for transmutations involving primitives](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/primitives) - [x] [support for transmutations involving arrays](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/arrays) - [x] [support for transmutations involving structs](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/structs) - [x] [support for transmutations involving enums](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/enums) - [x] [support for transmutations involving unions](https://github.com/jswrenn/rust/tree/transmute/src/test/ui/transmutability/unions) - [x] [support for weaker validity checks](https://github.com/jswrenn/rust/blob/transmute/src/test/ui/transmutability/unions/should_permit_intersecting_if_validity_is_assumed.rs) (i.e., `Assume::VALIDITY`) - [x] visibility checking What isn't yet implemented: - [ ] transmutability options passed using the `Assume` struct - [ ] [support for references](https://github.com/jswrenn/rust/blob/transmute/src/test/ui/transmutability/references.rs) - [ ] smarter error messages These features will be implemented in future PRs.
2022-08-01Store associated item defaultness in impl_defaultness.Camille GILLOT-1/+1