Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cursor: update docs to clarify Cursor only works with in-memory buffers #52548

Merged
merged 1 commit into from
Jul 24, 2018

Conversation

tko
Copy link
Contributor

@tko tko commented Jul 19, 2018

Reduce misconceptions about Cursor being more general than it really is.

Fixes: #52470

Reduce misconceptions about Cursor being more general than it really is.

Fixes: rust-lang#52470
@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 19, 2018
@Mark-Simulacrum
Copy link
Member

r? @sfackler

@nagisa
Copy link
Member

nagisa commented Jul 19, 2018

To implement AsRef<[u8]> it is not required for the data to be stored in memory. The only requirement is that you should be able to provide a view of the data in address space (which one could do with e.g. memory maps).

I would refrain from wording the documentation in a way that assumes anything about how the type bounds used in the Cursor API are supposed to work.

@pietroalbini
Copy link
Member

Ping from triage @sfackler! This PR needs your review.

@sfackler
Copy link
Member

Looks good to me!

@bors r+ rollup

@nagisa [u8] by definition points to data that is in-memory. Some of that memory may or may not be resident at any given time, but that doesn't change the fact that it's semantically present.

@bors
Copy link
Contributor

bors commented Jul 23, 2018

📌 Commit 8b80c9f has been approved by sfackler

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 23, 2018
kennytm added a commit to kennytm/rust that referenced this pull request Jul 24, 2018
Cursor: update docs to clarify Cursor only works with in-memory buffers

Reduce misconceptions about Cursor being more general than it really is.

Fixes: rust-lang#52470
bors added a commit that referenced this pull request Jul 24, 2018
Rollup of 10 pull requests

Successful merges:

 - #52538 (Remove obsolete flags in the i586_musl Dockerfile)
 - #52548 (Cursor: update docs to clarify Cursor only works with in-memory buffers)
 - #52605 (Do not suggest using `to_owned()` on `&str += &str`)
 - #52621 (Fix color detection for Windows msys terminals.)
 - #52622 (Use MultiSpan in E0707 and E709)
 - #52627 (Compile rustc before building tests for rustdoc)
 - #52637 (Don't use NonNull::dangling as sentinel value in Rc, Arc)
 - #52640 (Forget Waker when cloning LocalWaker)
 - #52641 (Simplify 2 functions in rustc_mir/dataflow)
 - #52642 (Replace a few expect+format combos with unwrap_or_else+panic)

Failed merges:

r? @ghost
@bors bors merged commit 8b80c9f into rust-lang:master Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants