Michael Goulet
86756c1804
Stop taking ParamTy/ParamConst/EarlyParamRegion/AliasTy by ref
2024-04-19 21:09:51 -04:00
Michael Goulet
ecef296a03
Simplify shallow resolver to just fold ty/consts
2024-04-15 18:09:16 -04:00
Rémy Rakic
68b4257ccf
Revert "remove pred_known_to_hold_modulo_regions"
...
This reverts commit 399a258f46 .
2024-04-06 23:29:59 +00:00
Michael Goulet
c9f8529793
Uplift and start using check_args_compatible more liberally
2024-04-03 11:18:55 -04:00
surechen
1012218ba8
t plit astconv's error report code in check functions to mod errors.
...
Move some error report codes to mod `astconv/errors.rs`
2024-04-02 20:10:35 +08:00
León Orell Valerian Liehr
05d48b936f
Rename AstConv to HIR ty lowering
...
This includes updating astconv-related items and a few local variables.
2024-03-22 06:31:40 +01:00
Jason Newcomb
be9b125d41
Convert TypeVisitor and DefIdVisitor to use VisitorResult
2024-03-05 13:28:15 -05:00
clubby789
9bfc46c5d8
Add newtype for first input type
2024-02-20 13:32:55 +00:00
lcnr
9771fb08b6
split project into multiple files
2024-02-19 09:17:00 +01:00
lcnr
399a258f46
remove pred_known_to_hold_modulo_regions
2024-02-19 09:06:34 +01:00
Shoyu Vanilla
3856df059e
Dejargnonize subst
2024-02-12 15:46:35 +09:00
Michael Goulet
028d29301f
Deeply normalize when processing registered region obligations
2024-01-30 00:06:53 +00:00
Oli Scherer
0978f6e010
Avoid silencing relevant follow-up errors
2024-01-09 21:08:16 +00:00
Nicholas Nethercote
99472c7049
Remove Session methods that duplicate DiagCtxt methods.
...
Also add some `dcx` methods to types that wrap `TyCtxt`, for easier
access.
2023-12-24 08:05:28 +11:00
lcnr
11d16c4082
update use of feature flags
2023-12-14 15:22:37 +01:00
Nicholas Nethercote
5d1d384443
Rename HandlerInner::delay_span_bug as HandlerInner::span_delayed_bug.
...
Because the corresponding `Level` is `DelayedBug` and `span_delayed_bug`
follows the pattern used everywhere else: `span_err`, `span_warning`,
etc.
2023-12-02 09:01:19 +11:00
lcnr
15f21562e6
finish RegionKind rename
...
- `ReFree` -> `ReLateParam`
- `ReEarlyBound` -> `ReEarlyParam`
2023-11-14 13:13:27 +00:00
Esteban Küber
17a6ae2df3
Detect object safety errors when assoc type is missing
...
When an associated type with GATs isn't specified in a `dyn Trait`, emit
an object safety error instead of only complaining about the missing
associated type, as it will lead the user down a path of three different
errors before letting them know that what they were trying to do is
impossible to begin with.
Fix #103155 .
2023-10-30 22:12:07 +00:00
bohan
482275b194
use visibility to check unused imports and delete some stmts
2023-10-22 21:27:46 +08:00
Esteban Küber
91b9ffeab0
Reorder fullfillment errors to keep more interesting ones first
...
In `report_fullfillment_errors` push back `T: Sized`, `T: WellFormed`
and coercion errors to the end of the list. The pre-existing
deduplication logic eliminates redundant errors better that way, keeping
the resulting output with fewer errors than before, while also having
more detail.
2023-10-04 02:04:14 +00:00
Ralf Jung
6e4779ab17
make the eval() functions on our const types return the resulting value
2023-09-13 07:29:34 +02:00
Deadbeef
4fec845c3f
Remove constness from TraitPredicate
2023-08-02 15:38:00 +00:00
Deadbeef
e6b423aebb
Remove constness from ParamEnv
2023-07-27 15:50:42 +00:00
León Orell Valerian Liehr
5924043b86
rustdoc: handle cross-crate RPITITs correctly
2023-07-22 12:20:17 +02:00
Mahdi Dibaiee
e55583c4b8
refactor(rustc_middle): Substs -> GenericArg
2023-07-14 13:27:35 +01:00
Mark Rousskov
cc907f80b9
Re-format let-else per rustfmt update
2023-07-12 21:49:27 -04:00
Mark Rousskov
67b0cfc761
Flip cfg's for bootstrap bump
2023-07-12 21:38:55 -04:00
Oli Scherer
4c99872efe
Require TAITs to be mentioned in the signatures of functions that register hidden types for them
2023-07-07 13:13:18 +00:00
Michael Goulet
810fbf086d
Remove chalk from the compiler
2023-07-03 21:40:04 +00:00
lcnr
412c6e0b07
review
2023-07-03 09:12:15 +02:00
lcnr
42067596c2
add deep normalization via the new solver
2023-07-03 09:12:14 +02:00
bors
7383ab7378
Auto merge of #113154 - lcnr:better-probe-check, r=compiler-errors
...
change snapshot tracking in fulfillment contexts
use the exact snapshot number to prevent misuse even when created inside of a snapshot
2023-07-01 01:53:10 +00:00
lcnr
d04775d739
change snapshot tracking in fulfillment contexts
2023-06-29 10:02:26 +02:00
Michael Goulet
fbdef58414
Migrate predicates_of and caller_bounds to Clause
2023-06-26 23:12:03 +00:00
Michael Goulet
5344ed23fa
Don't substitute a GAT that has mismatched generics in OpaqueTypeCollector
2023-06-21 16:33:17 +00:00
Michael Goulet
fca56a8d2c
s/Clause/ClauseKind
2023-06-19 14:57:42 +00:00
bors
6ee4265ca6
Auto merge of #104455 - the8472:dont-drain-on-drop, r=Amanieu
...
Don't drain-on-drop in DrainFilter impls of various collections.
This removes drain-on-drop behavior from various unstable DrainFilter impls (not yet for HashSet/Map) because that behavior [is problematic](https://github.com/rust-lang/rust/issues/43244#issuecomment-641638196 ) (because it can lead to panic-in-drop when user closures panic) and may become forbidden if [this draft RFC passes](https://github.com/rust-lang/rfcs/pull/3288 ).
closes #101122
[ACP](https://github.com/rust-lang/libs-team/issues/136 )
affected tracking issues
* #43244
* #70530
* #59618
Related hashbrown update: https://github.com/rust-lang/hashbrown/pull/374
2023-06-15 00:03:10 +00:00
The 8472
114d5f221c
s/drain_filter/extract_if/ for Vec, Btree{Map,Set} and LinkedList
2023-06-14 09:28:54 +02:00
Maybe Waffle
f2545fb225
Collect VTable stats & add -Zprint-vtable-sizes
2023-06-12 15:58:35 +00:00
Michael Goulet
8ab10bacdf
remove search_for_adt_const_param_violation
2023-06-01 18:03:59 +00:00
Boxy
1e9b69bf3f
move hack to normalize_param_env_or_error
2023-05-31 02:14:15 +01:00
lcnr
08d149ca85
EarlyBinder::new -> EarlyBinder::bind
2023-05-29 13:46:10 +02:00
Kyle Matsuda
03534ac8b7
Replace EarlyBinder(x) with EarlyBinder::new(x)
2023-05-28 10:44:50 -06:00
许杰友 Jieyou Xu (Joe)
b9606589c4
Add warn-by-default lint for local binding shadowing exported glob re-export item
2023-05-27 18:49:07 +08:00
Michael Goulet
4cfafb275e
Structurally normalize in the new solver
2023-05-22 21:18:20 +00:00
bors
19ca5692f6
Auto merge of #110100 - compiler-errors:no-infer-pred-must-hold, r=jackh726
...
do not allow inference in `predicate_must_hold` (alternative approach)
See the FCP description for more info, but tl;dr is that we should not return `EvaluatedToOkModuloRegions` if an obligation may hold only with some choice of inference vars being constrained.
Attempts to solve this in the approach laid out by lcnr here: https://github.com/rust-lang/rust/pull/109558#discussion_r1147318134 , rather than by eagerly replacing infer vars with placeholders which is a bit too restrictive.
r? `@ghost`
2023-05-19 03:36:37 +00:00
John Kåre Alsaker
fff20a703d
Move expansion of query macros in rustc_middle to rustc_middle::query
2023-05-15 08:49:13 +02:00
Michael Goulet
c06e61151c
do not allow inference in pred_known_to_hold_modulo_regions
2023-05-12 18:47:45 +00:00
Dylan DPC
f748bb1402
Rollup merge of #111252 - matthewjasper:min-spec-improvements, r=compiler-errors
...
Min specialization improvements
- Don't allow specialization impls with no items, such implementations are probably not correct and only occur as mistakes in the compiler and standard library
- Fix a missing normalization call
- Adds spans for lifetime errors from overly general specializations
Closes #79457
Closes #109815
2023-05-09 12:33:46 +05:30
Michael Goulet
29ac429c9b
Rollup merge of #109410 - fmease:iat-alias-kind-inherent, r=compiler-errors
...
Introduce `AliasKind::Inherent` for inherent associated types
Allows us to check (possibly generic) inherent associated types for well-formedness.
Type inference now also works properly.
Follow-up to #105961 . Supersedes #108430 .
Fixes #106722 .
Fixes #108957 .
Fixes #109768 .
Fixes #109789 .
Fixes #109790 .
~Not to be merged before #108860 (`AliasKind::Weak`).~
CC `@jackh726`
r? `@compiler-errors`
`@rustbot` label T-types F-inherent_associated_types
2023-05-08 09:30:21 -07:00