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

A few improvements to the slice docs. #39147

Closed
wants to merge 1 commit into from
Closed

A few improvements to the slice docs. #39147

wants to merge 1 commit into from

Conversation

frewsxcv
Copy link
Member

No description provided.

@frewsxcv
Copy link
Member Author

r? @GuillaumeGomez

@GuillaumeGomez
Copy link
Member

failures:

---- slice::[T]::ends_with_1 stdout ----
	error[E0282]: unable to infer enough type information about `T`
 --> <anon>:7:11
  |
7 | assert!(v.ends_with(&[]));
  |           ^^^^^^^^^ cannot infer type for `T`
  |
  = note: type annotations or generic parameter binding required

error: aborting due to previous error(s)

thread 'slice::[T]::ends_with_1' panicked at 'Box<Any>', /checkout/src/librustc/session/mod.rs:203
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- slice::[T]::iter_mut_0 stdout ----
	error[E0277]: the trait bound `&mut [{integer}; 3]: std::cmp::PartialEq<[{integer}; 3]>` is not satisfied
 --> <anon>:8:1
  |
8 | assert_eq!(x, [3, 4, 6]);
  | ^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `std::cmp::PartialEq<[{integer}; 3]>` is not implemented for `&mut [{integer}; 3]`
  |
  = help: the following implementations were found:
            <[A] as std::cmp::PartialEq<[B]>>
            <[A; 0] as std::cmp::PartialEq<[B; 0]>>
            <[B] as std::cmp::PartialEq<[A; 0]>>
            <[A; 0] as std::cmp::PartialEq<[B]>>
          and 228 others
  = note: this error originates in a macro outside of the current crate

error: aborting due to previous error(s)

thread 'slice::[T]::iter_mut_0' panicked at 'Box<Any>', /checkout/src/librustc/session/mod.rs:203

---- slice::[T]::starts_with_1 stdout ----
	error[E0282]: unable to infer enough type information about `T`
 --> <anon>:7:11
  |
7 | assert!(v.starts_with(&[]));
  |           ^^^^^^^^^^^ cannot infer type for `T`
  |
  = note: type annotations or generic parameter binding required

error: aborting due to previous error(s)

thread 'slice::[T]::starts_with_1' panicked at 'Box<Any>', /checkout/src/librustc/session/mod.rs:203

Once fixed, can you squash your commits please? (Otherwise nothing to say, good job!)

@frewsxcv frewsxcv force-pushed the slice branch 2 times, most recently from c085fed to 81acd48 Compare January 18, 2017 13:37
@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Jan 18, 2017

📌 Commit 81acd48 has been approved by GuillaumeGomez

@GuillaumeGomez
Copy link
Member

Still failing. r=me once tests fixed.

@bors: r-

* Simplify `Option::iter_mut` doc example.
* Document 'empty' corner-cases for `slice::{starts_with, ends_with}`.
* Indicate 'true' as code-like.
@frewsxcv
Copy link
Member Author

@bors r=GuillaumeGomez

@bors
Copy link
Contributor

bors commented Jan 18, 2017

📌 Commit 745bffd has been approved by GuillaumeGomez

@frewsxcv
Copy link
Member Author

@bors rollup

@alexcrichton alexcrichton deleted the slice branch January 18, 2017 23:05
@alexcrichton
Copy link
Member

Oh hm looks like this PR was issued from the rust-lang/rust repo and was auto-closed when I deleted that branch. @frewsxcv could you re-send the PR from your own repo?

@frewsxcv
Copy link
Member Author

Oh my bad, accidentally pushed to origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants