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

[doc] note the special type inference handling for shift ops #49915

Merged
merged 1 commit into from
Apr 14, 2018

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Apr 12, 2018

This adds a note to the docs about the difference between the shift ops and the corresponding trait methods when it comes to type inference.

@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 12, 2018
@joshtriplett
Copy link
Member

Looks like a reasonable documentation update to me. Could I get confirmation from @rust-lang/lang on the accuracy of the comment?

@llogiq
Copy link
Contributor Author

llogiq commented Apr 12, 2018

FWiW, I've also written up a blog post on the distinction and how I happened upon it.

@joshtriplett
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Apr 12, 2018

📌 Commit a7e3d85 has been approved by joshtriplett

@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 Apr 12, 2018
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to avoid the jargon typeck in user facing documentation.

@@ -315,7 +315,12 @@ macro_rules! bitxor_impl {

bitxor_impl! { bool usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 }

/// The left shift operator `<<`.
/// The left shift operator `<<`. Note that because this trait is implemented
/// for all integer types with multiple right-hand-side types, typeck has
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/typeck/Rust's type checker/

@@ -417,7 +422,12 @@ macro_rules! shl_impl_all {

shl_impl_all! { u8 u16 u32 u64 u128 usize i8 i16 i32 i64 isize i128 }

/// The right shift operator `>>`.
/// The right shift operator `>>`. Note that because this trait is implemented
/// for all integer types with multiple right-hand-side types, typeck has
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/typeck/Rust's type checker/

@joshtriplett
Copy link
Member

joshtriplett commented Apr 12, 2018 via email

@llogiq
Copy link
Contributor Author

llogiq commented Apr 13, 2018

@kennytm can I s/typeck/Rust's type checker/ now or would that hinder your rollup?

@kennytm
Copy link
Member

kennytm commented Apr 13, 2018

@llogiq I've removed this PR from the rollup. Feel free to change anything.

@llogiq
Copy link
Contributor Author

llogiq commented Apr 13, 2018

I've replaced 'typeck' with 'the Rust type checker'. This should now be good to go.

@kennytm
Copy link
Member

kennytm commented Apr 13, 2018

@bors r=joshtriplett

@bors
Copy link
Contributor

bors commented Apr 13, 2018

📌 Commit b744e3d has been approved by joshtriplett

kennytm added a commit to kennytm/rust that referenced this pull request Apr 14, 2018
[doc] note the special type inference handling for shift ops

This adds a note to the docs about the difference between the shift ops and the corresponding trait methods when it comes to type inference.
bors added a commit that referenced this pull request Apr 14, 2018
Rollup of 14 pull requests

Successful merges: #49908, #49876, #49916, #49951, #49465, #49922, #49866, #49915, #49886, #49913, #49852, #49958, #49871, #49864

Failed merges:
@bors bors merged commit b744e3d into rust-lang:master Apr 14, 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.

6 participants