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
Boxy
d0c11bf6e3
Split part of adt_const_params into unsized_const_params
2024-07-17 11:01:29 +01:00
Boxy
1df876f4c0
Add test
2024-07-02 16:28:01 +01:00
Boxy
f74119a2e4
Bless tests and handle tests/crashes
2024-06-05 22:25:42 +01:00
Oli Scherer
2e3842b6d0
Mark all missing generic args as errors
2024-06-03 13:16:56 +00:00
Boxy
d5bd4e233d
Partially implement ConstArgHasType
2024-05-29 17:06:54 +01:00
Matthias Krüger
bb4769532b
add test for const generic ty's with lifetimes cause opaque types to ICE
...
Fixes https://github.com/rust-lang/rust/issues/111911
2024-04-28 10:23:11 +02:00
Matthias Krüger
012f9e26ac
add test for Inconsistent rustc_transmute::is_transmutable(...) result, got Yes
...
Fixes https://github.com/rust-lang/rust/issues/110969
2024-04-28 10:23:10 +02:00
Matthias Krüger
e0586a6e1a
add test for #83993
...
Fixes #83993
2024-04-19 23:09:37 +02:00
Esteban Küber
6c31f6ce12
Provide structured suggestion for #![feature(foo)]
...
```
error: `S2<'_>` is forbidden as the type of a const generic parameter
--> $DIR/lifetime-in-const-param.rs:5:23
|
LL | struct S<'a, const N: S2>(&'a ());
| ^^
|
= note: the only supported types are integers, `bool` and `char`
help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
|
LL + #![feature(adt_const_params)]
|
```
Fix #55941 .
2024-03-18 16:08:58 +00:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from // to //@ directives
2024-02-16 20:02:50 +00:00
Esteban Küber
6efddac288
Provide more context on derived obligation error primary label
...
Expand the primary span of E0277 when the immediate unmet bound is not what the user wrote:
```
error[E0277]: the trait bound `i32: Bar` is not satisfied
--> f100.rs:6:6
|
6 | <i32 as Foo>::foo();
| ^^^ the trait `Bar` is not implemented for `i32`, which is required by `i32: Foo`
|
help: this trait has no implementations, consider adding one
--> f100.rs:2:1
|
2 | trait Bar {}
| ^^^^^^^^^
note: required for `i32` to implement `Foo`
--> f100.rs:3:14
|
3 | impl<T: Bar> Foo for T {}
| --- ^^^ ^
| |
| unsatisfied trait bound introduced here
```
Fix #40120 .
2024-01-30 21:28:18 +00:00
Ralf Jung
0df7810734
remove StructuralEq trait
2024-01-24 07:56:23 +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
asquared31415
b53a1b3808
make adt_const_params feature suggestion more consistent with others and only suggest it when the type can probably work
2023-09-28 23:10:04 +00:00
Ralf Jung
ad509633a2
ConstParamTy: require Eq
2023-09-24 23:38:07 +02:00
Ralf Jung
c4ec12f4b7
adjust how closure/generator types and rvalues are printed
2023-09-21 22:20:58 +02:00
Michael Goulet
847d50453c
Implement custom diagnostic for ConstParamTy
2023-06-01 18:21:42 +00:00
Michael Goulet
a9fcb524ff
Impl ConstParamTy for tuples, make PartialStructuralEq a supertrait too
2023-06-01 18:21:42 +00:00
Nilstrieb
0336dd132b
Add derive for core::marker::ConstParamTy
...
This makes it easier to implement it for a type, just like `Copy`.
2023-05-16 20:09:25 +02:00
Maybe Waffle
1f44a24e72
--bless ConstParamTy ui tests
2023-04-27 17:26:59 +00:00
Maybe Waffle
26417a85e7
Add ConstParamTy tests
2023-04-27 15:59:07 +00:00
Maybe Waffle
51355ad92b
Add a test for [NotParam; 0]: ConstParamTy (not holding)
2023-04-27 15:59:07 +00:00
Maybe Waffle
7234d63ea4
Add !StructuralEq test for ConstParamTy
2023-04-27 15:46:23 +00:00
Maybe Waffle
c45c4f2cb1
Rename/move a test
2023-04-27 15:46:23 +00:00