Skip to content

Rollup of 8 pull requests #120649

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 38 commits into from
Feb 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
1eaeaaf
Add FileCheck for array_index.rs, boolean_identities.rs and cast.rs
sfzhu93 Jan 8, 2024
e05c779
Add FileCheck for checked.rs and default_boxed_slice.rs.
sfzhu93 Jan 8, 2024
33e5d85
Add FileCheck for enum.rs
sfzhu93 Jan 8, 2024
24aefa0
Add FileCheck for if.rs, inherit_overflow.rs, issue_81605.rs
sfzhu93 Jan 9, 2024
9452d7e
Add FileCheck to 3 tests: large_array_index, mult_by_zero, and offset_of
sfzhu93 Jan 9, 2024
e9152e2
Add FileCheck to 3 tests: ref_without_sb, repeat, repr_transparent
sfzhu93 Jan 9, 2024
3ab1d5d
Add FileCheck to 3 tests: self_assign_add, self_assign, and sibling_ptr
sfzhu93 Jan 9, 2024
d765e3a
Add FileCheck to slice_len.rs
sfzhu93 Jan 9, 2024
732f6a1
Add FileCheck to struct.rs
sfzhu93 Jan 9, 2024
1adda9a
Add FileCheck to terminator.rs and tuple.rs
sfzhu93 Jan 9, 2024
7135168
Add FileCheck for enum.rs
sfzhu93 Jan 8, 2024
d63f10b
resolve code reviews
sfzhu93 Jan 12, 2024
1c886d7
resolve code reviews
sfzhu93 Jan 12, 2024
cd77d59
update enum.rs for code review
sfzhu93 Jan 13, 2024
5747ece
add FIXME for default_boxed_slice.rs
sfzhu93 Jan 15, 2024
edba949
update misuse of check-label
sfzhu93 Jan 20, 2024
7ad307d
finish a pattern in `enum.rs`
sfzhu93 Jan 20, 2024
65b1083
update enum.rs
sfzhu93 Jan 23, 2024
699b59c
update terminator.rs
sfzhu93 Jan 29, 2024
44d8ecb
Only suggest removal of `as_*` and `to_` conversion methods on E0308
estebank Jan 29, 2024
c4c22b0
On E0277 be clearer about implicit `Sized` bounds on type params and …
estebank Jan 24, 2024
95d9009
Change incr comp test when adding explicit `Sized` bound
estebank Jan 25, 2024
8b0ab54
review comment: change wording
estebank Jan 30, 2024
4feec41
`#![feature(inline_const_pat)]` is no longer incomplete
matthewjasper Feb 1, 2024
0148da3
put pnkfelix (me) back on the review queue.
pnkfelix Feb 1, 2024
02320b5
Improve the diagnostics for unused generic parameters
fmease Feb 1, 2024
bedd81e
add test for try-block-in-match-arm
Fishrock123 Feb 1, 2024
2c0030f
Correctly check `never_type` feature gating
GuillaumeGomez Feb 1, 2024
0f21e45
Update `never_type` feature gate ui test
GuillaumeGomez Feb 1, 2024
0df6dfd
fix rebase
estebank Feb 1, 2024
2b25957
Rollup merge of #119759 - sfzhu93:master, r=cjgillot
matthiaskrgr Feb 4, 2024
6af0458
Rollup merge of #120323 - estebank:issue-120178, r=fmease
matthiaskrgr Feb 4, 2024
b23945c
Rollup merge of #120473 - estebank:issue-114329, r=TaKO8Ki
matthiaskrgr Feb 4, 2024
592beb1
Rollup merge of #120540 - Fishrock123:test-try-block-in-match-arm, r=…
matthiaskrgr Feb 4, 2024
fa7d3e9
Rollup merge of #120547 - matthewjasper:complete-inline-const-pat, r=…
matthiaskrgr Feb 4, 2024
c2ad283
Rollup merge of #120552 - GuillaumeGomez:never-type-feature-gate, r=c…
matthiaskrgr Feb 4, 2024
1547510
Rollup merge of #120555 - pnkfelix:put-pnkfelix-back-on-review-queue,…
matthiaskrgr Feb 4, 2024
7fa99bf
Rollup merge of #120556 - fmease:improve-unused-generic-param-diags, …
matthiaskrgr Feb 4, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
review comment: change wording
estebank committed Feb 1, 2024
commit 8b0ab54ffefd8855a9030f2c08463f041d0e9770
Original file line number Diff line number Diff line change
@@ -3010,7 +3010,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
}
}
let mut a = "a";
let mut this = "this";
let mut this = "this bound";
let mut note = None;
let mut help = None;
if let ty::PredicateKind::Clause(clause) = predicate.kind().skip_binder()
@@ -3036,7 +3036,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
.any(|param| tcx.def_span(param.def_id) == span)
{
a = "an implicit `Sized`";
this = "the implicit `Sized` requirement on this";
this = "the implicit `Sized` requirement on this type parameter";
}
if let Some(hir::Node::TraitItem(hir::TraitItem {
ident,
@@ -3106,7 +3106,7 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
};
let descr = format!("required by {a} bound in `{item_name}`");
if span.is_visible(sm) {
let msg = format!("required by {this} bound in `{short_item_name}`");
let msg = format!("required by {this} in `{short_item_name}`");
multispan.push_span_label(span, msg);
err.span_note(multispan, descr);
} else {
2 changes: 1 addition & 1 deletion tests/ui/associated-types/issue-20005.stderr
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ note: required by an implicit `Sized` bound in `From`
--> $DIR/issue-20005.rs:1:12
|
LL | trait From<Src> {
| ^^^ required by the implicit `Sized` requirement on this bound in `From`
| ^^^ required by the implicit `Sized` requirement on this type parameter in `From`
help: consider further restricting `Self`
|
LL | ) -> <Dst as From<Self>>::Result where Dst: From<Self>, Self: Sized {
2 changes: 1 addition & 1 deletion tests/ui/dst/dst-sized-trait-param.stderr
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Foo`
--> $DIR/dst-sized-trait-param.rs:5:11
|
LL | trait Foo<T> : Sized { fn take(self, x: &T) { } } // Note: T is sized
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
help: consider relaxing the implicit `Sized` restriction
|
LL | trait Foo<T: ?Sized> : Sized { fn take(self, x: &T) { } } // Note: T is sized
8 changes: 4 additions & 4 deletions tests/ui/extern/extern-types-unsized.stderr
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
--> $DIR/extern-types-unsized.rs:19:17
|
LL | fn assert_sized<T>() {}
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn assert_sized<T: ?Sized>() {}
@@ -31,7 +31,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
--> $DIR/extern-types-unsized.rs:19:17
|
LL | fn assert_sized<T>() {}
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn assert_sized<T: ?Sized>() {}
@@ -53,7 +53,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
--> $DIR/extern-types-unsized.rs:19:17
|
LL | fn assert_sized<T>() {}
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn assert_sized<T: ?Sized>() {}
@@ -75,7 +75,7 @@ note: required by an implicit `Sized` bound in `assert_sized`
--> $DIR/extern-types-unsized.rs:19:17
|
LL | fn assert_sized<T>() {}
| ^ required by the implicit `Sized` requirement on this bound in `assert_sized`
| ^ required by the implicit `Sized` requirement on this type parameter in `assert_sized`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn assert_sized<T: ?Sized>() {}
2 changes: 1 addition & 1 deletion tests/ui/generic-associated-types/issue-88287.stderr
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `<T as SearchableResourceExt<Crit
--> $DIR/issue-88287.rs:24:6
|
LL | impl<T, Criteria> SearchableResourceExt<Criteria> for T
| ^ required by the implicit `Sized` requirement on this bound in `<T as SearchableResourceExt<Criteria>>`
| ^ required by the implicit `Sized` requirement on this type parameter in `<T as SearchableResourceExt<Criteria>>`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - A: SearchableResource<B> + ?Sized + 'f,
2 changes: 1 addition & 1 deletion tests/ui/impl-trait/in-trait/wf-bounds.stderr
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ note: required by an implicit `Sized` bound in `Wf`
--> $DIR/wf-bounds.rs:7:10
|
LL | trait Wf<T> {
| ^ required by the implicit `Sized` requirement on this bound in `Wf`
| ^ required by the implicit `Sized` requirement on this type parameter in `Wf`
help: consider relaxing the implicit `Sized` restriction
|
LL | trait Wf<T: ?Sized> {
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-10412.stderr
Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ note: required by an implicit `Sized` bound in `Serializable`
--> $DIR/issue-10412.rs:1:27
|
LL | trait Serializable<'self, T> {
| ^ required by the implicit `Sized` requirement on this bound in `Serializable`
| ^ required by the implicit `Sized` requirement on this type parameter in `Serializable`
help: consider relaxing the implicit `Sized` restriction
|
LL | trait Serializable<'self, T: ?Sized> {
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-18919.stderr
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Option`
--> $DIR/issue-18919.rs:7:13
|
LL | enum Option<T> {
| ^ required by the implicit `Sized` requirement on this bound in `Option`
| ^ required by the implicit `Sized` requirement on this type parameter in `Option`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/issue-18919.rs:7:13
|
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-23281.stderr
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `Vec`
--> $DIR/issue-23281.rs:8:12
|
LL | struct Vec<T> {
| ^ required by the implicit `Sized` requirement on this bound in `Vec`
| ^ required by the implicit `Sized` requirement on this type parameter in `Vec`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/issue-23281.rs:8:12
|
2 changes: 1 addition & 1 deletion tests/ui/issues/issue-87199.stderr
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ note: required by an implicit `Sized` bound in `ref_arg`
--> $DIR/issue-87199.rs:10:12
|
LL | fn ref_arg<T: ?Send>(_: &T) {}
| ^ required by the implicit `Sized` requirement on this bound in `ref_arg`
| ^ required by the implicit `Sized` requirement on this type parameter in `ref_arg`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn ref_arg<T: ?Send + ?Sized>(_: &T) {}
2 changes: 1 addition & 1 deletion tests/ui/malformed/do-not-ice-on-note_and_explain.stderr
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ note: required by an implicit `Sized` bound in `A`
--> $DIR/do-not-ice-on-note_and_explain.rs:1:10
|
LL | struct A<B>(B);
| ^ required by the implicit `Sized` requirement on this bound in `A`
| ^ required by the implicit `Sized` requirement on this type parameter in `A`
help: you could relax the implicit `Sized` bound on `B` if it were used through indirection like `&B` or `Box<B>`
--> $DIR/do-not-ice-on-note_and_explain.rs:1:10
|
2 changes: 1 addition & 1 deletion tests/ui/methods/issues/issue-61525.stderr
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `Example::query`
--> $DIR/issue-61525.rs:2:14
|
LL | fn query<Q>(self, q: Q);
| ^ required by the implicit `Sized` requirement on this bound in `Example::query`
| ^ required by the implicit `Sized` requirement on this type parameter in `Example::query`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn query<Q: ?Sized>(self, q: Q);
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@ note: required by an implicit `Sized` bound in `Bar`
--> $DIR/object-safety-supertrait-mentions-Self.rs:4:11
|
LL | trait Bar<T> {
| ^ required by the implicit `Sized` requirement on this bound in `Bar`
| ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: consider further restricting `Self`
|
LL | trait Baz : Bar<Self> + Sized {
2 changes: 1 addition & 1 deletion tests/ui/str/str-mut-idx.stderr
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `bot`
--> $DIR/str-mut-idx.rs:1:8
|
LL | fn bot<T>() -> T { loop {} }
| ^ required by the implicit `Sized` requirement on this bound in `bot`
| ^ required by the implicit `Sized` requirement on this type parameter in `bot`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn bot<T: ?Sized>() -> T { loop {} }
10 changes: 5 additions & 5 deletions tests/ui/suggestions/adt-param-with-implicit-sized-bound.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `X`
--> $DIR/adt-param-with-implicit-sized-bound.rs:18:10
|
LL | struct X<T>(T);
| ^ required by the implicit `Sized` requirement on this bound in `X`
| ^ required by the implicit `Sized` requirement on this type parameter in `X`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/adt-param-with-implicit-sized-bound.rs:18:10
|
@@ -34,7 +34,7 @@ note: required by an implicit `Sized` bound in `Struct1`
--> $DIR/adt-param-with-implicit-sized-bound.rs:8:16
|
LL | struct Struct1<T>{
| ^ required by the implicit `Sized` requirement on this bound in `Struct1`
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct1`
help: consider further restricting `Self`
|
LL | fn func1() -> Struct1<Self> where Self: Sized;
@@ -54,7 +54,7 @@ note: required by an implicit `Sized` bound in `Struct2`
--> $DIR/adt-param-with-implicit-sized-bound.rs:11:20
|
LL | struct Struct2<'a, T>{
| ^ required by the implicit `Sized` requirement on this bound in `Struct2`
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct2`
help: consider further restricting `Self`
|
LL | fn func2<'a>() -> Struct2<'a, Self> where Self: Sized;
@@ -74,7 +74,7 @@ note: required by an implicit `Sized` bound in `Struct3`
--> $DIR/adt-param-with-implicit-sized-bound.rs:14:16
|
LL | struct Struct3<T>{
| ^ required by the implicit `Sized` requirement on this bound in `Struct3`
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct3`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/adt-param-with-implicit-sized-bound.rs:14:16
|
@@ -97,7 +97,7 @@ note: required by an implicit `Sized` bound in `Struct4`
--> $DIR/adt-param-with-implicit-sized-bound.rs:20:16
|
LL | struct Struct4<T>{
| ^ required by the implicit `Sized` requirement on this bound in `Struct4`
| ^ required by the implicit `Sized` requirement on this type parameter in `Struct4`
help: consider further restricting `Self`
|
LL | fn func4() -> Struct4<Self> where Self: Sized;
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ note: required by an implicit `Sized` bound in `A`
--> $DIR/issue-85943-no-suggest-unsized-indirection-in-where-clause.rs:4:10
|
LL | struct A<T>(T) where T: Send;
| ^ required by the implicit `Sized` requirement on this bound in `A`
| ^ required by the implicit `Sized` requirement on this type parameter in `A`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/issue-85943-no-suggest-unsized-indirection-in-where-clause.rs:4:10
|
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `Wrapper`
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
LL | struct Wrapper<T>(T);
| ^ required by the implicit `Sized` requirement on this bound in `Wrapper`
| ^ required by the implicit `Sized` requirement on this type parameter in `Wrapper`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
@@ -39,7 +39,7 @@ note: required by an implicit `Sized` bound in `Wrapper`
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
LL | struct Wrapper<T>(T);
| ^ required by the implicit `Sized` requirement on this bound in `Wrapper`
| ^ required by the implicit `Sized` requirement on this type parameter in `Wrapper`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
@@ -64,7 +64,7 @@ note: required by an implicit `Sized` bound in `Wrapper`
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
LL | struct Wrapper<T>(T);
| ^ required by the implicit `Sized` requirement on this bound in `Wrapper`
| ^ required by the implicit `Sized` requirement on this type parameter in `Wrapper`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/removal-of-multiline-trait-bound-in-where-clause.rs:1:16
|
18 changes: 9 additions & 9 deletions tests/ui/trait-bounds/unsized-bound.stderr
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ note: required by an implicit `Sized` bound in `Trait`
--> $DIR/unsized-bound.rs:1:13
|
LL | trait Trait<A> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<A, B> Trait<(A, B)> for (A, B) where A: ?Sized, B: ?Sized, {}
@@ -50,7 +50,7 @@ note: required by an implicit `Sized` bound in `Trait`
--> $DIR/unsized-bound.rs:1:13
|
LL | trait Trait<A> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<A, B: ?Sized, C: ?Sized> Trait<(A, B, C)> for (A, B, C) where A: ?Sized, {}
@@ -100,7 +100,7 @@ note: required by an implicit `Sized` bound in `Trait2`
--> $DIR/unsized-bound.rs:9:14
|
LL | trait Trait2<A> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait2`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait2`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<A: ?Sized, B: ?Sized> Trait2<(A, B)> for (A, B) {}
@@ -138,7 +138,7 @@ note: required by an implicit `Sized` bound in `Trait3`
--> $DIR/unsized-bound.rs:13:14
|
LL | trait Trait3<A> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait3`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait3`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<A> Trait3<A> for A where A: ?Sized {}
@@ -161,7 +161,7 @@ note: required by an implicit `Sized` bound in `Trait4`
--> $DIR/unsized-bound.rs:16:14
|
LL | trait Trait4<A> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait4`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait4`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<A: ?Sized> Trait4<A> for A {}
@@ -184,7 +184,7 @@ note: required by an implicit `Sized` bound in `Trait5`
--> $DIR/unsized-bound.rs:19:14
|
LL | trait Trait5<A, B> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait5`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait5`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<X, Y> Trait5<X, Y> for X where X: ?Sized {}
@@ -207,7 +207,7 @@ note: required by an implicit `Sized` bound in `Trait6`
--> $DIR/unsized-bound.rs:22:14
|
LL | trait Trait6<A, B> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait6`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait6`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<X: ?Sized, Y> Trait6<X, Y> for X {}
@@ -230,7 +230,7 @@ note: required by an implicit `Sized` bound in `Trait7`
--> $DIR/unsized-bound.rs:25:17
|
LL | trait Trait7<A, B> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait7`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait7`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<X, Y> Trait7<X, Y> for X where Y: ?Sized {}
@@ -253,7 +253,7 @@ note: required by an implicit `Sized` bound in `Trait8`
--> $DIR/unsized-bound.rs:28:17
|
LL | trait Trait8<A, B> {}
| ^ required by the implicit `Sized` requirement on this bound in `Trait8`
| ^ required by the implicit `Sized` requirement on this type parameter in `Trait8`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<X, Y: ?Sized> Trait8<X, Y> for X {}
4 changes: 2 additions & 2 deletions tests/ui/traits/issue-28576.stderr
Original file line number Diff line number Diff line change
@@ -29,7 +29,7 @@ note: required by an implicit `Sized` bound in `Foo`
--> $DIR/issue-28576.rs:1:15
|
LL | pub trait Foo<RHS=Self> {
| ^^^^^^^^ required by the implicit `Sized` requirement on this bound in `Foo`
| ^^^^^^^^ required by the implicit `Sized` requirement on this type parameter in `Foo`
help: consider further restricting `Self`
|
LL | pub trait Bar: Foo<Assoc=()> + Sized {
@@ -49,7 +49,7 @@ note: required by an implicit `Sized` bound in `Foo`
--> $DIR/issue-28576.rs:1:15
|
LL | pub trait Foo<RHS=Self> {
| ^^^^^^^^ required by the implicit `Sized` requirement on this bound in `Foo`
| ^^^^^^^^ required by the implicit `Sized` requirement on this type parameter in `Foo`
help: consider further restricting `Self`
|
LL | ) where Self: Sized;
Original file line number Diff line number Diff line change
@@ -26,11 +26,11 @@ LL | needs_bar::<T::Assoc1>();
| ^^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization_2`)
note: required by a bound in `needs_bar`
note: required by an implicit `Sized` bound in `needs_bar`
--> $DIR/recursive-self-normalization-2.rs:12:14
|
LL | fn needs_bar<S: Bar>() {}
| ^ required by this bound in `needs_bar`
| ^ required by the implicit `Sized` requirement on this type parameter in `needs_bar`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn needs_bar<S: Bar + ?Sized>() {}
Original file line number Diff line number Diff line change
@@ -26,11 +26,11 @@ LL | needs_bar::<T::Assoc>();
| ^^^^^^^^
|
= help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_self_normalization`)
note: required by a bound in `needs_bar`
note: required by an implicit `Sized` bound in `needs_bar`
--> $DIR/recursive-self-normalization.rs:8:14
|
LL | fn needs_bar<S: Bar>() {}
| ^ required by this bound in `needs_bar`
| ^ required by the implicit `Sized` requirement on this type parameter in `needs_bar`
help: consider relaxing the implicit `Sized` restriction
|
LL | fn needs_bar<S: Bar + ?Sized>() {}
2 changes: 1 addition & 1 deletion tests/ui/unsized/unsized-enum.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `Foo`
--> $DIR/unsized-enum.rs:4:10
|
LL | enum Foo<U> { FooSome(U), FooNone }
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
help: you could relax the implicit `Sized` bound on `U` if it were used through indirection like `&U` or `Box<U>`
--> $DIR/unsized-enum.rs:4:10
|
2 changes: 1 addition & 1 deletion tests/ui/unsized/unsized-inherent-impl-self-type.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `S5`
--> $DIR/unsized-inherent-impl-self-type.rs:5:11
|
LL | struct S5<Y>(Y);
| ^ required by the implicit `Sized` requirement on this bound in `S5`
| ^ required by the implicit `Sized` requirement on this type parameter in `S5`
help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box<Y>`
--> $DIR/unsized-inherent-impl-self-type.rs:5:11
|
2 changes: 1 addition & 1 deletion tests/ui/unsized/unsized-struct.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `Foo`
--> $DIR/unsized-struct.rs:4:12
|
LL | struct Foo<T> { data: T }
| ^ required by the implicit `Sized` requirement on this bound in `Foo`
| ^ required by the implicit `Sized` requirement on this type parameter in `Foo`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/unsized-struct.rs:4:12
|
2 changes: 1 addition & 1 deletion tests/ui/unsized/unsized-trait-impl-self-type.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `S5`
--> $DIR/unsized-trait-impl-self-type.rs:8:11
|
LL | struct S5<Y>(Y);
| ^ required by the implicit `Sized` requirement on this bound in `S5`
| ^ required by the implicit `Sized` requirement on this type parameter in `S5`
help: you could relax the implicit `Sized` bound on `Y` if it were used through indirection like `&Y` or `Box<Y>`
--> $DIR/unsized-trait-impl-self-type.rs:8:11
|
2 changes: 1 addition & 1 deletion tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `T2`
--> $DIR/unsized-trait-impl-trait-arg.rs:4:10
|
LL | trait T2<Z> {
| ^ required by the implicit `Sized` requirement on this bound in `T2`
| ^ required by the implicit `Sized` requirement on this type parameter in `T2`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<X: ?Sized> T2<X> for S4<X> {
8 changes: 4 additions & 4 deletions tests/ui/unsized/unsized3.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `f2`
--> $DIR/unsized3.rs:10:7
|
LL | fn f2<X>(x: &X) {
| ^ required by the implicit `Sized` requirement on this bound in `f2`
| ^ required by the implicit `Sized` requirement on this type parameter in `f2`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn f1<X: ?Sized>(x: &X) {
@@ -33,7 +33,7 @@ note: required by an implicit `Sized` bound in `f4`
--> $DIR/unsized3.rs:21:7
|
LL | fn f4<X: T>(x: &X) {
| ^ required by the implicit `Sized` requirement on this bound in `f4`
| ^ required by the implicit `Sized` requirement on this type parameter in `f4`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn f3<X: ?Sized + T>(x: &X) {
@@ -63,7 +63,7 @@ note: required by an implicit `Sized` bound in `f5`
--> $DIR/unsized3.rs:24:7
|
LL | fn f5<Y>(x: &Y) {}
| ^ required by the implicit `Sized` requirement on this bound in `f5`
| ^ required by the implicit `Sized` requirement on this type parameter in `f5`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn f8<X: ?Sized>(x1: &S<X>, x2: &S<X>) {
@@ -135,7 +135,7 @@ note: required by an implicit `Sized` bound in `f5`
--> $DIR/unsized3.rs:24:7
|
LL | fn f5<Y>(x: &Y) {}
| ^ required by the implicit `Sized` requirement on this bound in `f5`
| ^ required by the implicit `Sized` requirement on this type parameter in `f5`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - fn f10<X: ?Sized>(x1: Box<S<X>>) {
2 changes: 1 addition & 1 deletion tests/ui/unsized/unsized7.stderr
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ note: required by an implicit `Sized` bound in `T1`
--> $DIR/unsized7.rs:7:10
|
LL | trait T1<Z: T> {
| ^ required by the implicit `Sized` requirement on this bound in `T1`
| ^ required by the implicit `Sized` requirement on this type parameter in `T1`
help: consider removing the `?Sized` bound to make the type parameter `Sized`
|
LL - impl<X: ?Sized + T> T1<X> for S3<X> {
2 changes: 1 addition & 1 deletion tests/ui/wf/hir-wf-canonicalized.stderr
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@ note: required by an implicit `Sized` bound in `Bar`
--> $DIR/hir-wf-canonicalized.rs:9:16
|
LL | struct Bar<'a, T> {
| ^ required by the implicit `Sized` requirement on this bound in `Bar`
| ^ required by the implicit `Sized` requirement on this type parameter in `Bar`
help: consider relaxing the implicit `Sized` restriction
|
LL | struct Bar<'a, T: ?Sized> {
2 changes: 1 addition & 1 deletion tests/ui/wf/wf-fn-where-clause.stderr
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ note: required by an implicit `Sized` bound in `Vec`
--> $DIR/wf-fn-where-clause.rs:16:12
|
LL | struct Vec<T> {
| ^ required by the implicit `Sized` requirement on this bound in `Vec`
| ^ required by the implicit `Sized` requirement on this type parameter in `Vec`
help: you could relax the implicit `Sized` bound on `T` if it were used through indirection like `&T` or `Box<T>`
--> $DIR/wf-fn-where-clause.rs:16:12
|