Skip to content

Commit 30ffc17

Browse files
committed
new_ret_no_self added test cases
1 parent a624583 commit 30ffc17

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/ui/new_ret_no_self.rs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,20 @@ impl GenericReturnerBad {
158158
struct NestedReturnerOk;
159159

160160
impl NestedReturnerOk {
161-
// should trigger lint
161+
// should not trigger lint
162162
pub fn new() -> (Option<Self>, u32) { unimplemented!(); }
163163
}
164+
165+
struct NestedReturnerOk2;
166+
167+
impl NestedReturnerOk2 {
168+
// should not trigger lint
169+
pub fn new() -> ((Self, u32), u32) { unimplemented!(); }
170+
}
171+
172+
struct NestedReturnerOk3;
173+
174+
impl NestedReturnerOk3 {
175+
// should not trigger lint
176+
pub fn new() -> Option<(Self, u32)> { unimplemented!(); }
177+
}

0 commit comments

Comments
 (0)