Skip to content

Commit 84a1993

Browse files
committed
Reword "Required because of the requirements on the impl of ..."
1 parent 8064a49 commit 84a1993

File tree

159 files changed

+279
-279
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+279
-279
lines changed

compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2537,9 +2537,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
25372537
parent_trait_pred.remap_constness_diag(param_env);
25382538
let parent_def_id = parent_trait_pred.def_id();
25392539
let msg = format!(
2540-
"required because of the requirements on the impl of `{}` for `{}`",
2541-
parent_trait_pred.print_modifiers_and_trait_path(),
2542-
parent_trait_pred.skip_binder().self_ty()
2540+
"required for `{}` to implement `{}`",
2541+
parent_trait_pred.skip_binder().self_ty(),
2542+
parent_trait_pred.print_modifiers_and_trait_path()
25432543
);
25442544
let mut is_auto_trait = false;
25452545
match self.tcx.hir().get_if_local(data.impl_def_id) {
@@ -2608,9 +2608,9 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
26082608
pluralize!(count)
26092609
));
26102610
err.note(&format!(
2611-
"required because of the requirements on the impl of `{}` for `{}`",
2612-
parent_trait_pred.print_modifiers_and_trait_path(),
2613-
parent_trait_pred.skip_binder().self_ty()
2611+
"required for `{}` to implement `{}`",
2612+
parent_trait_pred.skip_binder().self_ty(),
2613+
parent_trait_pred.print_modifiers_and_trait_path()
26142614
));
26152615
}
26162616
// #74711: avoid a stack overflow

src/test/ui/associated-types/defaults-suitability.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ error[E0277]: the trait bound `T: Clone` is not satisfied
3939
LL | type Bar: Clone = Vec<T>;
4040
| ^^^^^^ the trait `Clone` is not implemented for `T`
4141
|
42-
= note: required because of the requirements on the impl of `Clone` for `Vec<T>`
42+
= note: required for `Vec<T>` to implement `Clone`
4343
note: required by a bound in `Foo::Bar`
4444
--> $DIR/defaults-suitability.rs:28:15
4545
|
@@ -83,7 +83,7 @@ error[E0277]: the trait bound `<Self as Foo2<T>>::Baz: Clone` is not satisfied
8383
LL | type Bar: Clone = Vec<Self::Baz>;
8484
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo2<T>>::Baz`
8585
|
86-
= note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo2<T>>::Baz>`
86+
= note: required for `Vec<<Self as Foo2<T>>::Baz>` to implement `Clone`
8787
note: required by a bound in `Foo2::Bar`
8888
--> $DIR/defaults-suitability.rs:65:15
8989
|
@@ -100,7 +100,7 @@ error[E0277]: the trait bound `<Self as Foo25<T>>::Baz: Clone` is not satisfied
100100
LL | type Bar: Clone = Vec<Self::Baz>;
101101
| ^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `<Self as Foo25<T>>::Baz`
102102
|
103-
= note: required because of the requirements on the impl of `Clone` for `Vec<<Self as Foo25<T>>::Baz>`
103+
= note: required for `Vec<<Self as Foo25<T>>::Baz>` to implement `Clone`
104104
note: required by a bound in `Foo25::Bar`
105105
--> $DIR/defaults-suitability.rs:74:15
106106
|

src/test/ui/associated-types/hr-associated-type-bound-2.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ LL | impl X<'_> for u32
55
| ^^^^^^^^^^^^^^^^^^
66
|
77
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`hr_associated_type_bound_2`)
8-
note: required because of the requirements on the impl of `for<'b> X<'b>` for `u32`
8+
note: required for `u32` to implement `for<'b> X<'b>`
99
--> $DIR/hr-associated-type-bound-2.rs:11:6
1010
|
1111
LL | impl X<'_> for u32
1212
| ^^^^^ ^^^
1313
= note: 128 redundant requirements hidden
14-
= note: required because of the requirements on the impl of `for<'b> X<'b>` for `u32`
14+
= note: required for `u32` to implement `for<'b> X<'b>`
1515

