We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aba6b13 commit d262cbaCopy full SHA for d262cba
tests/ui/lint/lint-redundant-sizedness-bound.rs
@@ -1,4 +1,7 @@
1
#![deny(redundant_sizedness_bound)]
2
+#![feature(sized_hierarchy)]
3
+
4
+use std::marker::{MetaSized, PointeeSized};
5
6
fn directly<T: Sized + ?Sized>(t: &T) {}
7
//~^ ERROR redundant_sizedness_bound
@@ -102,6 +105,15 @@ mod larger_graph {
102
105
103
106
}
104
107
108
+trait S1: Sized {}
109
+fn meta_sized<T: MetaSized + S1>() {}
110
+//~^ ERROR redundant_sizedness_bound
111
+fn pointee_sized<T: PointeeSized + S1>() {}
112
113
+trait M1: MetaSized {}
114
+fn pointee_metasized<T: PointeeSized + M1>() {}
115
116
117
// Should not lint
118
119
fn sized<T: Sized>() {}
0 commit comments