Boxy
fe04ae7faf
stabilize gai
2025-06-11 15:30:15 +01:00
Michael Goulet
6d71251cf9
Trim suggestion parts to the subset that is purely additive
2025-02-14 00:44:10 -08:00
Michael Goulet
b480a9214a
Use underline suggestions for purely 'additive' replacements
2025-02-14 00:27:13 -08:00
Esteban Küber
f0845adb0c
Show diff suggestion format on verbose replacement
...
```
error[E0610]: `{integer}` is a primitive type and therefore doesn't have fields
--> $DIR/attempted-access-non-fatal.rs:7:15
|
LL | let _ = 2.l;
| ^
|
help: if intended to be a floating point literal, consider adding a `0` after the period and a `f64` suffix
|
LL - let _ = 2.l;
LL + let _ = 2.0f64;
|
```
2025-02-10 20:21:39 +00:00
Esteban Küber
921de9d8ea
Revert suggestion verbosity change
2024-07-22 22:51:53 +00:00
Esteban Küber
b30fdec5fb
On generic and lifetime removal suggestion, do not leave behind stray ,
2024-07-22 22:04:49 +00:00
Esteban Küber
5c2b36a21c
Change suggestion message wording
2024-07-22 22:04:49 +00:00
Esteban Küber
c807ac0340
Use verbose suggestion for "wrong # of generics"
2024-07-22 22:04:49 +00:00
Gary Guo
cfee72aa24
Fix tests and bless
2024-04-24 13:12:33 +01:00
Esteban Küber
6b24fdf811
Provide structured suggestion for unconstrained generic constant
...
```
error: unconstrained generic constant
--> $DIR/const-argument-if-length.rs:18:10
|
LL | pad: [u8; is_zst::<T>()],
| ^^^^^^^^^^^^^^^^^^^
|
help: try adding a `where` bound
|
LL | pub struct AtLeastByte<T: ?Sized> where [(); is_zst::<T>()]: {
| ++++++++++++++++++++++++++
```
Detect when the constant expression isn't `usize` and suggest casting:
```
error: unconstrained generic constant
--> f300.rs:6:10
|
6 | bb::<{!N}>();
| ^^^^
-Ztrack-diagnostics: created at compiler/rustc_trait_selection/src/traits/error_reporting/type_err_ctxt_ext.rs:3539:36
|
help: try adding a `where` bound
|
5 | fn b<const N: bool>() where [(); {!N} as usize]: {
| ++++++++++++++++++++++++++
```
Fix #122395 .
2024-03-21 00:03:59 +00:00
will
7c4b07d5e8
added pretty_print_const_expr
2024-03-17 01:38:45 +11:00
Shoyu Vanilla
6721b392e9
Replace TypeWalker usage with TypeVisitor
2024-03-08 20:49:03 +09:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives
2024-02-16 20:02:50 +00:00
Lenko Donchev
69a2bd6c04
report_not_const_evaluatable_error to avoid ICEing on ConstKind::Expr
2023-12-09 10:19:19 -06:00
Boxy
a85b0101e6
make relate's const ty assertion use semantic equality
2023-02-11 23:05:16 +00:00
Boxy
d85d906f8c
emit ConstEquate in TypeRelating<D>
2023-02-05 07:24:54 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests
2023-01-11 09:32:08 +00:00