Skip to content

Commit d262cba

Browse files
committed
Extends tests
- Extends the test to include tests covering the lints soon to be extended functionality.
1 parent aba6b13 commit d262cba

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/ui/lint/lint-redundant-sizedness-bound.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#![deny(redundant_sizedness_bound)]
2+
#![feature(sized_hierarchy)]
3+
4+
use std::marker::{MetaSized, PointeeSized};
25

36
fn directly<T: Sized + ?Sized>(t: &T) {}
47
//~^ ERROR redundant_sizedness_bound
@@ -102,6 +105,15 @@ mod larger_graph {
102105
//~^ ERROR redundant_sizedness_bound
103106
}
104107

108+
trait S1: Sized {}
109+
fn meta_sized<T: MetaSized + S1>() {}
110+
//~^ ERROR redundant_sizedness_bound
111+
fn pointee_sized<T: PointeeSized + S1>() {}
112+
//~^ ERROR redundant_sizedness_bound
113+
trait M1: MetaSized {}
114+
fn pointee_metasized<T: PointeeSized + M1>() {}
115+
//~^ ERROR redundant_sizedness_bound
116+
105117
// Should not lint
106118

107119
fn sized<T: Sized>() {}

0 commit comments

Comments
 (0)