Kyle Matsuda
be130b57d4
change usages of impl_trait_ref to bound_impl_trait_ref
2023-01-14 00:23:32 -07:00
Yuki Okushi
e5e116dca9
Rollup merge of #106204 - compiler-errors:no-take-opaques-in-compare, r=oli-obk
...
No need to take opaques in `check_type_bounds`
`InferCtxt` already has its defining use anchor set to err
r? ``@oli-obk``
2023-01-10 08:05:34 +09:00
Michael Goulet
f769d34291
Assert defining anchor is set in take_opaque_types
2023-01-09 18:14:28 +00:00
Michael Goulet
50ab306015
Simplify some canonical type alias names
2023-01-03 01:16:10 +00:00
Jeremy Stucki
3dde32ca97
rustc: Remove needless lifetimes
2022-12-20 22:10:40 +01:00
Oli Scherer
1bf80249ae
Remove many more cases of mk_substs_trait
that can now use the iterator scheme`
2022-12-14 15:36:39 +00:00
Michael Goulet
25a6daccab
Move codegen_select_candidate to a rustc_traits
2022-12-08 05:16:57 +00:00
Michael Goulet
b36035c20f
Move vtable methods into its own module
2022-12-08 05:16:57 +00:00
Michael Goulet
48270044b0
Move has_structural_eq_impls provider to rustc_ty_utils
2022-12-08 05:16:48 +00:00
Michael Goulet
e940f845be
drive-by: Default param for ToPredicate
2022-12-06 00:19:55 +00:00
Michael Goulet
02b64c5d26
Document normalization methods on At
2022-12-01 19:00:09 +00:00
Michael Goulet
1e236acd05
Make ObligationCtxt::normalize take cause by borrow
2022-11-28 17:35:40 +00:00
Michael Goulet
ce409b5200
Make normalize and normalize_to pub(crate)
2022-11-28 17:35:39 +00:00
Michael Goulet
fc710832ea
partially_normalize_... -> At::normalize
2022-11-28 17:35:39 +00:00
bors
aff003becd
Auto merge of #99798 - JulianKnodt:ac1, r=BoxyUwU
...
Add `ConstKind::Expr`
Starting to implement `ty::ConstKind::Abstract`, most of the match cases are stubbed out, some I was unsure what to add, others I didn't want to add until a more complete implementation was ready.
r? `@lcnr`
2022-11-25 22:56:59 +00:00
kadmin
f9750c1554
Add empty ConstKind::Abstract
...
Initial pass at expr/abstract const/s
Address comments
Switch to using a list instead of &[ty::Const], rm `AbstractConst`
Remove try_unify_abstract_consts
Update comments
Add edits
Recurse more
More edits
Prevent equating associated consts
Move failing test to ui
Changes this test from incremental to ui, and mark it as failing and a known bug.
Does not cause the compiler to ICE, so should be ok.
2022-11-25 09:28:43 +00:00
Santiago Pastorino
974e2837bb
Introduce PredicateKind::Clause
2022-11-25 00:04:54 -03:00
Oli Scherer
08afabddac
get rid of to_poly_trait_predicate
2022-11-25 00:04:52 -03:00
Santiago Pastorino
5b3a06a3c2
Call fully_solve_obligations instead of repeating code
2022-11-23 09:36:00 -03:00
Santiago Pastorino
ad094cdceb
Use ObligationCtxt intead of dyn TraitEngine
2022-11-23 09:24:42 -03:00
Oli Scherer
7658e0fccf
Stop passing the self-type as a separate argument.
2022-11-21 20:39:46 +00:00
Oli Scherer
a9f3c2209c
For lcnr
2022-11-21 20:35:50 +00:00
Oli Scherer
ec8d01fdcc
Allow iterators instead of requiring slices that will get turned into iterators
2022-11-21 20:33:55 +00:00
Oli Scherer
6f77c97b38
Assert that various types have the right amount of generic args and fix the sites that used the wrong amount
2022-11-21 20:31:59 +00:00
Oli Scherer
d9a02b0fb7
Split out the actual predicate solving code into a separate function
2022-11-21 20:31:34 +00:00
Oli Scherer
4f11f3b257
Convert predicates into Predicate in the Obligation constructor
2022-11-16 09:25:19 +00:00
Dylan DPC
c23068c8c6
Rollup merge of #104094 - lcnr:on_unimplemented-move, r=wesleywiser
...
fully move `on_unimplemented` to `error_reporting`
the `traits` module has a few too many submodules in my opinion.
2022-11-08 11:23:53 +05:30
Dylan DPC
77a44ab568
Rollup merge of #103865 - compiler-errors:fallback-has-occurred-tracking, r=eholk
...
Move `fallback_has_occurred` state tracking to `FnCtxt`
Removes a ton of callsites that defaulted to `false`
2022-11-08 11:23:51 +05:30
lcnr
80e4e72fcd
fully move on_unimplemented
to error reporting
2022-11-07 08:10:25 +01:00
bors
1e1e5b8d98
Auto merge of #103861 - compiler-errors:codegen-select-in-vtable-slot, r=nagisa
...
Use `codegen_select` in `vtable_trait_upcasting_coercion_new_vptr_slot`
A super tiny clean up
2022-11-06 14:03:59 +00:00
Michael Goulet
bc345d7bd0
Move fallback_has_occurred to FnCtxt
2022-11-06 02:40:25 +00:00
Oli Scherer
44d1936d00
Some tracing and comment cleanups
2022-11-04 17:10:07 +00:00
Michael Goulet
a9881f5213
Use ObligationCtxt in fully_normalize
2022-11-02 00:48:58 +00:00
Michael Goulet
20bb56ebfd
Use codegen_select in vtable_trait_upcasting_coercion_new_vptr_slot
2022-11-02 00:39:08 +00:00
Michael Goulet
1e2eb97c6e
Don't call own_existential_vtable_entries
on unresolved trait ref
2022-10-19 17:11:40 +00:00
Cameron Steffen
283abbf0e7
Change InferCtxtBuilder from enter to build
2022-10-07 07:10:40 -05:00
Cameron Steffen
349415d1c6
Remove TypeckResults from InferCtxt
2022-10-07 07:06:19 -05:00
Cameron Steffen
4a68373217
Introduce TypeErrCtxt
...
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't
need to.
2022-10-07 07:06:16 -05:00
Oli Scherer
c7b6ebdf7c
It's not about types or consts, but the lack of regions
2022-10-04 14:10:44 +00:00
bors
7a8636c843
Auto merge of #100982 - fee1-dead-contrib:const-impl-requires-const-trait, r=oli-obk
...
Require `#[const_trait]` on `Trait` for `impl const Trait`
r? `@oli-obk`
2022-09-22 04:22:24 +00:00
lcnr
647052fc04
remove the Subst
trait, always use EarlyBinder
2022-09-19 11:37:27 +02:00
Deadbeef
77b0c47b82
Normalize param_env for trait assoc consts in typeck
2022-09-16 11:48:43 +08:00
lcnr
c63020a7c3
rename codegen_fulfill_obligation
2022-09-09 13:36:27 +02:00
Gabriel Bustamante
8e82200277
Porting 'compiler/rustc_trait_selection' to translatable diagnostics - Part 1
2022-09-01 12:54:50 -05:00
bors
983f4daddf
Auto merge of #100705 - compiler-errors:issue-100620, r=oli-obk
...
Avoid reporting overflow in `is_impossible_method`
Fixes #100620
We're evaluating a new predicate in a different param-env than it was checked during typeck, so be more careful about handling overflow errors. Instead of using `FulfillmentCtxt`, using `InferCtxt::evaluate_obligation` by itself will give us back the overflow error, so we can throw it away properly.
This may give us more false-positives, but it doesn't regress the `<HashMap as Iterator>::rev` example that originally motivated adding `is_impossible_method` in the first place.
2022-08-26 06:05:06 +00:00
Matthias Krüger
0fcabec620
Rollup merge of #100888 - spastorino:coherence-negative-impls-implied-bounds, r=lcnr
...
Coherence negative impls implied bounds
Fixes #93875
This PR is rebased on top of #100789 and it would need to include that one which is already r+ed.
r? ``@nikomatsakis``
cc ``@lcnr`` (which I've talked about 3222f420d9
, I guess after you finish your reordering of modules and work with OutlivesEnvironmentEnv this commit can just be reverted).
2022-08-24 18:20:11 +02:00
Santiago Pastorino
5ff45dc89e
Move InferCtxtExt to rustc_trait_selection
2022-08-23 08:55:43 -03:00
yukang
f466a7563d
remove hack fix since we don't have no overflow diagnostic
2022-08-22 22:22:15 +08:00
Michael Goulet
c005e760f5
Rework point-at-arg
2022-08-21 02:34:52 +00:00
Michael Goulet
c4a5b14211
Avoid overflow in is_impossible_method
2022-08-18 01:12:46 +00:00