Skip to content

Commit ce936e9

Browse files
committed
Do not emit note for projected derived obligations
1 parent 6bc55c7 commit ce936e9

29 files changed

+22
-48
lines changed

src/librustc_middle/traits/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ pub enum ObligationCauseCode<'tcx> {
191191

192192
ImplDerivedObligation(DerivedObligationCause<'tcx>),
193193

194+
DerivedObligation(DerivedObligationCause<'tcx>),
195+
194196
/// Error derived when matching traits/impls; see ObligationCause for more details
195197
CompareImplMethodObligation {
196198
item_name: ast::Name,
@@ -263,7 +265,10 @@ impl ObligationCauseCode<'_> {
263265
// Return the base obligation, ignoring derived obligations.
264266
pub fn peel_derives(&self) -> &Self {
265267
let mut base_cause = self;
266-
while let BuiltinDerivedObligation(cause) | ImplDerivedObligation(cause) = base_cause {
268+
while let BuiltinDerivedObligation(cause)
269+
| ImplDerivedObligation(cause)
270+
| DerivedObligation(cause) = base_cause
271+
{
267272
base_cause = &cause.parent_code;
268273
}
269274
base_cause

src/librustc_middle/traits/structural_impls.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ impl<'a, 'tcx> Lift<'tcx> for traits::ObligationCauseCode<'a> {
456456
super::ImplDerivedObligation(ref cause) => {
457457
tcx.lift(cause).map(super::ImplDerivedObligation)
458458
}
459+
super::DerivedObligation(ref cause) => tcx.lift(cause).map(super::DerivedObligation),
459460
super::CompareImplMethodObligation {
460461
item_name,
461462
impl_item_def_id,

src/librustc_trait_selection/traits/error_reporting/on_unimplemented.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
134134

135135
match obligation.cause.code {
136136
ObligationCauseCode::BuiltinDerivedObligation(..)
137-
| ObligationCauseCode::ImplDerivedObligation(..) => {}
137+
| ObligationCauseCode::ImplDerivedObligation(..)
138+
| ObligationCauseCode::DerivedObligation(..) => {}
138139
_ => {
139140
// this is a "direct", user-specified, rather than derived,
140141
// obligation.

src/librustc_trait_selection/traits/error_reporting/suggestions.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1135,7 +1135,8 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
11351135
while let Some(code) = next_code {
11361136
debug!("maybe_note_obligation_cause_for_async_await: code={:?}", code);
11371137
match code {
1138-
ObligationCauseCode::BuiltinDerivedObligation(derived_obligation)
1138+
ObligationCauseCode::DerivedObligation(derived_obligation)
1139+
| ObligationCauseCode::BuiltinDerivedObligation(derived_obligation)
11391140
| ObligationCauseCode::ImplDerivedObligation(derived_obligation) => {
11401141
let ty = derived_obligation.parent_trait_ref.self_ty();
11411142
debug!(
@@ -1661,6 +1662,16 @@ impl<'a, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'a, 'tcx> {
16611662
obligated_types,
16621663
);
16631664
}
1665+
ObligationCauseCode::DerivedObligation(ref data) => {
1666+
let parent_trait_ref = self.resolve_vars_if_possible(&data.parent_trait_ref);
1667+
let parent_predicate = parent_trait_ref.without_const().to_predicate();
1668+
self.note_obligation_cause_code(
1669+
err,
1670+
&parent_predicate,
1671+
&data.parent_code,
1672+
obligated_types,
1673+
);
1674+
}
16641675
ObligationCauseCode::CompareImplMethodObligation { .. } => {
16651676
err.note(&format!(
16661677
"the requirement `{}` appears on the impl method \

src/librustc_trait_selection/traits/wf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
243243
parent_trait_ref,
244244
parent_code: Rc::new(obligation.cause.code.clone()),
245245
};
246-
cause.code = traits::ObligationCauseCode::ImplDerivedObligation(derived_cause);
246+
cause.code = traits::ObligationCauseCode::DerivedObligation(derived_cause);
247247
}
248248
extend_cause_with_original_assoc_item_obligation(
249249
tcx,

src/test/ui/associated-type-bounds/bad-bounds-on-assoc-in-trait.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | impl Case1 for S1 {
1111
| ^^^^^ `<L1 as Lam<&'a u8>>::App` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
1212
|
1313
= help: the trait `for<'a> std::fmt::Debug` is not implemented for `<L1 as Lam<&'a u8>>::App`
14-
= note: required because of the requirements on the impl of `for<'a> std::fmt::Debug` for `<<<<S1 as Case1>::C as std::iter::Iterator>::Item as std::iter::Iterator>::Item as Lam<&'a u8>>::App`
1514

1615
error[E0277]: `<<T as Case1>::C as std::iter::Iterator>::Item` is not an iterator
1716
--> $DIR/bad-bounds-on-assoc-in-trait.rs:36:20

src/test/ui/associated-types/defaults-unsound-62211-1.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ LL | impl<T> UncheckedCopy for T {}
5353
|
5454
= help: the trait `std::fmt::Display` is not implemented for `T`
5555
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
56-
= note: required because of the requirements on the impl of `std::fmt::Display` for `<T as UncheckedCopy>::Output`
5756
help: consider restricting type parameter `T`
5857
|
5958
LL | impl<T: std::fmt::Display> UncheckedCopy for T {}
@@ -71,7 +70,6 @@ LL | + Deref<Target = str>
7170
LL | impl<T> UncheckedCopy for T {}
7271
| ^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `T`
7372
|
74-
= note: required because of the requirements on the impl of `std::ops::Deref` for `<T as UncheckedCopy>::Output`
7573
help: consider restricting type parameter `T`
7674
|
7775
LL | impl<T: std::ops::Deref> UncheckedCopy for T {}
@@ -90,7 +88,6 @@ LL | impl<T> UncheckedCopy for T {}
9088
| ^^^^^^^^^^^^^ no implementation for `T += &'static str`
9189
|
9290
= help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `T`
93-
= note: required because of the requirements on the impl of `std::ops::AddAssign<&'static str>` for `<T as UncheckedCopy>::Output`
9491
help: consider restricting type parameter `T`
9592
|
9693
LL | impl<T: std::ops::AddAssign<&'static str>> UncheckedCopy for T {}
@@ -108,7 +105,6 @@ LL | type Output: Copy
108105
LL | impl<T> UncheckedCopy for T {}
109106
| ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
110107
|
111-
= note: required because of the requirements on the impl of `std::marker::Copy` for `<T as UncheckedCopy>::Output`
112108
help: consider restricting type parameter `T`
113109
|
114110
LL | impl<T: std::marker::Copy> UncheckedCopy for T {}

src/test/ui/associated-types/defaults-unsound-62211-2.stderr

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ LL | impl<T> UncheckedCopy for T {}
5353
|
5454
= help: the trait `std::fmt::Display` is not implemented for `T`
5555
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
56-
= note: required because of the requirements on the impl of `std::fmt::Display` for `<T as UncheckedCopy>::Output`
5756
help: consider restricting type parameter `T`
5857
|
5958
LL | impl<T: std::fmt::Display> UncheckedCopy for T {}
@@ -71,7 +70,6 @@ LL | + Deref<Target = str>
7170
LL | impl<T> UncheckedCopy for T {}
7271
| ^^^^^^^^^^^^^ the trait `std::ops::Deref` is not implemented for `T`
7372
|
74-
= note: required because of the requirements on the impl of `std::ops::Deref` for `<T as UncheckedCopy>::Output`
7573
help: consider restricting type parameter `T`
7674
|
7775
LL | impl<T: std::ops::Deref> UncheckedCopy for T {}
@@ -90,7 +88,6 @@ LL | impl<T> UncheckedCopy for T {}
9088
| ^^^^^^^^^^^^^ no implementation for `T += &'static str`
9189
|
9290
= help: the trait `std::ops::AddAssign<&'static str>` is not implemented for `T`
93-
= note: required because of the requirements on the impl of `std::ops::AddAssign<&'static str>` for `<T as UncheckedCopy>::Output`
9491
help: consider restricting type parameter `T`
9592
|
9693
LL | impl<T: std::ops::AddAssign<&'static str>> UncheckedCopy for T {}
@@ -108,7 +105,6 @@ LL | type Output: Copy
108105
LL | impl<T> UncheckedCopy for T {}
109106
| ^^^^^^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
110107
|
111-
= note: required because of the requirements on the impl of `std::marker::Copy` for `<T as UncheckedCopy>::Output`
112108
help: consider restricting type parameter `T`
113109
|
114110
LL | impl<T: std::marker::Copy> UncheckedCopy for T {}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString;
1616
...
1717
LL | impl Foo<u32> for () {}
1818
| ^^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)`
19-
|
20-
= note: required because of the requirements on the impl of `std::default::Default` for `<() as Foo<u32>>::Out`
2119

2220
error[E0277]: the trait bound `(dyn std::string::ToString + 'static): std::default::Default` is not satisfied
2321
--> $DIR/issue-43924.rs:11:6
@@ -29,8 +27,6 @@ LL | type Out: Default + ToString + ?Sized = dyn ToString;
2927
...
3028
LL | impl Foo<u64> for () {}
3129
| ^^^^^^^^ the trait `std::default::Default` is not implemented for `(dyn std::string::ToString + 'static)`
32-
|
33-
= note: required because of the requirements on the impl of `std::default::Default` for `<() as Foo<u64>>::Out`
3430

3531
error: aborting due to 3 previous errors
3632

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ LL | type MpuConfig: MyDisplay = T;
1616
...
1717
LL | impl MPU for S { }
1818
| ^^^ the trait `MyDisplay` is not implemented for `T`
19-
|
20-
= note: required because of the requirements on the impl of `MyDisplay` for `<S as MPU>::MpuConfig`
2119

2220
error: aborting due to 2 previous errors
2321

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ LL | type MpuConfig: MyDisplay = T;
1616
...
1717
LL | impl MPU for S { }
1818
| ^^^ the trait `MyDisplay` is not implemented for `T`
19-
|
20-
= note: required because of the requirements on the impl of `MyDisplay` for `<S as MPU>::MpuConfig`
2119

2220
error: aborting due to 2 previous errors
2321

src/test/ui/associated-types/point-at-type-on-obligation-failure-2.stderr

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ LL | type Assoc: Bar;
88
...
99
LL | type Assoc = bool;
1010
| ^^^^ the trait `Bar` is not implemented for `bool`
11-
|
12-
= note: required because of the requirements on the impl of `Bar` for `<() as Foo>::Assoc`
1311

1412
error[E0277]: the trait bound `bool: Bar` is not satisfied
1513
--> $DIR/point-at-type-on-obligation-failure-2.rs:16:18
@@ -19,8 +17,6 @@ LL | trait Baz where Self::Assoc: Bar {
1917
...
2018
LL | type Assoc = bool;
2119
| ^^^^ the trait `Bar` is not implemented for `bool`
22-
|
23-
= note: required because of the requirements on the impl of `Bar` for `<() as Baz>::Assoc`
2420

2521
error[E0277]: the trait bound `bool: Bar` is not satisfied
2622
--> $DIR/point-at-type-on-obligation-failure-2.rs:24:18
@@ -30,8 +26,6 @@ LL | trait Bat where <Self as Bat>::Assoc: Bar {
3026
...
3127
LL | type Assoc = bool;
3228
| ^^^^ the trait `Bar` is not implemented for `bool`
33-
|
34-
= note: required because of the requirements on the impl of `Bar` for `<() as Bat>::Assoc`
3529

3630
error: aborting due to 3 previous errors
3731

src/test/ui/builtin-superkinds/builtin-superkinds-double-superkind.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ LL | impl <T: Sync+'static> Foo for (T,) { }
99
|
1010
= help: within `(T,)`, the trait `std::marker::Send` is not implemented for `T`
1111
= note: required because it appears within the type `(T,)`
12-
= note: required because of the requirements on the impl of `std::marker::Send` for `(T,)`
1312
help: consider further restricting this bound
1413
|
1514
LL | impl <T: Sync+'static + std::marker::Send> Foo for (T,) { }
@@ -26,7 +25,6 @@ LL | impl <T: Send> Foo for (T,T) { }
2625
|
2726
= help: within `(T, T)`, the trait `std::marker::Sync` is not implemented for `T`
2827
= note: required because it appears within the type `(T, T)`
29-
= note: required because of the requirements on the impl of `std::marker::Sync` for `(T, T)`
3028
help: consider further restricting this bound
3129
|
3230
LL | impl <T: Send + std::marker::Sync> Foo for (T,T) { }

src/test/ui/builtin-superkinds/builtin-superkinds-in-metadata.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | pub trait RequiresRequiresShareAndSend : RequiresShare + Send { }
1111
|
1212
= help: within `X<T>`, the trait `std::marker::Send` is not implemented for `T`
1313
= note: required because it appears within the type `X<T>`
14-
= note: required because of the requirements on the impl of `std::marker::Send` for `X<T>`
1514
help: consider further restricting this bound
1615
|
1716
LL | impl <T:Sync+'static + std::marker::Send> RequiresRequiresShareAndSend for X<T> { }

src/test/ui/builtin-superkinds/builtin-superkinds-simple.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LL | impl Foo for std::rc::Rc<i8> { }
88
| ^^^ `std::rc::Rc<i8>` cannot be sent between threads safely
99
|
1010
= help: the trait `std::marker::Send` is not implemented for `std::rc::Rc<i8>`
11-
= note: required because of the requirements on the impl of `std::marker::Send` for `std::rc::Rc<i8>`
1211

1312
error: aborting due to previous error
1413

src/test/ui/builtin-superkinds/builtin-superkinds-typaram-not-send.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ LL | impl <T: Sync+'static> Foo for T { }
88
| ^^^ `T` cannot be sent between threads safely
99
|
1010
= help: the trait `std::marker::Send` is not implemented for `T`
11-
= note: required because of the requirements on the impl of `std::marker::Send` for `T`
1211
help: consider further restricting this bound
1312
|
1413
LL | impl <T: Sync+'static + std::marker::Send> Foo for T { }

src/test/ui/dst/dst-sized-trait-param.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ LL | impl Foo<[isize]> for usize { }
99
|
1010
= help: the trait `std::marker::Sized` is not implemented for `[isize]`
1111
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
12-
= note: required because of the requirements on the impl of `std::marker::Sized` for `[isize]`
1312

1413
error[E0277]: the size for values of type `[usize]` cannot be known at compilation time
1514
--> $DIR/dst-sized-trait-param.rs:10:6
@@ -22,7 +21,6 @@ LL | impl Foo<isize> for [usize] { }
2221
|
2322
= help: the trait `std::marker::Sized` is not implemented for `[usize]`
2423
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
25-
= note: required because of the requirements on the impl of `std::marker::Sized` for `[usize]`
2624

2725
error: aborting due to 2 previous errors
2826

src/test/ui/generics/issue-61631-default-type-param-can-reference-self-in-trait.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ LL | impl Tsized for () {}
99
|
1010
= help: the trait `std::marker::Sized` is not implemented for `[()]`
1111
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
12-
= note: required because of the requirements on the impl of `std::marker::Sized` for `[()]`
1312

1413
error: aborting due to previous error
1514

src/test/ui/impl-bounds-checking.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ LL | trait Getter<T: Clone2> {
66
...
77
LL | impl Getter<isize> for isize {
88
| ^^^^^^^^^^^^^ the trait `Clone2` is not implemented for `isize`
9-
|
10-
= note: required because of the requirements on the impl of `Clone2` for `isize`
119

1210
error: aborting due to previous error
1311

src/test/ui/issues/issue-10412.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ LL | impl<'self> Serializable<str> for &'self str {
5757
|
5858
= help: the trait `std::marker::Sized` is not implemented for `str`
5959
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
60-
= note: required because of the requirements on the impl of `std::marker::Sized` for `str`
6160

6261
error: aborting due to 9 previous errors
6362

src/test/ui/issues/issue-43784-associated-type.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
44
LL | type Assoc = T;
55
| ^ the trait `std::marker::Copy` is not implemented for `T`
66
|
7-
= note: required because of the requirements on the impl of `std::marker::Copy` for `<T as Complete>::Assoc`
87
help: consider restricting type parameter `T`
98
|
109
LL | impl<T: std::marker::Copy> Complete for T {

src/test/ui/issues/issue-43784-supertrait.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ error[E0277]: the trait bound `T: std::marker::Copy` is not satisfied
44
LL | impl<T> Complete for T {}
55
| ^^^^^^^^ the trait `std::marker::Copy` is not implemented for `T`
66
|
7-
= note: required because of the requirements on the impl of `std::marker::Copy` for `T`
87
help: consider restricting type parameter `T`
98
|
109
LL | impl<T: std::marker::Copy> Complete for T {}

src/test/ui/issues/issue-65673.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | type Ctx = dyn Alias<T>;
1111
|
1212
= help: the trait `std::marker::Sized` is not implemented for `(dyn Trait + 'static)`
1313
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
14-
= note: required because of the requirements on the impl of `std::marker::Sized` for `<T as WithType>::Ctx`
1514

1615
error: aborting due to previous error
1716

src/test/ui/malformed/malformed-derive-entry.stderr

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ LL | #[derive(Copy(Bad))]
2727
LL | pub trait Copy: Clone {
2828
| ----- required by this bound in `std::marker::Copy`
2929
|
30-
= note: required because of the requirements on the impl of `std::clone::Clone` for `Test1`
3130
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
3231

3332
error[E0277]: the trait bound `Test2: std::clone::Clone` is not satisfied
@@ -41,7 +40,6 @@ LL | #[derive(Copy="bad")]
4140
LL | pub trait Copy: Clone {
4241
| ----- required by this bound in `std::marker::Copy`
4342
|
44-
= note: required because of the requirements on the impl of `std::clone::Clone` for `Test2`
4543
= note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)
4644

4745
error: aborting due to 5 previous errors

src/test/ui/specialization/defaultimpl/specialization-wfcheck.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ LL |
77
LL | default impl<U> Foo<'static, U> for () {}
88
| ^^^^^^^^^^^^^^^ the trait `std::cmp::Eq` is not implemented for `U`
99
|
10-
= note: required because of the requirements on the impl of `std::cmp::Eq` for `U`
1110
help: consider restricting type parameter `U`
1211
|
1312
LL | default impl<U: std::cmp::Eq> Foo<'static, U> for () {}

src/test/ui/suggestions/missing-assoc-type-bound-restriction.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ LL | type Assoc = ChildWrapper<T::Assoc>;
2828
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `Child<A>` is not implemented for `<T as Parent>::Assoc`
2929
|
3030
= note: required because of the requirements on the impl of `Child<A>` for `ChildWrapper<<T as Parent>::Assoc>`
31-
= note: required because of the requirements on the impl of `Child<<ParentWrapper<T> as Parent>::Ty>` for `<ParentWrapper<T> as Parent>::Assoc`
3231

3332
error[E0277]: the trait bound `<T as Parent>::Assoc: Child<A>` is not satisfied
3433
--> $DIR/missing-assoc-type-bound-restriction.rs:20:5

src/test/ui/traits/cycle-cache-err-60010.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ LL | type Storage = SalsaStorage;
2121
= note: required because of the requirements on the impl of `SourceDatabase` for `RootDatabase`
2222
= note: required because of the requirements on the impl of `Query<RootDatabase>` for `ParseQuery`
2323
= note: required because it appears within the type `SalsaStorage`
24-
= note: required because of the requirements on the impl of `std::marker::Sized` for `<RootDatabase as Database>::Storage`
2524

2625
error: aborting due to 2 previous errors
2726

src/test/ui/unsized/unsized-trait-impl-trait-arg.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | impl<X: ?Sized> T2<X> for S4<X> {
1111
|
1212
= help: the trait `std::marker::Sized` is not implemented for `X`
1313
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
14-
= note: required because of the requirements on the impl of `std::marker::Sized` for `X`
1514

1615
error: aborting due to previous error
1716

src/test/ui/unsized7.stderr

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ LL | impl<X: ?Sized + T> T1<X> for S3<X> {
1111
|
1212
= help: the trait `std::marker::Sized` is not implemented for `X`
1313
= note: to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>
14-
= note: required because of the requirements on the impl of `std::marker::Sized` for `X`
1514

1615
error: aborting due to previous error
1716

0 commit comments

Comments
 (0)