lcnr
d2b7604db9
always make define_opaque_types explicit
2023-03-15 14:00:15 +01:00
bors
e84e5ff04a
Auto merge of #107376 - aliemjay:remove-givens, r=lcnr
...
remove obsolete `givens` from regionck
Fixes #106567
r? `@lcnr` (feel free to reassign)
2023-03-15 02:50:58 +00:00
Michael Goulet
84d254ead0
Better names?
2023-03-13 16:34:16 +00:00
Ali MJ Al-Nasrawy
95bcca85ff
remove obsolete givens from regionck
2023-03-09 11:01:33 +03:00
Alan Egerton
695072daa6
Remove type-traversal trait aliases
2023-02-22 17:04:58 +00:00
Oli Scherer
88a7b6803b
Make hidden type registration opt-in, so that each site can be reviewed on its own and we have the right defaults for trait solvers
2023-02-21 14:50:51 +00:00
Kyle Matsuda
c183110cc2
remove bound_type_of query; make type_of return EarlyBinder; change type_of in metadata
2023-02-16 17:05:56 -07:00
Kyle Matsuda
d822b97a27
change usages of type_of to bound_type_of
2023-02-16 17:01:52 -07:00
Alan Egerton
dea342d861
Make visiting traits generic over the Interner
2023-02-13 10:24:49 +00:00
Alan Egerton
ba55a453eb
Alias folding/visiting traits instead of re-export
2023-02-13 10:24:46 +00:00
Camille GILLOT
1974b6b68d
Introduce GeneratorWitnessMIR.
2023-01-27 18:58:44 +00:00
Vincenzo Palazzo
7d2c1103d7
fix: use LocalDefId instead of HirId in trait res
...
use LocalDefId instead of HirId in trait resolution to simplify
the obligation clause resolution
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com >
2023-01-23 11:42:18 +00:00
Matthias Krüger
240cc81768
Rollup merge of #106973 - oli-obk:tait_ice_closure_in_impl_header, r=lcnr
...
Don't treat closures from other crates as local
fixes #104817
r? `@lcnr`
Specialization can prefer an impl for an opaque type over a blanket impls that also matches. If the blanket impl only applies if an auto-trait applies, we look at the hidden type of the opaque type to see if that implements the auto trait. The hidden type can be a closure or generator, and thus we will end up seeing these types in coherence and have to handle them properly.
2023-01-20 07:16:09 +01:00
Oli Scherer
42f1f54a5e
Don't treat closures from other crates as local
2023-01-19 11:29:40 +00:00
Scott McMurray
925dc37313
Stop using BREAK & CONTINUE in compiler
...
Switching them to `Break(())` and `Continue(())` instead.
libs-api would like to remove these constants, so stop using them in compiler to make the removal PR later smaller.
2023-01-17 23:17:51 -08:00
Kyle Matsuda
6e969ea85e
fix various subst_identity vs skip_binder
2023-01-14 00:30:03 -07:00
Kyle Matsuda
f29a334c90
change impl_trait_ref query to return EarlyBinder; remove bound_impl_trait_ref query; add EarlyBinder to impl_trait_ref in metadata
2023-01-14 00:29:56 -07:00
Kyle Matsuda
be130b57d4
change usages of impl_trait_ref to bound_impl_trait_ref
2023-01-14 00:23:32 -07:00
Albert Larsan
40ba0e84d5
Change src/test to tests in source files, fix tidy and tests
2023-01-11 09:32:13 +00:00
Jeremy Stucki
3dde32ca97
rustc: Remove needless lifetimes
2022-12-20 22:10:40 +01:00
Michael Goulet
61adaf8187
Combine projection and opaque into alias
2022-12-13 17:48:55 +00:00
Michael Goulet
02b64c5d26
Document normalization methods on At
2022-12-01 19:00:09 +00:00
Michael Goulet
6436c348db
Remove SelectionContext::infcx() in favor of field access
2022-11-25 23:31:37 +00:00
Manish Goregaokar
53eab246db
Rollup merge of #103488 - oli-obk:impl_trait_for_tait, r=lcnr
...
Allow opaque types in trait impl headers and rely on coherence to reject unsound cases
r? ````@lcnr````
fixes #99840
2022-11-22 22:54:38 -05:00
Oli Scherer
94fe30ff2f
Treat different opaque types of the same def id as equal during coherence
2022-11-21 16:06:07 +00:00
Oli Scherer
2752e328c9
Allow opaque types in trait impl headers and rely on coherence to reject unsound cases
2022-11-21 16:00:31 +00:00
Santiago Pastorino
16c9e39021
negative_impl_exists should take an InferCtxt
2022-11-21 11:26:23 -03:00
Santiago Pastorino
2faad3b699
negative_impl should take a TyCtxt
2022-11-21 11:09:53 -03:00
Michael Goulet
f902b495ba
Don't print full paths in overlap errors
2022-11-10 05:41:09 +00:00
bors
75dbd5b8c3
Auto merge of #102931 - camsteffen:inline-overlapping-impls, r=cjgillot
...
Make `overlapping_impls` not generic
Trying to win back perf from #101632 .
2022-10-16 02:05:30 +00:00
Rageking8
7122abaddf
more dupe word typos
2022-10-14 12:57:56 +08:00
Cameron Steffen
c4068c76a8
Make overlapping_impls non-generic
...
This improves perf
2022-10-13 14:54:48 -05: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
lcnr
647052fc04
remove the Subst trait, always use EarlyBinder
2022-09-19 11:37:27 +02:00
Santiago Pastorino
4da14ef50e
Use CRATE_HIR_ID and CRATE_DEF_ID for obligations from foreign crates
2022-08-23 09:08:30 -03:00
Santiago Pastorino
4cb492e740
Do not use unneeded extra errors variable
2022-08-23 08:55:43 -03:00
Santiago Pastorino
ac0b6af37b
Permit negative impls coherence to take advantage of implied bounds
2022-08-23 08:55:43 -03:00
Michael Goulet
ba7272959d
Use separate infcx to solve obligations during negative coherence
2022-08-20 04:49:24 +00:00
lcnr
1cede2c126
is_knowable use Result instead of Option
2022-08-17 10:17:54 +02:00
Matthias Krüger
a1fdea2b78
Rollup merge of #100514 - compiler-errors:issue-100191, r=spastorino
...
Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls
Fixes #100191
r? ``@spastorino``
2022-08-15 20:11:36 +02:00
Dylan DPC
92344e369b
Rollup merge of #99861 - lcnr:orphan-check-cg, r=jackh726
...
orphan check: rationalize our handling of constants
cc `@rust-lang/types` `@rust-lang/project-const-generics` on whether you agree with this reasoning.
r? types
2022-08-14 17:09:13 +05:30
Michael Goulet
c436930f91
Delay span bug when failing to normalize negative coherence impl subject due to other malformed impls
2022-08-13 22:11:42 +00:00
Michael Goulet
fe894756f8
Add traits::fully_solve_obligation that acts like traits::fully_normalize
...
It spawns up a trait engine, registers the single obligation, then fully
solves it
2022-08-04 13:50:56 +00:00
Michael Goulet
37d412cff7
Remove FulfillmentContext param from fully_normalize
2022-08-04 13:42:13 +00:00
Matthias Krüger
0de7f756f0
Rollup merge of #99746 - compiler-errors:more-trait-engine, r=jackh726
...
Use `TraitEngine` in more places that don't specifically need `FulfillmentContext::new_in_snapshot`
Not sure if this change is worthwhile, but couldn't hurt re: chalkification
r? types
2022-08-03 22:29:27 +02:00
lcnr
2634309eb3
update comment
2022-07-29 09:44:20 +02:00
Michael Goulet
16f49800db
Document check_region_obligations_and_report_errors, simplify a call to resolve_regions
2022-07-29 06:17:17 +00:00
lcnr
c9b21b0ea2
orphan check: remove const generics fixme
2022-07-28 17:35:27 +02:00
Michael Goulet
58f107ab56
Use TraitEngine in more places that don't specifically need FulfillmentCtxt::new_in_snapshot
2022-07-26 04:55:06 +00:00