rust/tests/ui/allocator/not-an-allocator.u.stderr
Esteban Küber eeadffd926 When more than a single impl and less than 4 could apply, point at them
```
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
  --> $DIR/issue-67185-2.rs:21:6
   |
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   |
help: the following other types implement trait `Bar`
  --> $DIR/issue-67185-2.rs:9:1
   |
LL | impl Bar for [u16; 4] {}
   | ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
  --> $DIR/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar,
   |                              ^^^ required by this bound in `Foo`
```
2025-10-31 20:44:01 +00:00

51 lines
1.9 KiB
Plaintext

error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error[E0277]: the trait bound `usize: GlobalAlloc` is not satisfied
--> $DIR/not-an-allocator.rs:5:11
|
LL | #[global_allocator]
| ------------------- in this attribute macro expansion
LL | static A: usize = 0;
| ^^^^^ the trait `GlobalAlloc` is not implemented for `usize`
|
help: the trait `GlobalAlloc` is implemented for `System`
--> $SRC_DIR/std/src/sys/alloc/unix.rs:LL:COL
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0277`.