Relax implicit `T: Sized` bounds on `BufReader<T>`, `BufWriter<T>` a...
source link: https://github.com/rust-lang/rust/pull/111074
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Relax implicit T: Sized
bounds on BufReader<T>
, BufWriter<T>
and LineWriter<T>
#111074
The head ref may contain hidden characters: "\u{1F31F}unsizes_your_buf_reader\u{1F31F}"
Conversation
Member
TL;DR:
-pub struct BufReader<R> { /* ... */ }
+pub struct BufReader<R: ?Sized> { /* ... */ }
-pub struct BufWriter<W: Write> { /* ... */ }
+pub struct BufWriter<W: ?Sized + Write> { /* ... */ }
-pub struct LineWriter<W: Write> { /* ... */ }
+pub struct LineWriter<W: ?Sized + Write> { /* ... */ }
This allows using &mut BufReader<dyn Read>
, for example.
This is an insta-stable change.
added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label
Collaborator
(rustbot has picked a reviewer for you, use r? to override) |
added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label
This comment has been hidden.
This comment has been minimized.
added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label).
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
added the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label
Member
@rfcbot fcp merge |
Team member @Amanieu has proposed to merge this. The next step is review by the rest of the tagged team members: No concerns currently listed. Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised.
and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off.
labels
This is now entering its final comment period, as per the review above. |
removed the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
No milestone
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK