error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:9:24 | LL | fn directly(t: &T) {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:9:16 | LL | fn directly(t: &T) {} | ^^^^^ = note: `-D clippy::needless-maybe-sized` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_maybe_sized)]` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn directly(t: &T) {} LL + fn directly(t: &T) {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:14:19 | LL | fn depth_1(t: &T) {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:14:15 | LL | fn depth_1(t: &T) {} | ^ = note: ...because `A` has the bound `Sized` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn depth_1(t: &T) {} LL + fn depth_1(t: &T) {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:15:19 | LL | fn depth_2(t: &T) {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:15:15 | LL | fn depth_2(t: &T) {} | ^ = note: ...because `B` has the bound `A` = note: ...because `A` has the bound `Sized` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn depth_2(t: &T) {} LL + fn depth_2(t: &T) {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:18:30 | LL | fn multiple_paths(t: &T) {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:18:22 | LL | fn multiple_paths(t: &T) {} | ^ = note: ...because `A` has the bound `Sized` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn multiple_paths(t: &T) {} LL + fn multiple_paths(t: &T) {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:22:16 | LL | T: Sized + ?Sized, | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:22:8 | LL | T: Sized + ?Sized, | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - T: Sized + ?Sized, LL + T: Sized, | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:28:8 | LL | T: ?Sized, | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:26:15 | LL | fn mixed_1(t: &T) | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - where LL - T: ?Sized, | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:32:15 | LL | fn mixed_2(t: &T) | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:34:8 | LL | T: Sized, | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn mixed_2(t: &T) LL + fn mixed_2(t: &T) | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:41:8 | LL | T: ?Sized, | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:40:8 | LL | T: Sized, | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - T: Sized, LL - T: ?Sized, LL + T: Sized, | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:45:26 | LL | struct Struct(T); | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:45:18 | LL | struct Struct(T); | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - struct Struct(T); LL + struct Struct(T); | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:47:17 | LL | impl Struct { | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:47:9 | LL | impl Struct { | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - impl Struct { LL + impl Struct { | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:48:26 | LL | fn method(&self) {} | ^^^^^^ | note: `U` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:48:18 | LL | fn method(&self) {} | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn method(&self) {} LL + fn method(&self) {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:51:22 | LL | enum Enum { | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:51:14 | LL | enum Enum { | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - enum Enum { LL + enum Enum { | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:55:28 | LL | union Union<'a, T: Sized + ?Sized> { | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:55:20 | LL | union Union<'a, T: Sized + ?Sized> { | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - union Union<'a, T: Sized + ?Sized> { LL + union Union<'a, T: Sized> { | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:59:24 | LL | trait Trait { | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:59:16 | LL | trait Trait { | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - trait Trait { LL + trait Trait { | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:60:32 | LL | fn trait_method() {} | ^^^^^^ | note: `U` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:60:24 | LL | fn trait_method() {} | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn trait_method() {} LL + fn trait_method() {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:62:25 | LL | type GAT; | ^^^^^^ | note: `U` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:62:17 | LL | type GAT; | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - type GAT; LL + type GAT; | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:68:23 | LL | fn second_in_trait() {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:68:32 | LL | fn second_in_trait() {} | ^^^^^^^^^^^^^ = note: ...because `SecondInTrait` has the bound `Sized` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn second_in_trait() {} LL + fn second_in_trait() {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:70:33 | LL | fn impl_trait(_: &(impl Sized + ?Sized)) {} | ^^^^^^ | note: `impl Sized + ?Sized` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:70:25 | LL | fn impl_trait(_: &(impl Sized + ?Sized)) {} | ^^^^^ help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn impl_trait(_: &(impl Sized + ?Sized)) {} LL + fn impl_trait(_: &(impl Sized)) {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:73:42 | LL | fn in_generic_trait + ?Sized, U>() {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:73:24 | LL | fn in_generic_trait + ?Sized, U>() {} | ^^^^^^^^^^^^^^^ = note: ...because `GenericTrait` has the bound `Sized` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn in_generic_trait + ?Sized, U>() {} LL + fn in_generic_trait, U>() {} | error: `?Sized` bound is ignored because of a `Sized` requirement --> tests/ui/needless_maybe_sized.rs:88:29 | LL | fn larger_graph() {} | ^^^^^^ | note: `T` cannot be unsized because of the bound --> tests/ui/needless_maybe_sized.rs:88:24 | LL | fn larger_graph() {} | ^^ = note: ...because `A1` has the bound `B2` = note: ...because `B2` has the bound `Sized` help: change the bounds that require `Sized`, or remove the `?Sized` bound | LL - fn larger_graph() {} LL + fn larger_graph() {} | error: aborting due to 20 previous errors