[doc] note the special type inference handling for shift ops#49915
[doc] note the special type inference handling for shift ops#49915bors merged 1 commit intorust-lang:masterfrom
Conversation
|
(rust_highfive has picked a reviewer for you, use r? to override) |
|
Looks like a reasonable documentation update to me. Could I get confirmation from @rust-lang/lang on the accuracy of the comment? |
|
FWiW, I've also written up a blog post on the distinction and how I happened upon it. |
|
@bors r+ rollup |
|
📌 Commit a7e3d85 has been approved by |
src/libcore/ops/bit.rs
Outdated
There was a problem hiding this comment.
s/typeck/Rust's type checker/
src/libcore/ops/bit.rs
Outdated
There was a problem hiding this comment.
s/typeck/Rust's type checker/
|
On April 12, 2018 3:53:02 PM PDT, Mazdak Farrokhzad ***@***.***> wrote:
Centril commented on this pull request.
We probably 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
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
s/typeck/Rust's type checker/
Good point!
|
|
@kennytm can I |
|
@llogiq I've removed this PR from the rollup. Feel free to change anything. |
|
I've replaced 'typeck' with 'the Rust type checker'. This should now be good to go. |
|
@bors r=joshtriplett |
|
📌 Commit b744e3d has been approved by |
[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.
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.