Commit graph

7 commits

Author SHA1 Message Date
Oli Scherer ae24fef028 Use TraitRef::to_string sorting in favor of TraitRef::ord, as the latter compares DefIds which we need to avoid 2024-03-27 14:02:15 +00:00
Esteban Küber c4c22b0d52 On E0277 be clearer about implicit Sized bounds on type params and assoc types
```
error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
   --> f100.rs:2:33
    |
2   |     let _ = std::mem::size_of::<[i32]>();
    |                                 ^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `[i32]`
note: required by an implicit `Sized` bound in `std::mem::size_of`
   --> /home/gh-estebank/rust/library/core/src/mem/mod.rs:312:22
    |
312 | pub const fn size_of<T>() -> usize {
    |                      ^ required by the implicit `Sized` requirement on this bound in `size_of`
```

Fix #120178.
2024-02-01 03:30:26 +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
ltdk 8184c9c50d impl Step for IP addresses 2023-09-16 01:28:13 -04:00
ltdk ef3305449b Implement Step for AsciiChar 2023-08-14 01:34:47 -04:00
Michael Goulet 2c33dfea76 Don't sort strings right after we just sorted by types 2023-06-27 23:31:06 +00:00
Albert Larsan cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00
Renamed from src/test/ui/range/range-1.stderr (Browse further)