Santiago Pastorino
45983fecff
Add comments about outlives_env
2022-02-14 12:57:22 -03:00
Santiago Pastorino
f4bb4500dd
Call the method fork instead of clone and add proper comments
2022-02-14 12:57:20 -03:00
Santiago Pastorino
3fd89a662a
Properly check regions on negative overlap check
2022-02-14 12:56:28 -03:00
Santiago Pastorino
b61e1bbf06
Add debug calls for negative impls in coherence
2022-02-14 12:56:28 -03:00
Santiago Pastorino
74c431866b
Move FIXME text to the right place
2022-02-14 12:56:28 -03:00
Santiago Pastorino
4e83924595
Remove extra negative_impl_exists check
2022-02-14 12:56:27 -03:00
Santiago Pastorino
a9bfb5d837
Move overlap_mode into trait level attribute + feature flag
2022-01-31 11:50:43 -03:00
Rémy Rakic
644c22d3ad
Only traverse attrs once while checking for coherence override
2022-01-26 18:32:02 +01:00
Santiago Pastorino
8189bac963
FIXME include regions too
2022-01-23 16:38:55 -03:00
Santiago Pastorino
269383226f
Rename strict_check to negative_impl_exists
2022-01-23 16:38:55 -03:00
Santiago Pastorino
7847ca8c61
Document OverlapMode
2022-01-23 16:38:52 -03:00
Santiago Pastorino
e5f2fdb539
Restructure the code leveraging in abilities more than modes
2022-01-22 18:16:11 -03:00
Santiago Pastorino
e2567b034d
Remove intermediate function doesn't make more sense
2022-01-21 18:23:36 -03:00
Santiago Pastorino
19e3c86003
Make strict_disjoint use explicit_disjoint
2022-01-21 18:23:22 -03:00
Santiago Pastorino
1ec962fb34
Do not pass OverlapMode down, just create a closure to properly set the filtering
2022-01-21 18:22:24 -03:00
Santiago Pastorino
d2d25a5be0
Implement stable with negative coherence mode
2022-01-21 18:22:21 -03:00
Santiago Pastorino
c2890ed426
Add overlap mode
2022-01-21 18:21:04 -03:00
Santiago Pastorino
b2a45f0645
Extract stable_disjoint fn
2022-01-21 18:20:58 -03:00
Santiago Pastorino
052b31b587
Move auxiliary fns out of overlap_with_probe
2022-01-21 10:53:17 -03:00
Santiago Pastorino
f518827503
Use impl1 and impl2 instead of a and b prefixes
2022-01-21 10:50:42 -03:00
Matthias Krüger
5a4f47460b
Rollup merge of #92780 - b-naber:postpone-const-eval-coherence, r=lcnr
...
Directly use ConstValue for single literals in blocks
Addresses the minimal repro in https://github.com/rust-lang/rust/issues/92186 , but doesn't fix the underlying problem (which would be solved by solving the anon subst problem afaict).
I do, however, think that it makes sense in general to treat single literals in anon blocks as const values directly, especially in light of the problem that the issue refers to (anon const evaluation being postponed until infer variables in substs can be resolved, which was introduced by https://github.com/rust-lang/rust/pull/90023 ), i.e. while we do get warnings for those unnecessary braces, we should try to avoid errors caused by those braces if possible.
2022-01-18 22:00:47 +01:00
b-naber
4c27d348ec
directly use ConstValue for single literals in blocks
2022-01-17 17:32:21 +01:00
Ellen
71bbb603f4
initial revert
2022-01-15 01:16:55 +00:00
Matthias Krüger
081493da7f
Rollup merge of #91904 - SylvanB:remove_in_band_lifetimes_rustc_trait_selection, r=petrochenkov
...
Remove `in_band_lifetimes` from `rustc_trait_selection`
Another one for #91867
2021-12-16 10:12:42 +01:00
Sylvan Bowdler
dd5717a6d6
Remove in_band_lifetimes
from rustc_trait_selection
2021-12-15 21:52:30 +00:00
lcnr
dcd716fee2
extend simplify_type
2021-12-14 13:32:42 +01:00
Jakub Beránek
883d0a7aa5
Use Vec extend instead of repeated pushes in several places
2021-12-08 22:57:33 +01:00
Santiago Pastorino
3287f72d39
Avoid code duplication by extracting checks into fns
2021-10-23 08:55:48 -03:00
Santiago Pastorino
9534186857
Hide negative coherence checks under negative_impls feature flag
2021-10-22 17:54:20 -03:00
Santiago Pastorino
da79fa964c
Add rustc_strict_coherence attribute and use it to check overlap
2021-10-22 15:49:46 -03:00
Santiago Pastorino
7829d9dde3
Document overlap check filter
2021-10-22 09:22:19 -03:00
Santiago Pastorino
6ae1d68e16
Use predicate_must_hold_modulo_regions
2021-10-20 12:10:46 -03:00
Santiago Pastorino
8b0bfb0dcb
Consider negative polarity on overlap check
2021-10-20 12:10:45 -03:00
lcnr
f3996f6a88
review
2021-08-26 11:14:31 +02:00
lcnr
ab9108b70f
update TypeFlags
to deal with missing ct substs
2021-08-26 11:00:30 +02:00
Esteban Küber
18cf44b61b
Do not ICE when closure is involved in TAIT
...
Fix #83613 .
2021-04-06 18:17:50 -07:00
Josh Stone
72ebebe474
Use iter::zip in compiler/
2021-03-26 09:32:31 -07:00
Ryan Levick
0cc35f54e8
Don't check self type twice
2021-02-12 17:37:32 +01:00
Ryan Levick
bc5f4c4860
Switch boolean checks
2021-02-12 17:22:19 +01:00
Ryan Levick
8ea0973725
Short circuit full corherence check when dealing with types with different reference mutability
2021-02-12 14:04:09 +01:00
Ryan Levick
cdfc52fbd6
Try fast_reject::simplify_type in coherence before doing full check
...
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Co-authored-by: Ryan Levick <me@ryanlevick.com>
2021-02-04 10:45:17 +01:00
Matthias Krüger
d12a358673
use matches!() macro in more places
2020-12-24 13:35:12 +01:00
Bastian Kauschke
2bf93bd852
compiler: fold by value
2020-11-16 22:34:57 +01:00
Matthias Krüger
73d4171ea6
fix a couple of stylistic clippy warnings
...
namely:
clippy::redundant_pattern_matching
clippy::redundant_pattern
clippy::search_is_some
clippy::filter_next
clippy::into_iter_on_ref
clippy::clone_on_copy
clippy::needless_return
2020-09-15 22:44:54 +02:00
LeSeulArtichaut
3e14b684dd
Change ty.kind to a method
2020-09-04 17:47:51 +02:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00