-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not filter substs in
remap_generic_params_to_declaration_params
.
The relevant filtering should have been performed by borrowck.
- Loading branch information
Showing
4 changed files
with
41 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// check-pass | ||
|
||
use std::io::Write; | ||
|
||
struct A(Vec<u8>); | ||
|
||
struct B<'a> { | ||
one: &'a mut A, | ||
two: &'a mut Vec<u8>, | ||
three: Vec<u8>, | ||
} | ||
|
||
impl<'a> B<'a> { | ||
fn one(&mut self) -> &mut impl Write { | ||
&mut self.one.0 | ||
} | ||
fn two(&mut self) -> &mut impl Write { | ||
&mut *self.two | ||
} | ||
fn three(&mut self) -> &mut impl Write { | ||
&mut self.three | ||
} | ||
} | ||
|
||
struct C<'a>(B<'a>); | ||
|
||
impl<'a> C<'a> { | ||
fn one(&mut self) -> &mut impl Write { | ||
self.0.one() | ||
} | ||
fn two(&mut self) -> &mut impl Write { | ||
self.0.two() | ||
} | ||
fn three(&mut self) -> &mut impl Write { | ||
self.0.three() | ||
} | ||
} | ||
|
||
fn main() {} |