lcnr
01795b14f0
change definitely non-productive cycles to error
2025-03-05 10:06:43 +01:00
León Orell Valerian Liehr
c371363650
LTA: Check where-clauses for well-formedness at the def site
2025-02-03 03:43:14 +01:00
León Orell Valerian Liehr
0b18b4fbbc
Remove all dead files inside tests/ui/
2025-01-27 02:28:04 +01:00
Esteban Küber
3f2a63a68b
Use trait name instead of full constraint in suggestion message
...
```
help: consider restricting type parameter `T` with traits `Copy` and `Trait`
|
LL | fn duplicate_custom<T: Copy + Trait>(t: S<T>) -> (S<T>, S<T>) {
| ++++++++++++++
```
```
help: consider restricting type parameter `V` with trait `Copy`
|
LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap<K, V>, k: K) -> &'a V {
| +++++++++++++++++++
```
2024-12-07 21:29:58 +00:00
Esteban Küber
d13c34828e
reword trait bound suggestion message to include the bounds
2024-12-07 21:26:20 +00:00
Michael Goulet
0465f71d60
Stop being so bail-y in candidate assembly
2024-11-21 01:35:34 +00:00
Michael Goulet
8f579497f7
Don't call const normalize in error reporting
2024-09-22 13:55:06 -04:00
León Orell Valerian Liehr
756459ed85
LTA: Diag: Detect bivariant ty params that are only used recursively
2024-07-19 18:53:40 +02:00
Michael Goulet
c02d0de871
Account for structs that have unused params in nested types in fields
2024-07-17 21:12:12 -04:00
Michael Goulet
a0a251a688
Account for self ty alias
2024-07-17 16:48:17 -04:00
Michael Goulet
3716a3fd31
Mention that type parameters are used recursively
2024-07-17 15:57:38 -04:00
Alex Macleod
d0112c6849
Spell out other trait diagnostic
2024-06-12 12:34:47 +00:00
Oli Scherer
ae24fef028
Use TraitRef::to_string
sorting in favor of TraitRef::ord
, as the latter compares DefId
s which we need to avoid
2024-03-27 14:02:15 +00:00
Michael Goulet
f614eaea2c
Remove some unnecessary allow(incomplete_features)
2024-03-11 19:42:04 +00:00
Michael Goulet
383051092f
Ignore tests w/ current/next revisions from compare-mode=next-solver
2024-03-10 21:18:41 -04:00
Oli Scherer
8206cffc48
Merge check_mod_impl_wf
and check_mod_type_wf
2024-03-07 06:27:09 +00:00
Matthias Krüger
4d71fe7cc1
Rollup merge of #121497 - lcnr:coherence-suggest-increasing-recursion-limit, r=compiler-errors
...
`-Znext-solver=coherence`: suggest increasing recursion limit
r? `@compiler-errors`
2024-03-01 22:38:47 +01:00
clubby789
367126d49a
If suggestion would leave an empty line, delete it
2024-03-01 13:48:20 +00:00
León Orell Valerian Liehr
cce81289e6
Detect empty leading where-clauses on type aliases
2024-02-29 17:20:04 +01:00
lcnr
5ec9b8d778
distinguish recursion limit based overflow for diagnostics
...
also change the number of allowed fixpoint steps to be fixed instead
of using the `log` of the total recursion depth.
2024-02-29 10:14:02 +01:00
lcnr
f7cdff825c
overflow errors: change source to a concrete enum
2024-02-22 17:43:57 +01:00
León Orell Valerian Liehr
515d805a0e
Introduce expand_weak_alias_tys
2024-02-20 17:31:49 +01:00
bors
d3df8ff851
Auto merge of #120780 - fmease:lta-in-impls, r=oli-obk
...
Properly deal with weak alias types as self types of impls
Fixes #114216 .
Fixes #116100 .
Not super happy about the two ad hoc “normalization” implementations for weak alias types:
1. In `inherent_impls`: The “peeling”, normalization to [“WHNF”][whnf]: Semantically that's exactly what we want (neither proper normalization nor shallow normalization would be correct here). Basically a weak alias type is “nominal” (well...^^) if the WHNF is nominal. [#97974 ](https://github.com/rust-lang/rust/pull/97974 ) followed the same approach.
2. In `constrained_generic_params`: Generic parameters are constrained by a weak alias type if the corresp. “normalized” type constrains them (where we only normalize *weak* alias types not arbitrary ones). Weak alias types are injective if the corresp. “normalized” type is injective.
Both have ad hoc overflow detection mechanisms.
**Coherence** is handled in #117164 .
r? `@oli-obk` or types
[whnf]: https://en.wikipedia.org/wiki/Lambda_calculus_definition#Weak_head_normal_form
2024-02-18 03:58:56 +00:00
León Orell Valerian Liehr
fde4556785
Properly check constrainedness of gen params in the presence of weak alias types
2024-02-17 08:39:01 +01:00
León Orell Valerian Liehr
8677d64c72
Support weak alias types as self type of inherent impls
2024-02-17 08:38:59 +01:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from //
to //@
directives
2024-02-16 20:02:50 +00:00
León Orell Valerian Liehr
02320b502d
Improve the diagnostics for unused generic parameters
2024-02-01 16:18:03 +01:00
León Orell Valerian Liehr
90d6fe2cba
Imply outlives-bounds on lazy type aliases
2023-12-28 02:03:43 +01:00
lcnr
11d16c4082
update use of feature flags
2023-12-14 15:22:37 +01:00
Nilstrieb
41e8d152dc
Show number in error message even for one error
...
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Esteban Küber
7411e25abe
Account for Weak
alias kinds when adding more targetted obligation
2023-08-26 20:10:19 +00:00
León Orell Valerian Liehr
051eb7ca7c
Unlock trailing where-clauses for lazy type aliases
2023-08-10 16:13:08 +02:00
Matthias Krüger
418b91a3d7
Rollup merge of #114594 - compiler-errors:new-solver-resolve-aliases, r=lcnr
...
Structurally normalize weak and inherent in new solver
It seems pretty obvious to me that we should be normalizing weak and inherent aliases too, since they can always be normalized. This PR still leaves open the question of what to do with opaques, though 💀
**Also**, we need to structurally resolve the target of a coercion, for the UI test to work.
r? `@lcnr`
2023-08-08 03:30:56 +02:00
Michael Goulet
ba4a2f7cb7
Resolve target type of coercion
2023-08-07 19:06:18 +00:00
León Orell Valerian Liehr
5468336d6b
Store the laziness of type aliases in the DefKind
2023-08-07 15:54:31 +02:00
León Orell Valerian Liehr
263a0dec60
Compute variances for lazy type aliases
2023-08-03 01:38:23 +02:00
León Orell Valerian Liehr
0ca432844c
Check lazy type aliases for well-formedness
2023-07-30 11:24:15 +02:00