Fix false positive with new_ret_no_self when returning Self with different generic arguments
This commit is contained in:
parent
917b538c68
commit
99b8a67198
3 changed files with 31 additions and 4 deletions
|
|
@ -340,3 +340,13 @@ mod issue5435 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// issue #1724
|
||||
struct RetOtherSelf<T>(T);
|
||||
struct RetOtherSelfWrapper<T>(T);
|
||||
|
||||
impl RetOtherSelf<T> {
|
||||
fn new(t: T) -> RetOtherSelf<RetOtherSelfWrapper<T>> {
|
||||
RetOtherSelf(RetOtherSelfWrapper(t))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue