Commit Graph

15 Commits

Author SHA1 Message Date
许杰友 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