diff options
| author | Takayuki Maeda <takoyaki0316@gmail.com> | 2021-09-27 00:30:39 +0900 |
|---|---|---|
| committer | Takayuki Maeda <takoyaki0316@gmail.com> | 2021-09-27 00:30:39 +0900 |
| commit | 620f480e64cb98a108d735ea4f53bb24acfc176a (patch) | |
| tree | 97509e93f5b64acd926dc365696449ca114779a5 /src/test/ui/derives | |
| parent | e2aad3fe60ff97fc0d0d1a68a97211918c40b100 (diff) | |
| download | rust-620f480e64cb98a108d735ea4f53bb24acfc176a.tar.gz rust-620f480e64cb98a108d735ea4f53bb24acfc176a.zip | |
better suggestions
Diffstat (limited to 'src/test/ui/derives')
| -rw-r--r-- | src/test/ui/derives/deriving-copyclone.stderr | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/test/ui/derives/deriving-copyclone.stderr b/src/test/ui/derives/deriving-copyclone.stderr index 2538b5533a6..1d0554ad047 100644 --- a/src/test/ui/derives/deriving-copyclone.stderr +++ b/src/test/ui/derives/deriving-copyclone.stderr @@ -2,10 +2,8 @@ error[E0277]: the trait bound `C: Copy` is not satisfied --> $DIR/deriving-copyclone.rs:31:13 | LL | is_copy(B { a: 1, b: C }); - | ------- ^^^^^^^^^^^^^^^^ - | | | - | | expected an implementor of trait `Copy` - | | help: consider borrowing here: `&B { a: 1, b: C }` + | ------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Copy` + | | | required by a bound introduced by this call | note: required because of the requirements on the impl of `Copy` for `B<C>` @@ -19,15 +17,17 @@ note: required by a bound in `is_copy` LL | fn is_copy<T: Copy>(_: T) {} | ^^^^ required by this bound in `is_copy` = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider borrowing here + | +LL | is_copy(&B { a: 1, b: C }); + | + error[E0277]: the trait bound `C: Clone` is not satisfied --> $DIR/deriving-copyclone.rs:32:14 | LL | is_clone(B { a: 1, b: C }); - | -------- ^^^^^^^^^^^^^^^^ - | | | - | | expected an implementor of trait `Clone` - | | help: consider borrowing here: `&B { a: 1, b: C }` + | -------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Clone` + | | | required by a bound introduced by this call | note: required because of the requirements on the impl of `Clone` for `B<C>` @@ -41,15 +41,17 @@ note: required by a bound in `is_clone` LL | fn is_clone<T: Clone>(_: T) {} | ^^^^^ required by this bound in `is_clone` = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider borrowing here + | +LL | is_clone(&B { a: 1, b: C }); + | + error[E0277]: the trait bound `D: Copy` is not satisfied --> $DIR/deriving-copyclone.rs:35:13 | LL | is_copy(B { a: 1, b: D }); - | ------- ^^^^^^^^^^^^^^^^ - | | | - | | expected an implementor of trait `Copy` - | | help: consider borrowing here: `&B { a: 1, b: D }` + | ------- ^^^^^^^^^^^^^^^^ expected an implementor of trait `Copy` + | | | required by a bound introduced by this call | note: required because of the requirements on the impl of `Copy` for `B<D>` @@ -63,6 +65,10 @@ note: required by a bound in `is_copy` LL | fn is_copy<T: Copy>(_: T) {} | ^^^^ required by this bound in `is_copy` = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info) +help: consider borrowing here + | +LL | is_copy(&B { a: 1, b: D }); + | + error: aborting due to 3 previous errors |