1616
error: aborting due to previous error
1717

src/test/ui/associated-types/impl-wf-cycle-1.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _`
44
LL | impl<T: Grault> Grault for (T,)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
note: required because of the requirements on the impl of `Grault` for `(T,)`
7+
note: required for `(T,)` to implement `Grault`
88
--> $DIR/impl-wf-cycle-1.rs:15:17
99
|
1010
LL | impl<T: Grault> Grault for (T,)
1111
| ^^^^^^ ^^^^
1212
= note: 1 redundant requirement hidden
13-
= note: required because of the requirements on the impl of `Grault` for `(T,)`
13+
= note: required for `(T,)` to implement `Grault`
1414

1515
error: aborting due to previous error
1616

src/test/ui/associated-types/impl-wf-cycle-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0275]: overflow evaluating the requirement `<(T,) as Grault>::A == _`
44
LL | impl<T: Grault> Grault for (T,)
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
7-
note: required because of the requirements on the impl of `Grault` for `(T,)`
7+
note: required for `(T,)` to implement `Grault`
88
--> $DIR/impl-wf-cycle-2.rs:7:17
99
|
1010
LL | impl<T: Grault> Grault for (T,)

src/test/ui/associated-types/issue-44153.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ note: expected this to be `&()`
99
|
1010
LL | type Element = ();
1111
| ^^
12-
note: required because of the requirements on the impl of `Visit` for `()`
12+
note: required for `()` to implement `Visit`
1313
--> $DIR/issue-44153.rs:13:10
1414
|
1515
LL | impl<'a> Visit for () where

src/test/ui/associated-types/issue-65774-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ LL | let closure = |config: &mut <S as MPU>::MpuConfig| writer.my_write(
1818
| ^^^^^^^ the trait `MyDisplay` is not implemented for `T`
1919
|
2020
= help: the trait `MyDisplay` is implemented for `&'a mut T`
21-
note: required because of the requirements on the impl of `MyDisplay` for `&mut T`
21+
note: required for `&mut T` to implement `MyDisplay`
2222
--> $DIR/issue-65774-1.rs:5:24
2323
|
2424
LL | impl<'a, T: MyDisplay> MyDisplay for &'a mut T { }

src/test/ui/associated-types/substs-ppaux.normal.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ LL | <str as Foo<u8>>::bar;
7777
| ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
7878
|
7979
= help: the trait `Sized` is not implemented for `str`
80-
note: required because of the requirements on the impl of `Foo<'_, '_, u8>` for `str`
80+
note: required for `str` to implement `Foo<'_, '_, u8>`
8181
--> $DIR/substs-ppaux.rs:11:17
8282
|
8383
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}

src/test/ui/associated-types/substs-ppaux.verbose.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ LL | <str as Foo<u8>>::bar;
7777
| ^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
7878
|
7979
= help: the trait `Sized` is not implemented for `str`
80-
note: required because of the requirements on the impl of `Foo<'_#0r, '_#1r, u8>` for `str`
80+
note: required for `str` to implement `Foo<'_#0r, '_#1r, u8>`
8181
--> $DIR/substs-ppaux.rs:11:17
8282
|
8383
LL | impl<'a,'b,T,S> Foo<'a, 'b, S> for T {}

src/test/ui/async-await/issue-68112.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ LL | require_send(send_fut);
4141
| ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
4242
|
4343
= help: the trait `Sync` is not implemented for `RefCell<i32>`
44-
= note: required because of the requirements on the impl of `Send` for `Arc<RefCell<i32>>`
44+
= note: required for `Arc<RefCell<i32>>` to implement `Send`
4545
note: required because it's used within this `async fn` body
4646
--> $DIR/issue-68112.rs:47:31
4747
|

src/test/ui/async-await/issue-70594.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LL | [1; ().await];
2626
|
2727
= help: the trait `Future` is not implemented for `()`
2828
= note: () must be a future or must implement `IntoFuture` to be awaited
29-
= note: required because of the requirements on the impl of `IntoFuture` for `()`
29+
= note: required for `()` to implement `IntoFuture`
3030
help: remove the `.await`
3131
|
3232
LL - [1; ().await];

src/test/ui/async-await/issue-70935-complex-spans.drop_tracking.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | fn foo(tx: std::sync::mpsc::Sender<i32>) -> impl Future + Send {
55
| ^^^^^^^^^^^^^^^^^^ `Sender<i32>` cannot be shared between threads safely
66
|
77
= help: the trait `Sync` is not implemented for `Sender<i32>`
8-
= note: required because of the requirements on the impl of `Send` for `&Sender<i32>`
8+
= note: required for `&Sender<i32>` to implement `Send`
99
note: required because it's used within this closure
1010
--> $DIR/issue-70935-complex-spans.rs:16:13
1111
|

src/test/ui/async-await/issues/issue-62009-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ LL | (|_| 2333).await;
3232
|
3333
= help: the trait `Future` is not implemented for `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]`
3434
= note: [closure@$DIR/issue-62009-1.rs:12:6: 12:9] must be a future or must implement `IntoFuture` to be awaited
35-
= note: required because of the requirements on the impl of `IntoFuture` for `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]`
35+
= note: required for `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]` to implement `IntoFuture`
3636
help: remove the `.await`
3737
|
3838
LL - (|_| 2333).await;

src/test/ui/async-await/unnecessary-await.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ LL | boo().await;
88
|
99
= help: the trait `Future` is not implemented for `()`
1010
= note: () must be a future or must implement `IntoFuture` to be awaited
11-
= note: required because of the requirements on the impl of `IntoFuture` for `()`
11+
= note: required for `()` to implement `IntoFuture`
1212
help: remove the `.await`
1313
|
1414
LL - boo().await;

src/test/ui/auto-traits/typeck-default-trait-impl-precedence.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | is_defaulted::<&'static u32>();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Signed` is not implemented for `u32`
66
|
77
= help: the trait `Signed` is implemented for `i32`
8-
note: required because of the requirements on the impl of `Defaulted` for `&'static u32`
8+
note: required for `&'static u32` to implement `Defaulted`
99
--> $DIR/typeck-default-trait-impl-precedence.rs:10:19
1010
|
1111
LL | impl<'a,T:Signed> Defaulted for &'a T { }

src/test/ui/block-result/issue-22645.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | b + 3
55
| ^ the trait `Scalar` is not implemented for `{integer}`
66
|
77
= help: the trait `Scalar` is implemented for `f64`
8-
note: required because of the requirements on the impl of `Add<{integer}>` for `Bob`
8+
note: required for `Bob` to implement `Add<{integer}>`
99
--> $DIR/issue-22645.rs:8:19
1010
|
1111
LL | impl<RHS: Scalar> Add <RHS> for Bob {

src/test/ui/closures/closure-move-sync.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | let t = thread::spawn(|| {
55
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
66
|
77
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
8-
= note: required because of the requirements on the impl of `Send` for `&std::sync::mpsc::Receiver<()>`
8+
= note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send`
99
note: required because it's used within this closure
1010
--> $DIR/closure-move-sync.rs:6:27
1111
|
@@ -24,7 +24,7 @@ LL | thread::spawn(|| tx.send(()).unwrap());
2424
| ^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely
2525
|
2626
= help: the trait `Sync` is not implemented for `Sender<()>`
27-
= note: required because of the requirements on the impl of `Send` for `&Sender<()>`
27+
= note: required for `&Sender<()>` to implement `Send`
2828
note: required because it's used within this closure
2929
--> $DIR/closure-move-sync.rs:18:19
3030
|

src/test/ui/coherence/issue-100191-2.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
error[E0275]: overflow evaluating the requirement `T: Trait<_>`
22
|
33
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`issue_100191_2`)
4-
note: required because of the requirements on the impl of `Trait<_>` for `T`
4+
note: required for `T` to implement `Trait<_>`
55
--> $DIR/issue-100191-2.rs:8:20
66
|
77
LL | default impl<T, U> Trait<T> for U {}
88
| ^^^^^^^^ ^
99
= note: 128 redundant requirements hidden
10-
= note: required because of the requirements on the impl of `Trait<_>` for `T`
10+
= note: required for `T` to implement `Trait<_>`
1111

1212
error: aborting due to previous error
1313

src/test/ui/const-generics/generic_const_exprs/abstract-const-as-cast-3.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
8-
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>`
8+
note: required for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>` to implement `Trait`
99
--> $DIR/abstract-const-as-cast-3.rs:8:22
1010
|
1111
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
@@ -32,7 +32,7 @@ LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
3232
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3333
|
3434
= help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
35-
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>`
35+
note: required for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>` to implement `Trait`
3636
--> $DIR/abstract-const-as-cast-3.rs:8:22
3737
|
3838
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
@@ -77,7 +77,7 @@ LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as u128 }>>();
7777
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7878
|
7979
= help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
80-
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>`
80+
note: required for `HasCastInTraitImpl<{ N + 1 }, { N as u128 }>` to implement `Trait`
8181
--> $DIR/abstract-const-as-cast-3.rs:8:22
8282
|
8383
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}
@@ -104,7 +104,7 @@ LL | assert_impl::<HasCastInTraitImpl<{ N + 1 }, { N as _ }>>();
104104
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105105
|
106106
= help: try adding a `where` bound using this expression: `where [(); { O as u128 }]:`
107-
note: required because of the requirements on the impl of `Trait` for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>`
107+
note: required for `HasCastInTraitImpl<{ N + 1 }, { N as _ }>` to implement `Trait`
108108
--> $DIR/abstract-const-as-cast-3.rs:8:22
109109
|
110110
LL | impl<const O: usize> Trait for HasCastInTraitImpl<O, { O as u128 }> {}

src/test/ui/const-generics/generic_const_exprs/issue-85848.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ LL | writes_to_specific_path(&cap);
77
| required by a bound introduced by this call
88
|
99
= help: the trait `Delegates<U>` is implemented for `T`
10-
note: required because of the requirements on the impl of `Contains<(), true>` for `&C`
10+
note: required for `&C` to implement `Contains<(), true>`
1111
--> $DIR/issue-85848.rs:21:12
1212
|
1313
LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
15-
note: required because of the requirements on the impl of `Delegates<()>` for `&C`
15+
note: required for `&C` to implement `Delegates<()>`
1616
--> $DIR/issue-85848.rs:12:12
1717
|
1818
LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}
@@ -32,12 +32,12 @@ LL | writes_to_specific_path(&cap);
3232
| required by a bound introduced by this call
3333
|
3434
= help: try adding a `where` bound using this expression: `where [(); { contains::<T, U>() }]:`
35-
note: required because of the requirements on the impl of `Contains<(), true>` for `&C`
35+
note: required for `&C` to implement `Contains<(), true>`
3636
--> $DIR/issue-85848.rs:21:12
3737
|
3838
LL | impl<T, U> Contains<T, { contains::<T, U>() }> for U where T: _Contains<U> {}
3939
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^
40-
note: required because of the requirements on the impl of `Delegates<()>` for `&C`
40+
note: required for `&C` to implement `Delegates<()>`
4141
--> $DIR/issue-85848.rs:12:12
4242
|
4343
LL | impl<T, U> Delegates<U> for T where T: Contains<U, true> {}

src/test/ui/consts/const-blocks/fn-call-in-non-const.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
44
LL | let _: [Option<Bar>; 2] = [no_copy(); 2];
55
| ^^^^^^^^^ the trait `Copy` is not implemented for `Bar`
66
|
7-
= note: required because of the requirements on the impl of `Copy` for `Option<Bar>`
7+
= note: required for `Option<Bar>` to implement `Copy`
88
= note: the `Copy` trait is required because this value will be copied for each element of the array
99
= help: consider creating a new `const` item and initializing it with the result of the function call to be used in the repeat position, like `const VAL: Type = const_fn();` and `let x = [VAL; 42];`
1010
= help: create an inline `const` block, see RFC #2920 <https://github.com/rust-lang/rfcs/pull/2920> for more information

src/test/ui/consts/const-blocks/migrate-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
44
LL | let arr: [Option<Bar>; 2] = [x; 2];
55
| ^ the trait `Copy` is not implemented for `Bar`
66
|
7-
= note: required because of the requirements on the impl of `Copy` for `Option<Bar>`
7+
= note: required for `Option<Bar>` to implement `Copy`
88
= note: the `Copy` trait is required because this value will be copied for each element of the array
99
help: consider annotating `Bar` with `#[derive(Copy)]`
1010
|
@@ -17,7 +17,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
1717
LL | let arr: [Option<Bar>; 2] = [x; 2];
1818
| ^ the trait `Copy` is not implemented for `Bar`
1919
|
20-
= note: required because of the requirements on the impl of `Copy` for `Option<Bar>`
20+
= note: required for `Option<Bar>` to implement `Copy`
2121
= note: the `Copy` trait is required because this value will be copied for each element of the array
2222
help: consider annotating `Bar` with `#[derive(Copy)]`
2323
|

src/test/ui/consts/const-blocks/nll-fail.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
44
LL | let arr: [Option<Bar>; 2] = [x; 2];
55
| ^ the trait `Copy` is not implemented for `Bar`
66
|
7-
= note: required because of the requirements on the impl of `Copy` for `Option<Bar>`
7+
= note: required for `Option<Bar>` to implement `Copy`
88
= note: the `Copy` trait is required because this value will be copied for each element of the array
99
help: consider annotating `Bar` with `#[derive(Copy)]`
1010
|
@@ -17,7 +17,7 @@ error[E0277]: the trait bound `Bar: Copy` is not satisfied
1717
LL | let arr: [Option<Bar>; 2] = [x; 2];
1818
| ^ the trait `Copy` is not implemented for `Bar`
1919
|
20-
= note: required because of the requirements on the impl of `Copy` for `Option<Bar>`
20+
= note: required for `Option<Bar>` to implement `Copy`
2121
= note: the `Copy` trait is required because this value will be copied for each element of the array
2222
help: consider annotating `Bar` with `#[derive(Copy)]`
2323
|

src/test/ui/consts/const-blocks/trait-error.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ error[E0277]: the trait bound `String: Copy` is not satisfied
44
LL | [Foo(String::new()); 4];
55
| ^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
66
|
7-
note: required because of the requirements on the impl of `Copy` for `Foo<String>`
7+
note: required for `Foo<String>` to implement `Copy`
88
--> $DIR/trait-error.rs:1:10
99
|
1010
LL | #[derive(Copy, Clone)]

src/test/ui/derives/deriving-copyclone.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LL | is_copy(B { a: 1, b: C });
66
| |
77
| required by a bound introduced by this call
88
|
9-
note: required because of the requirements on the impl of `Copy` for `B<C>`
9+
note: required for `B<C>` to implement `Copy`
1010
--> $DIR/deriving-copyclone.rs:9:10
1111
|
1212
LL | #[derive(Copy, Clone)]
@@ -30,7 +30,7 @@ LL | is_clone(B { a: 1, b: C });
3030
| |
3131
| required by a bound introduced by this call
3232
|
33-
note: required because of the requirements on the impl of `Clone` for `B<C>`
33+
note: required for `B<C>` to implement `Clone`
3434
--> $DIR/deriving-copyclone.rs:9:16
3535
|
3636
LL | #[derive(Copy, Clone)]
@@ -54,7 +54,7 @@ LL | is_copy(B { a: 1, b: D });
5454
| |
5555
| required by a bound introduced by this call
5656
|
57-
note: required because of the requirements on the impl of `Copy` for `B<D>`
57+
note: required for `B<D>` to implement `Copy`
5858
--> $DIR/deriving-copyclone.rs:9:10
5959
|
6060
LL | #[derive(Copy, Clone)]

0 commit comments

Comments
 (0)