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

Redesign the std::iter::Step trait #62886

Open
wants to merge 2 commits into
base: master
from

Conversation

@CAD97
Copy link
Contributor

commented Jul 23, 2019

CC #42168, @SimonSapin @scottmcm. Revival of #43127.

The trait is now:

/// Objects that have a notion of *successor* and *predecessor*
/// for the purpose of range iterators.
///
/// This trait is `unsafe` because implementations of the `unsafe`
/// trait `TrustedLen` depend on its implementation being correct.
#[unstable(feature = "step_trait",
           reason = "recently redesigned",
           issue = "42168")]
pub unsafe trait Step: Clone + PartialOrd + Sized {
    /// Returns the number of *successor* steps needed to get from `start` to `end`.
    ///
    /// Returns `None` if that number would overflow `usize`
    /// (or is infinite, or if `end` would never be reached).
    ///
    /// # Invariants
    ///
    /// For any `a`, `b`, and `n`:
    ///
    /// * `steps_between(&a, &b) == Some(n)` if and only if `a.forward(n) == Some(b)`
    /// * `steps_between(&a, &b) == Some(n)` if and only if `b.backward(n) == Some(a)`
    fn steps_between(start: &Self, end: &Self) -> Option<usize>;

    /// Returns the value that would be obtained by taking the *successor*
    /// of `self` `count` times.
    ///
    /// Returns `None` if this would overflow the range of values supported by `Self`.
    ///
    /// # Invariants
    ///
    /// For any `a`, `n`, and `m` where `n + m` does not overflow:
    ///
    /// * `a.forward(n).and_then(|x| x.forward(m)) == a.forward(n + m)`
    /// * `a.forward(n)` equals `Step::successor` applied to `a` `n` times
    ///   * Corollary: `a.forward(0) == Some(a)`
    /// * `a.forward(n).unwrap() >= a`
    fn forward(&self, count: usize) -> Option<Self>;

    /// Returns the *successor* of `self`.
    ///
    /// If this would overflow the range of values supported by `Self`,
    /// this method is allowed to panic or overflow. Suggested behavior is
    /// to panic when debug assertions are enabled, and overflow otherwise.
    ///
    /// # Invariants
    ///
    /// For any `a` where `a.successor()` does not overflow:
    ///
    /// * `a == a.successor().predecessor()`
    #[inline]
    fn successor(&self) -> Self { self.forward(1).expect("overflow in `Step::successor`") }

    /// Returns the value that would be obtained by taking the *predecessor*
    /// of `self` `count` times.
    ///
    /// Returns `None` if this would underflow the range of values supported by `Self`.
    ///
    /// # Invariants
    ///
    /// For any `a`, `n`, and `m` where `n + m` does not overflow:
    ///
    /// * `a.backward(n).and_then(|x| x.backward(m)) == a.backward(n + m)`
    /// * `a.backward(n)` equals `Step::predecessor` applied to `a` `n` times
    ///   * Corollary: `a.backward(0) == Some(a)`
    /// * `a.backward(n).unwrap() <= a`
    fn backward(&self, count: usize) -> Option<Self>;

    /// Returns the *predecessor* of `self`.
    ///
    /// If this would underflow the range of values supported by `Self`,
    /// this method is allowed to panic or underflow. Suggested behavior is
    /// to panic when debug assertions are enabled, and underflow otherwise.
    ///
    /// # Invariants
    ///
    /// For any `a` where `a.predecessor()` does not underflow:
    ///
    /// * `a == a.predecessor().successor()`
    #[inline]
    fn predecessor(&self) -> Self { self.backward(1).expect("underflow in `Step::predecessor`") }
}

Most of the work is taken from @SimonSapin's PR, just updated to current. Again, arithmetic and overflow handling with multiple integer types of different widths and signedness is tricky, careful review would be appreciated. I had to change a few of Simon's tests to get them to pass.

This could use a perf test to see how it impacts performance. Hopefully, due to the fact that this version of the redesign really just is removing replace_one/replace_zero and renaming the other functions to fit the description as successor/predecessor rather than add/sub, it shouldn't impact much. This also makes the potential impl to make RangeInclusive<char> finally work much more straightforward.

This breaks with published chalk 0.9.0, as it implements Step. chalk master no longer implements the trait.

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 23, 2019

r? @joshtriplett

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

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 23, 2019

The job mingw-check of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-23T00:48:11.3263958Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-23T00:48:11.3460376Z ##[command]git config gc.auto 0
2019-07-23T00:48:11.3530955Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-23T00:48:11.3595008Z ##[command]git config --get-all http.proxy
2019-07-23T00:48:11.3729327Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62886/merge:refs/remotes/pull/62886/merge
---
2019-07-23T00:48:46.7767084Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-23T00:48:46.7767447Z 
2019-07-23T00:48:46.7768548Z   git checkout -b <new-branch-name>
2019-07-23T00:48:46.7768901Z 
2019-07-23T00:48:46.7769246Z HEAD is now at 3378debe5 Merge a3dc7a74d6c7adff8db249836d1f318a24de2de7 into e649e903440bfd919bfc9db848c28df6d795a116
2019-07-23T00:48:46.7922513Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-23T00:48:46.7925179Z ==============================================================================
2019-07-23T00:48:46.7925700Z Task         : Bash
2019-07-23T00:48:46.7925750Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-23T00:54:41.0030717Z     Checking lock_api v0.1.3
2019-07-23T00:54:41.3517875Z    Compiling rustc_version v0.2.3
2019-07-23T00:54:43.2718731Z     Checking polonius-engine v0.9.0
2019-07-23T00:54:43.7102522Z     Checking chalk-engine v0.9.0
2019-07-23T00:54:43.8071744Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8072228Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-23T00:54:43.8072458Z    |
2019-07-23T00:54:43.8072788Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:43.8073120Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:43.8073442Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:43.8073759Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:43.8074012Z ...    |
2019-07-23T00:54:43.8074334Z 13 |   | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-23T00:54:43.8074649Z    |   |______________________________________________________________^
2019-07-23T00:54:43.8074944Z 14 |  || & mut self ) -> Self {
2019-07-23T00:54:43.8075283Z 15 |  || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:43.8075681Z    |  ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8075919Z ...    |
2019-07-23T00:54:43.8076226Z 23 |   | } impl From < usize > for $ n {
2019-07-23T00:54:43.8076545Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:43.8076904Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:43.8077382Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-23T00:54:43.8077603Z    |
2019-07-23T00:54:43.8077603Z    |
2019-07-23T00:54:43.8077857Z 15 | /   index_struct! {
2019-07-23T00:54:43.8079324Z 16 | |       pub(crate) struct StackIndex {
2019-07-23T00:54:43.8080032Z 17 | |           value: usize,
2019-07-23T00:54:43.8080693Z 19 | |   }
2019-07-23T00:54:43.8081022Z    | |___- in this macro invocation
2019-07-23T00:54:43.8081199Z 
2019-07-23T00:54:43.8081199Z 
2019-07-23T00:54:43.8081539Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8081868Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-23T00:54:43.8082282Z    |
2019-07-23T00:54:43.8082642Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:43.8083490Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:43.8083860Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:43.8084271Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:43.8084560Z ...    |
2019-07-23T00:54:43.8084941Z 15 |   | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:43.8085332Z    |   |__________________________________________________________________^
2019-07-23T00:54:43.8085707Z 16 |  || replace_zero ( & mut self ) -> Self {
2019-07-23T00:54:43.8086145Z 17 |  || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:43.8086849Z    |  ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8087159Z ...    |
2019-07-23T00:54:43.8087685Z 23 |   | } impl From < usize > for $ n {
2019-07-23T00:54:43.8088748Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:43.8089213Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:43.8089839Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-23T00:54:43.8090085Z    |
2019-07-23T00:54:43.8090085Z    |
2019-07-23T00:54:43.8090527Z 15 | /   index_struct! {
2019-07-23T00:54:43.8090945Z 16 | |       pub(crate) struct StackIndex {
2019-07-23T00:54:43.8091276Z 17 | |           value: usize,
2019-07-23T00:54:43.8095687Z 19 | |   }
2019-07-23T00:54:43.8096699Z    | |___- in this macro invocation
2019-07-23T00:54:43.8096744Z 
2019-07-23T00:54:43.8096744Z 
2019-07-23T00:54:43.8097060Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8100492Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-23T00:54:43.8101056Z    |
2019-07-23T00:54:43.8101459Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:43.8101854Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:43.8102389Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:43.8102806Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:43.8103070Z ...    |
2019-07-23T00:54:43.8103466Z 17 |   | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:43.8104049Z    |  _|___________________________________________________________________^
2019-07-23T00:54:43.8104466Z 18 | | | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:43.8104957Z    | |_|___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8105242Z ...    |
2019-07-23T00:54:43.8105620Z 23 |   | } impl From < usize > for $ n {
2019-07-23T00:54:43.8106008Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:43.8106446Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:43.8107275Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-23T00:54:43.8107515Z    |
2019-07-23T00:54:43.8107515Z    |
2019-07-23T00:54:43.8107825Z 15 |  /  index_struct! {
2019-07-23T00:54:43.8108887Z 16 |  |      pub(crate) struct StackIndex {
2019-07-23T00:54:43.8109287Z 17 |  |          value: usize,
2019-07-23T00:54:43.8109607Z 18 |  |      }
2019-07-23T00:54:43.8109947Z 19 |  |  }
2019-07-23T00:54:43.8110276Z    |  |__- in this macro invocation
2019-07-23T00:54:43.8110406Z 
2019-07-23T00:54:43.8110756Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8111070Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-23T00:54:43.8111311Z    |
2019-07-23T00:54:43.8111948Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:43.8112332Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:43.8112681Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:43.8113310Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:43.8113582Z ...    |
2019-07-23T00:54:43.8113993Z 18 |   | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:43.8114395Z    |  _|_____________________________________________________________________________^
2019-07-23T00:54:43.8114925Z 19 | | | sub_one ( & self ) -> Self {
2019-07-23T00:54:43.8115339Z 20 | | | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:43.8115781Z    | |_|________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8116078Z ...    |
2019-07-23T00:54:43.8116406Z 23 |   | } impl From < usize > for $ n {
2019-07-23T00:54:43.8116797Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:43.8117197Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:43.8119099Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-23T00:54:43.8119475Z    |
2019-07-23T00:54:43.8119475Z    |
2019-07-23T00:54:43.8238889Z 15 |  /  index_struct! {
2019-07-23T00:54:43.8239365Z 16 |  |      pub(crate) struct StackIndex {
2019-07-23T00:54:43.8239710Z 17 |  |          value: usize,
2019-07-23T00:54:43.8240058Z 18 |  |      }
2019-07-23T00:54:43.8240610Z 19 |  |  }
2019-07-23T00:54:43.8240943Z    |  |__- in this macro invocation
2019-07-23T00:54:43.8241014Z 
2019-07-23T00:54:43.8241331Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8241635Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-23T00:54:43.8242071Z    |
2019-07-23T00:54:43.8242411Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:43.8242762Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:43.8243126Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:43.8243480Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:43.8243752Z ...    |
2019-07-23T00:54:43.8244095Z 20 |   | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:43.8244434Z    |  _|__________________________________________________________^
2019-07-23T00:54:43.8244797Z 21 | | | & self , n : usize ) -> Option < Self > {
2019-07-23T00:54:43.8245185Z 22 | | | usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-23T00:54:43.8245640Z    | |_|______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:43.8245966Z 23 |   | } impl From < usize > for $ n {
2019-07-23T00:54:43.8246328Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:43.8246697Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:43.8247360Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-23T00:54:43.8247791Z    |
2019-07-23T00:54:43.8247791Z    |
2019-07-23T00:54:43.8248082Z 15 | /   index_struct! {
2019-07-23T00:54:43.8248980Z 16 | |       pub(crate) struct StackIndex {
2019-07-23T00:54:43.8249311Z 17 | |           value: usize,
2019-07-23T00:54:43.8250124Z 19 | |   }
2019-07-23T00:54:43.8250447Z    | |___- in this macro invocation
2019-07-23T00:54:43.8250513Z 
2019-07-23T00:54:43.8250513Z 
2019-07-23T00:54:44.7729867Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7734035Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-23T00:54:44.7734250Z    |
2019-07-23T00:54:44.7734507Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7734801Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7735071Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7735363Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7735545Z ...   |
2019-07-23T00:54:44.7736279Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-23T00:54:44.7736600Z    |  |______________________________________________________________^
2019-07-23T00:54:44.7736845Z 14 | || & mut self ) -> Self {
2019-07-23T00:54:44.7737152Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:44.7737478Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7737691Z ...   |
2019-07-23T00:54:44.7737932Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7738199Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7739095Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7739916Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-23T00:54:44.7740348Z    |
2019-07-23T00:54:44.7740348Z    |
2019-07-23T00:54:44.7740688Z 34 | /  index_struct! {
2019-07-23T00:54:44.7741023Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-23T00:54:44.7741316Z 36 | |          value: usize,
2019-07-23T00:54:44.7742481Z 38 | |  }
2019-07-23T00:54:44.7742719Z    | |__- in this macro invocation
2019-07-23T00:54:44.7742760Z 
2019-07-23T00:54:44.7742760Z 
2019-07-23T00:54:44.7743007Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7743227Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-23T00:54:44.7743396Z    |
2019-07-23T00:54:44.7744018Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7744292Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7744571Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7744849Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7745033Z ...   |
2019-07-23T00:54:44.7745312Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:44.7745565Z    |  |__________________________________________________________________^
2019-07-23T00:54:44.7745832Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-23T00:54:44.7746127Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:44.7746446Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7746656Z ...   |
2019-07-23T00:54:44.7746895Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7747182Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7747483Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7747968Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-23T00:54:44.7748158Z    |
2019-07-23T00:54:44.7748158Z    |
2019-07-23T00:54:44.7749695Z 34 | /  index_struct! {
2019-07-23T00:54:44.7750117Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-23T00:54:44.7750414Z 36 | |          value: usize,
2019-07-23T00:54:44.7751150Z 38 | |  }
2019-07-23T00:54:44.7751447Z    | |__- in this macro invocation
2019-07-23T00:54:44.7751506Z 
2019-07-23T00:54:44.7751506Z 
2019-07-23T00:54:44.7752092Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7752311Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-23T00:54:44.7752680Z    |
2019-07-23T00:54:44.7753159Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7753480Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7753803Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7754279Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7754509Z ...   |
2019-07-23T00:54:44.7754811Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:44.7755100Z    |  |___________________________________________________________________^
2019-07-23T00:54:44.7755607Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:44.7756111Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7756334Z ...   |
2019-07-23T00:54:44.7756755Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7757055Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7757364Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7757887Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-23T00:54:44.7758087Z    |
2019-07-23T00:54:44.7758087Z    |
2019-07-23T00:54:44.7758870Z 34 | /  index_struct! {
2019-07-23T00:54:44.7759233Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-23T00:54:44.7759527Z 36 | |          value: usize,
2019-07-23T00:54:44.7760244Z 38 | |  }
2019-07-23T00:54:44.7760537Z    | |__- in this macro invocation
2019-07-23T00:54:44.7760594Z 
2019-07-23T00:54:44.7760594Z 
2019-07-23T00:54:44.7760875Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7761143Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-23T00:54:44.7761370Z    |
2019-07-23T00:54:44.7761711Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7762219Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7762569Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7762914Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7763165Z ...   |
2019-07-23T00:54:44.7764196Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:44.7764477Z    |  |_____________________________________________________________________________^
2019-07-23T00:54:44.7764760Z 19 | || sub_one ( & self ) -> Self {
2019-07-23T00:54:44.7765063Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:44.7765411Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7765621Z ...   |
2019-07-23T00:54:44.7765874Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7766180Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7766493Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7767008Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-23T00:54:44.7767229Z    |
2019-07-23T00:54:44.7767229Z    |
2019-07-23T00:54:44.7767684Z 34 | /  index_struct! {
2019-07-23T00:54:44.7767973Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-23T00:54:44.7768582Z 36 | |          value: usize,
2019-07-23T00:54:44.7769322Z 38 | |  }
2019-07-23T00:54:44.7769632Z    | |__- in this macro invocation
2019-07-23T00:54:44.7769679Z 
2019-07-23T00:54:44.7769679Z 
2019-07-23T00:54:44.7769953Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7770244Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-23T00:54:44.7770456Z    |
2019-07-23T00:54:44.7770795Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7771167Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7771510Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7772019Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7772243Z ...   |
2019-07-23T00:54:44.7772528Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:44.7772817Z    |  |__________________________________________________________^
2019-07-23T00:54:44.7773097Z 21 | || & self , n : usize ) -> Option < Self > {
2019-07-23T00:54:44.7773418Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-23T00:54:44.7773797Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7774221Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7774520Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7774834Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7775369Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-23T00:54:44.7775571Z    |
2019-07-23T00:54:44.7775571Z    |
2019-07-23T00:54:44.7775823Z 34 | /  index_struct! {
2019-07-23T00:54:44.7776072Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-23T00:54:44.7776309Z 36 | |          value: usize,
2019-07-23T00:54:44.7776859Z 38 | |  }
2019-07-23T00:54:44.7777270Z    | |__- in this macro invocation
2019-07-23T00:54:44.7777308Z 
2019-07-23T00:54:44.7777308Z 
2019-07-23T00:54:44.7777526Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7777739Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-23T00:54:44.7778100Z    |
2019-07-23T00:54:44.7778782Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7779167Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7779508Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7779868Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7780130Z ...   |
2019-07-23T00:54:44.7780476Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-23T00:54:44.7780800Z    |  |______________________________________________________________^
2019-07-23T00:54:44.7781133Z 14 | || & mut self ) -> Self {
2019-07-23T00:54:44.7781498Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:44.7782121Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7782334Z ...   |
2019-07-23T00:54:44.7782610Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7782903Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7783245Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7783770Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-23T00:54:44.7784161Z    |
2019-07-23T00:54:44.7784161Z    |
2019-07-23T00:54:44.7784392Z 81 | /  index_struct! {
2019-07-23T00:54:44.7784652Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-23T00:54:44.7784911Z 83 | |          value: usize,
2019-07-23T00:54:44.7785599Z 85 | |  }
2019-07-23T00:54:44.7785855Z    | |__- in this macro invocation
2019-07-23T00:54:44.7785885Z 
2019-07-23T00:54:44.7785885Z 
2019-07-23T00:54:44.7786102Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7786334Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-23T00:54:44.7786500Z    |
2019-07-23T00:54:44.7786767Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7787065Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7787334Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7787636Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7787865Z ...   |
2019-07-23T00:54:44.7788139Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:44.7789113Z    |  |__________________________________________________________________^
2019-07-23T00:54:44.7789483Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-23T00:54:44.7789877Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:44.7790291Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7790539Z ...   |
2019-07-23T00:54:44.7790863Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7791209Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7791616Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7792633Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-23T00:54:44.7792821Z    |
2019-07-23T00:54:44.7792821Z    |
2019-07-23T00:54:44.7793225Z 81 | /  index_struct! {
2019-07-23T00:54:44.7793514Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-23T00:54:44.7793762Z 83 | |          value: usize,
2019-07-23T00:54:44.7794846Z 85 | |  }
2019-07-23T00:54:44.7795074Z    | |__- in this macro invocation
2019-07-23T00:54:44.7795104Z 
2019-07-23T00:54:44.7795104Z 
2019-07-23T00:54:44.7795333Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7795539Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-23T00:54:44.7795698Z    |
2019-07-23T00:54:44.7795978Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7796260Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7796533Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7796810Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7796995Z ...   |
2019-07-23T00:54:44.7797276Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:44.7797681Z    |  |___________________________________________________________________^
2019-07-23T00:54:44.7797956Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:44.7798467Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7799031Z ...   |
2019-07-23T00:54:44.7799367Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7799712Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7800119Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7800756Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-23T00:54:44.7801004Z    |
2019-07-23T00:54:44.7801004Z    |
2019-07-23T00:54:44.7801285Z 81 | /  index_struct! {
2019-07-23T00:54:44.7801624Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-23T00:54:44.7801921Z 83 | |          value: usize,
2019-07-23T00:54:44.7802649Z 85 | |  }
2019-07-23T00:54:44.7802882Z    | |__- in this macro invocation
2019-07-23T00:54:44.7802913Z 
2019-07-23T00:54:44.7802913Z 
2019-07-23T00:54:44.7803329Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7803550Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-23T00:54:44.7803719Z    |
2019-07-23T00:54:44.7804332Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7804607Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7804869Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7805165Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7805351Z ...   |
2019-07-23T00:54:44.7805633Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:44.7805896Z    |  |_____________________________________________________________________________^
2019-07-23T00:54:44.7806151Z 19 | || sub_one ( & self ) -> Self {
2019-07-23T00:54:44.7806604Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:44.7806896Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7807095Z ...   |
2019-07-23T00:54:44.7807317Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7824505Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7824869Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7825508Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-23T00:54:44.7825683Z    |
2019-07-23T00:54:44.7825683Z    |
2019-07-23T00:54:44.7825925Z 81 | /  index_struct! {
2019-07-23T00:54:44.7826260Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-23T00:54:44.7826689Z 83 | |          value: usize,
2019-07-23T00:54:44.7827253Z 85 | |  }
2019-07-23T00:54:44.7827481Z    | |__- in this macro invocation
2019-07-23T00:54:44.7827530Z 
2019-07-23T00:54:44.7827530Z 
2019-07-23T00:54:44.7827743Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7827950Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-23T00:54:44.7828130Z    |
2019-07-23T00:54:44.7828835Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7829214Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7829576Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7829930Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7830191Z ...   |
2019-07-23T00:54:44.7830537Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:44.7830856Z    |  |__________________________________________________________^
2019-07-23T00:54:44.7831218Z 21 | || & self , n : usize ) -> Option < Self > {
2019-07-23T00:54:44.7831596Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-23T00:54:44.7832350Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7832617Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7832897Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7833235Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7833810Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-23T00:54:44.7834347Z    |
2019-07-23T00:54:44.7834347Z    |
2019-07-23T00:54:44.7834564Z 81 | /  index_struct! {
2019-07-23T00:54:44.7834830Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-23T00:54:44.7835056Z 83 | |          value: usize,
2019-07-23T00:54:44.7835763Z 85 | |  }
2019-07-23T00:54:44.7835996Z    | |__- in this macro invocation
2019-07-23T00:54:44.7836288Z 
2019-07-23T00:54:44.7836288Z 
2019-07-23T00:54:44.7836744Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7837158Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-23T00:54:44.7837556Z    |
2019-07-23T00:54:44.7837853Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7838706Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7839119Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7839648Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7839935Z ...   |
2019-07-23T00:54:44.7840467Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-23T00:54:44.7840833Z    |  |______________________________________________________________^
2019-07-23T00:54:44.7841359Z 14 | || & mut self ) -> Self {
2019-07-23T00:54:44.7841746Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:44.7842595Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7842821Z ...   |
2019-07-23T00:54:44.7843073Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7843375Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7858751Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7859632Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-23T00:54:44.7859846Z    |
2019-07-23T00:54:44.7859846Z    |
2019-07-23T00:54:44.7860151Z 91 | /  index_struct! {
2019-07-23T00:54:44.7860444Z 92 | |      struct StackIndex {
2019-07-23T00:54:44.7860735Z 93 | |          value: usize,
2019-07-23T00:54:44.7861422Z 95 | |  }
2019-07-23T00:54:44.7861739Z    | |__- in this macro invocation
2019-07-23T00:54:44.7861781Z 
2019-07-23T00:54:44.7861781Z 
2019-07-23T00:54:44.7862278Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7862538Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-23T00:54:44.7862765Z    |
2019-07-23T00:54:44.7863093Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7863465Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7863945Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7864598Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7865061Z ...   |
2019-07-23T00:54:44.7865504Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-23T00:54:44.7865774Z    |  |__________________________________________________________________^
2019-07-23T00:54:44.7866072Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-23T00:54:44.7866378Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:44.7866734Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7866938Z ...   |
2019-07-23T00:54:44.7867203Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7867499Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7867891Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7868892Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-23T00:54:44.7869135Z    |
2019-07-23T00:54:44.7869135Z    |
2019-07-23T00:54:44.7869416Z 91 | /  index_struct! {
2019-07-23T00:54:44.7869711Z 92 | |      struct StackIndex {
2019-07-23T00:54:44.7870156Z 93 | |          value: usize,
2019-07-23T00:54:44.7870715Z 95 | |  }
2019-07-23T00:54:44.7871026Z    | |__- in this macro invocation
2019-07-23T00:54:44.7871064Z 
2019-07-23T00:54:44.7871064Z 
2019-07-23T00:54:44.7871333Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7871624Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-23T00:54:44.7871988Z    |
2019-07-23T00:54:44.7872459Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7872786Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7873068Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7873383Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7873587Z ...   |
2019-07-23T00:54:44.7874033Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-23T00:54:44.7874321Z    |  |___________________________________________________________________^
2019-07-23T00:54:44.7874628Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:44.7874991Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7875200Z ...   |
2019-07-23T00:54:44.7875449Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7875751Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7876067Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-23T00:54:44.7876629Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-23T00:54:44.7876877Z    |
2019-07-23T00:54:44.7876877Z    |
2019-07-23T00:54:44.7877128Z 91 | /  index_struct! {
2019-07-23T00:54:44.7877389Z 92 | |      struct StackIndex {
2019-07-23T00:54:44.7877712Z 93 | |          value: usize,
2019-07-23T00:54:44.7878305Z 95 | |  }
2019-07-23T00:54:44.7878978Z    | |__- in this macro invocation
2019-07-23T00:54:44.7879017Z 
2019-07-23T00:54:44.7879017Z 
2019-07-23T00:54:44.7879318Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7879616Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-23T00:54:44.7879829Z    |
2019-07-23T00:54:44.7880169Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-23T00:54:44.7880544Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-23T00:54:44.7880885Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-23T00:54:44.7881260Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-23T00:54:44.7881507Z ...   |
2019-07-23T00:54:44.7882075Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-23T00:54:44.7882388Z    |  |_____________________________________________________________________________^
2019-07-23T00:54:44.7882679Z 19 | || sub_one ( & self ) -> Self {
2019-07-23T00:54:44.7882997Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-23T00:54:44.7883366Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-23T00:54:44.7883580Z ...   |
2019-07-23T00:54:44.7884024Z 23 |  | } impl From < usize > for $ n {
2019-07-23T00:54:44.7884314Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-23T00:54:44.7884658Z    |  |________________________________________________________________- in this expansion of `index_struct!`

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@CAD97
Copy link
Contributor Author

left a comment

Here's some misc. notes.

///
/// * `a == a.successor().unwrap().predecessor().unwrap()`
#[inline]
fn successor(&self) -> Self { self.forward(1).expect("overflow in `Step::successor`") }

This comment has been minimized.

Copy link
@CAD97

CAD97 Jul 23, 2019

Author Contributor

I'm not certain which way we'd want these to be defaulted. In this mode, where successor/predecessor have the option to panic or wrap, this is the only direction this makes sense. We could also consider making these just sugar around forward(1)/backward(1), in which case the default could go either way.

///
/// * `a == a.successor().unwrap().predecessor().unwrap()`
#[inline]
fn successor(&self) -> Self { self.forward(1).expect("overflow in `Step::successor`") }

This comment has been minimized.

Copy link
@CAD97

CAD97 Jul 23, 2019

Author Contributor

An additional possible optimization is to make successor/predecessor unsafe, and disallow calling them when it would overflow/underflow. This would allow an implementation on a type with restricted validity (e.g. char) to avoid checking the outside bounds at all.

This comment has been minimized.

Copy link
@scottmcm

scottmcm Aug 17, 2019

Member

I'd love to see some exploration of this, as getting Range to use nuw/nsw now that we have unchecked_add and friends might help with some of the problematic optimization cases.

My intuition, though, is that it should be a separate

unsafe fn successor_unchecked(&self) -> Self { self.successor() }

so that safe code can consume the trait, even if it can't implement it.

This comment has been minimized.

Copy link
@CAD97

CAD97 Aug 17, 2019

Author Contributor

Safe code can always use checked advancing (forward(1)).

I'll make them unchecked and suggest safe code to use the checked stepped version. That gives a real reason to having the shortcut ones for single steps.

This comment has been minimized.

Copy link
@CAD97

CAD97 Aug 17, 2019

Author Contributor

Actually: what does RangeFrom do in this world?

for i in 0u8.. { dbg!(i) } currently panics in debug mode and wraps infinitely in release mode. If we just make successor use unchecked_add, then it's UB in both. So I guess RangeFrom should consider that it can't go beyond the end of it's value's domain and use self.start.forward(1).expect("overflow in `Range::next`") rather than self.start.successor()?

/// Returns the *successor* of `self`.
///
/// If this would overflow the range of values supported by `Self`,
/// this method is allowed to panic or overflow. Suggested behavior is

This comment has been minimized.

Copy link
@CAD97

CAD97 Jul 23, 2019

Author Contributor

Note to self: these should probably say "wrap" rather than "overflow"/"underflow".

Show resolved Hide resolved src/libcore/iter/range.rs Outdated
assert_eq!((10_u128).forward(70_000_usize), Some(70_010_u128));
assert_eq!((10_i128).forward(70_030_usize), Some(70_040_i128));
assert_eq!(
(0xffff_ffff_ffff_ffff__ffff_ffff_ffff_ff00_u128).forward(0xff_usize),

This comment has been minimized.

Copy link
@CAD97

CAD97 Jul 23, 2019

Author Contributor

This test is different from @SimonSapin's.

assert_eq!(Step::steps_between(&20_u128, &200_u128), Some(180_usize));
assert_eq!(Step::steps_between(&-20_i128, &80_i128), Some(100_usize));
if cfg!(target_pointer_width = "64") {
assert_eq!(Step::steps_between(&10_u128, &0x1_0000_0000_0000_0009_u128), Some(usize::MAX));

This comment has been minimized.

Copy link
@CAD97

CAD97 Jul 23, 2019

Author Contributor

This test is different from @SimonSapin's.

@CAD97 CAD97 force-pushed the CAD97:master branch from a3dc7a7 to dcd6c51 Jul 24, 2019

@CAD97

This comment has been minimized.

Copy link
Contributor Author

commented Jul 24, 2019

This is effectively blocked on a chalk upgrade, as the current used version of chalk implements Step but chalk master doesn't. I managed to get chalk building by checking out master as a submodule and pointing at that (with multiple modifications to get it to pass x.py test's stricter requirements), but elsewhere in the compiler (i.e. librustc_traits/chalk_context) use parts of chalk that have undergone changes between 0.9 and master, and I'm unequipped to make that update (and it definitely shouldn't be part of this PR anyway).

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 24, 2019

The job mingw-check of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-24T01:35:56.9796823Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-24T01:35:56.9983665Z ##[command]git config gc.auto 0
2019-07-24T01:35:57.0080290Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-24T01:35:57.0136375Z ##[command]git config --get-all http.proxy
2019-07-24T01:35:57.0353660Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62886/merge:refs/remotes/pull/62886/merge
---
2019-07-24T01:36:32.7715422Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-24T01:36:32.7715455Z 
2019-07-24T01:36:32.7715660Z   git checkout -b <new-branch-name>
2019-07-24T01:36:32.7715712Z 
2019-07-24T01:36:32.7715760Z HEAD is now at abd745e64 Merge dcd6c51cf7338ba86f1a28a856c6145653098890 into a7f28678bbf4e16893bb6a718e427504167a9494
2019-07-24T01:36:32.7871028Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-24T01:36:32.7874417Z ==============================================================================
2019-07-24T01:36:32.7874478Z Task         : Bash
2019-07-24T01:36:32.7874543Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-24T01:45:11.5519366Z     Checking lock_api v0.1.3
2019-07-24T01:45:12.0899269Z     Checking polonius-engine v0.9.0
2019-07-24T01:45:12.7438065Z    Compiling rustc_version v0.2.3
2019-07-24T01:45:14.5785687Z     Checking chalk-engine v0.9.0
2019-07-24T01:45:14.6733228Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6733638Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-24T01:45:14.6733892Z    |
2019-07-24T01:45:14.6734761Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.6735575Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.6736123Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.6736570Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.6736821Z ...    |
2019-07-24T01:45:14.6737195Z 13 |   | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-24T01:45:14.6737692Z    |   |______________________________________________________________^
2019-07-24T01:45:14.6738747Z 14 |  || & mut self ) -> Self {
2019-07-24T01:45:14.6739281Z 15 |  || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.6739931Z    |  ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6740225Z ...    |
2019-07-24T01:45:14.6740545Z 23 |   | } impl From < usize > for $ n {
2019-07-24T01:45:14.6740923Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.6741321Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.6741887Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-24T01:45:14.6742106Z    |
2019-07-24T01:45:14.6742106Z    |
2019-07-24T01:45:14.6742412Z 15 | /   index_struct! {
2019-07-24T01:45:14.6742741Z 16 | |       pub(crate) struct StackIndex {
2019-07-24T01:45:14.6743049Z 17 | |           value: usize,
2019-07-24T01:45:14.6743641Z 19 | |   }
2019-07-24T01:45:14.6743938Z    | |___- in this macro invocation
2019-07-24T01:45:14.6743998Z 
2019-07-24T01:45:14.6743998Z 
2019-07-24T01:45:14.6757702Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6760885Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-24T01:45:14.6763846Z    |
2019-07-24T01:45:14.6769432Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.6795776Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.6800828Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.6801482Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.6801921Z ...    |
2019-07-24T01:45:14.6802665Z 15 |   | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.6803191Z    |   |__________________________________________________________________^
2019-07-24T01:45:14.6804469Z 16 |  || replace_zero ( & mut self ) -> Self {
2019-07-24T01:45:14.6805302Z 17 |  || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.6806212Z    |  ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6806655Z ...    |
2019-07-24T01:45:14.6807159Z 23 |   | } impl From < usize > for $ n {
2019-07-24T01:45:14.6807685Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.6808413Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.6809416Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-24T01:45:14.6809955Z    |
2019-07-24T01:45:14.6809955Z    |
2019-07-24T01:45:14.6810624Z 15 | /   index_struct! {
2019-07-24T01:45:14.6811090Z 16 | |       pub(crate) struct StackIndex {
2019-07-24T01:45:14.6811537Z 17 | |           value: usize,
2019-07-24T01:45:14.6812444Z 19 | |   }
2019-07-24T01:45:14.6812908Z    | |___- in this macro invocation
2019-07-24T01:45:14.6813069Z 
2019-07-24T01:45:14.6813069Z 
2019-07-24T01:45:14.6813479Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6813939Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-24T01:45:14.6814315Z    |
2019-07-24T01:45:14.6836864Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.6837444Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.6837874Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.6863437Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.6872982Z ...    |
2019-07-24T01:45:14.6879369Z 17 |   | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.6889309Z    |  _|___________________________________________________________________^
2019-07-24T01:45:14.6895618Z 18 | | | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.6906371Z    | |_|___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6922920Z ...    |
2019-07-24T01:45:14.6955464Z 23 |   | } impl From < usize > for $ n {
2019-07-24T01:45:14.6955954Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.6956404Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.6956997Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-24T01:45:14.6957221Z    |
2019-07-24T01:45:14.6957221Z    |
2019-07-24T01:45:14.6957562Z 15 |  /  index_struct! {
2019-07-24T01:45:14.6957888Z 16 |  |      pub(crate) struct StackIndex {
2019-07-24T01:45:14.6958223Z 17 |  |          value: usize,
2019-07-24T01:45:14.6958538Z 18 |  |      }
2019-07-24T01:45:14.6958833Z 19 |  |  }
2019-07-24T01:45:14.6959172Z    |  |__- in this macro invocation
2019-07-24T01:45:14.6959214Z 
2019-07-24T01:45:14.6960538Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6960941Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-24T01:45:14.6961171Z    |
2019-07-24T01:45:14.6961821Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.6962469Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.6962879Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.6963246Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.6963655Z ...    |
2019-07-24T01:45:14.6964019Z 18 |   | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.6964667Z    |  _|_____________________________________________________________________________^
2019-07-24T01:45:14.6965375Z 19 | | | sub_one ( & self ) -> Self {
2019-07-24T01:45:14.6965766Z 20 | | | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.6966208Z    | |_|________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.6966474Z ...    |
2019-07-24T01:45:14.6966814Z 23 |   | } impl From < usize > for $ n {
2019-07-24T01:45:14.6967175Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.6967563Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.6968350Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-24T01:45:14.6968592Z    |
2019-07-24T01:45:14.6968592Z    |
2019-07-24T01:45:14.6969374Z 15 |  /  index_struct! {
2019-07-24T01:45:14.6969862Z 16 |  |      pub(crate) struct StackIndex {
2019-07-24T01:45:14.6970425Z 17 |  |          value: usize,
2019-07-24T01:45:14.6970721Z 18 |  |      }
2019-07-24T01:45:14.6971220Z 19 |  |  }
2019-07-24T01:45:14.6971541Z    |  |__- in this macro invocation
2019-07-24T01:45:14.7083375Z 
2019-07-24T01:45:14.7084221Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7085088Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-24T01:45:14.7085350Z    |
2019-07-24T01:45:14.7085944Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7086385Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7086756Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7087258Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7087536Z ...    |
2019-07-24T01:45:14.7087896Z 20 |   | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.7088261Z    |  _|__________________________________________________________^
2019-07-24T01:45:14.7088642Z 21 | | | & self , n : usize ) -> Option < Self > {
2019-07-24T01:45:14.7089032Z 22 | | | usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-24T01:45:14.7089657Z    | |_|______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7089988Z 23 |   | } impl From < usize > for $ n {
2019-07-24T01:45:14.7090359Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7090754Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7091316Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-24T01:45:14.7091533Z    |
2019-07-24T01:45:14.7091533Z    |
2019-07-24T01:45:14.7091812Z 15 | /   index_struct! {
2019-07-24T01:45:14.7092137Z 16 | |       pub(crate) struct StackIndex {
2019-07-24T01:45:14.7092438Z 17 | |           value: usize,
2019-07-24T01:45:14.7093015Z 19 | |   }
2019-07-24T01:45:14.7093482Z    | |___- in this macro invocation
2019-07-24T01:45:14.7093545Z 
2019-07-24T01:45:14.7093545Z 
2019-07-24T01:45:14.7093835Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7094115Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-24T01:45:14.7094349Z    |
2019-07-24T01:45:14.7095043Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7095461Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7095829Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7096301Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7096555Z ...   |
2019-07-24T01:45:14.7096938Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-24T01:45:14.7097285Z    |  |______________________________________________________________^
2019-07-24T01:45:14.7097631Z 14 | || & mut self ) -> Self {
2019-07-24T01:45:14.7098004Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.7098598Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7099287Z ...   |
2019-07-24T01:45:14.7099603Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7099976Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7100352Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7101492Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-24T01:45:14.7101715Z    |
2019-07-24T01:45:14.7101715Z    |
2019-07-24T01:45:14.7102035Z 34 | /  index_struct! {
2019-07-24T01:45:14.7102362Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-24T01:45:14.7102689Z 36 | |          value: usize,
2019-07-24T01:45:14.7103263Z 38 | |  }
2019-07-24T01:45:14.7103594Z    | |__- in this macro invocation
2019-07-24T01:45:14.7103634Z 
2019-07-24T01:45:14.7103634Z 
2019-07-24T01:45:14.7103922Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7104201Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-24T01:45:14.7104663Z    |
2019-07-24T01:45:14.7105135Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7105570Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7105916Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7106392Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7106668Z ...   |
2019-07-24T01:45:14.7107030Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.7107369Z    |  |__________________________________________________________________^
2019-07-24T01:45:14.7107734Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-24T01:45:14.7108119Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.7108585Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7108847Z ...   |
2019-07-24T01:45:14.7109189Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7109556Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7110041Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7110607Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-24T01:45:14.7110855Z    |
2019-07-24T01:45:14.7110855Z    |
2019-07-24T01:45:14.7111146Z 34 | /  index_struct! {
2019-07-24T01:45:14.7111469Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-24T01:45:14.7111799Z 36 | |          value: usize,
2019-07-24T01:45:14.7112385Z 38 | |  }
2019-07-24T01:45:14.7112697Z    | |__- in this macro invocation
2019-07-24T01:45:14.7112736Z 
2019-07-24T01:45:14.7112736Z 
2019-07-24T01:45:14.7113013Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7113313Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-24T01:45:14.7113534Z    |
2019-07-24T01:45:14.7114952Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7115444Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7115786Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7116295Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7116553Z ...   |
2019-07-24T01:45:14.7116919Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.7117282Z    |  |___________________________________________________________________^
2019-07-24T01:45:14.7117663Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.7118508Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7118782Z ...   |
2019-07-24T01:45:14.7119102Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7119492Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7119884Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7120640Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-24T01:45:14.7120878Z    |
2019-07-24T01:45:14.7120878Z    |
2019-07-24T01:45:14.7121158Z 34 | /  index_struct! {
2019-07-24T01:45:14.7121464Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-24T01:45:14.7121788Z 36 | |          value: usize,
2019-07-24T01:45:14.7122382Z 38 | |  }
2019-07-24T01:45:14.7122694Z    | |__- in this macro invocation
2019-07-24T01:45:14.7122740Z 
2019-07-24T01:45:14.7122740Z 
2019-07-24T01:45:14.7123008Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7123298Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-24T01:45:14.7123508Z    |
2019-07-24T01:45:14.7123944Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7124367Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7125146Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7125669Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7125927Z ...   |
2019-07-24T01:45:14.7126286Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.7126666Z    |  |_____________________________________________________________________________^
2019-07-24T01:45:14.7127002Z 19 | || sub_one ( & self ) -> Self {
2019-07-24T01:45:14.7127373Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.7127824Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7128082Z ...   |
2019-07-24T01:45:14.7128574Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7128925Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7129325Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7129881Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-24T01:45:14.7130100Z    |
2019-07-24T01:45:14.7130100Z    |
2019-07-24T01:45:14.7130381Z 34 | /  index_struct! {
2019-07-24T01:45:14.7130712Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-24T01:45:14.7131013Z 36 | |          value: usize,
2019-07-24T01:45:14.7131581Z 38 | |  }
2019-07-24T01:45:14.7133202Z    | |__- in this macro invocation
2019-07-24T01:45:14.7133254Z 
2019-07-24T01:45:14.7133254Z 
2019-07-24T01:45:14.7133890Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7134682Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-24T01:45:14.7134953Z    |
2019-07-24T01:45:14.7135466Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7135894Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7136233Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7136782Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7137033Z ...   |
2019-07-24T01:45:14.7137418Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.7137760Z    |  |__________________________________________________________^
2019-07-24T01:45:14.7138298Z 21 | || & self , n : usize ) -> Option < Self > {
2019-07-24T01:45:14.7138672Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-24T01:45:14.7139097Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7139439Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7139771Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7140161Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7140679Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-24T01:45:14.7140911Z    |
2019-07-24T01:45:14.7140911Z    |
2019-07-24T01:45:14.7141183Z 34 | /  index_struct! {
2019-07-24T01:45:14.7141483Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-24T01:45:14.7141793Z 36 | |          value: usize,
2019-07-24T01:45:14.7142526Z 38 | |  }
2019-07-24T01:45:14.7142833Z    | |__- in this macro invocation
2019-07-24T01:45:14.7142872Z 
2019-07-24T01:45:14.7142872Z 
2019-07-24T01:45:14.7143143Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7143436Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-24T01:45:14.7143647Z    |
2019-07-24T01:45:14.7144077Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7144474Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7145221Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7145751Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7146005Z ...   |
2019-07-24T01:45:14.7146373Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-24T01:45:14.7146737Z    |  |______________________________________________________________^
2019-07-24T01:45:14.7147783Z 14 | || & mut self ) -> Self {
2019-07-24T01:45:14.7149338Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.7149804Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7150077Z ...   |
2019-07-24T01:45:14.7150995Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7153025Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7234398Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7235335Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-24T01:45:14.7235563Z    |
2019-07-24T01:45:14.7235563Z    |
2019-07-24T01:45:14.7235858Z 81 | /  index_struct! {
2019-07-24T01:45:14.7236232Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-24T01:45:14.7236544Z 83 | |          value: usize,
2019-07-24T01:45:14.7237150Z 85 | |  }
2019-07-24T01:45:14.7237462Z    | |__- in this macro invocation
2019-07-24T01:45:14.7237506Z 
2019-07-24T01:45:14.7237506Z 
2019-07-24T01:45:14.7237963Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7238223Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-24T01:45:14.7238427Z    |
2019-07-24T01:45:14.7239330Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7239739Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7240081Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7240549Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7240787Z ...   |
2019-07-24T01:45:14.7241149Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.7241470Z    |  |__________________________________________________________________^
2019-07-24T01:45:14.7241803Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-24T01:45:14.7242174Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.7242752Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7243030Z ...   |
2019-07-24T01:45:14.7243349Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7243726Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7244101Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7245093Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-24T01:45:14.7245324Z    |
2019-07-24T01:45:14.7245324Z    |
2019-07-24T01:45:14.7245644Z 81 | /  index_struct! {
2019-07-24T01:45:14.7246052Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-24T01:45:14.7246383Z 83 | |          value: usize,
2019-07-24T01:45:14.7246972Z 85 | |  }
2019-07-24T01:45:14.7247291Z    | |__- in this macro invocation
2019-07-24T01:45:14.7247331Z 
2019-07-24T01:45:14.7247331Z 
2019-07-24T01:45:14.7247617Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7247897Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-24T01:45:14.7248400Z    |
2019-07-24T01:45:14.7248780Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7249158Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7249596Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7249946Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7250215Z ...   |
2019-07-24T01:45:14.7250925Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.7251471Z    |  |___________________________________________________________________^
2019-07-24T01:45:14.7251859Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.7252307Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7252589Z ...   |
2019-07-24T01:45:14.7252917Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7253302Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7253694Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7254565Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-24T01:45:14.7254823Z    |
2019-07-24T01:45:14.7254823Z    |
2019-07-24T01:45:14.7255144Z 81 | /  index_struct! {
2019-07-24T01:45:14.7255488Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-24T01:45:14.7255798Z 83 | |          value: usize,
2019-07-24T01:45:14.7256396Z 85 | |  }
2019-07-24T01:45:14.7256722Z    | |__- in this macro invocation
2019-07-24T01:45:14.7256763Z 
2019-07-24T01:45:14.7256763Z 
2019-07-24T01:45:14.7257047Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7257324Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-24T01:45:14.7257567Z    |
2019-07-24T01:45:14.7258028Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7258443Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7258811Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7259288Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7259568Z ...   |
2019-07-24T01:45:14.7259940Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.7260470Z    |  |_____________________________________________________________________________^
2019-07-24T01:45:14.7260818Z 19 | || sub_one ( & self ) -> Self {
2019-07-24T01:45:14.7261177Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.7261610Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7261866Z ...   |
2019-07-24T01:45:14.7262469Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7262838Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7263946Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7264560Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-24T01:45:14.7265025Z    |
2019-07-24T01:45:14.7265025Z    |
2019-07-24T01:45:14.7265321Z 81 | /  index_struct! {
2019-07-24T01:45:14.7265664Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-24T01:45:14.7265998Z 83 | |          value: usize,
2019-07-24T01:45:14.7266584Z 85 | |  }
2019-07-24T01:45:14.7266905Z    | |__- in this macro invocation
2019-07-24T01:45:14.7266946Z 
2019-07-24T01:45:14.7266946Z 
2019-07-24T01:45:14.7268022Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7268347Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-24T01:45:14.7268714Z    |
2019-07-24T01:45:14.7269118Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7269517Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7270055Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7270450Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7270710Z ...   |
2019-07-24T01:45:14.7271074Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.7271760Z    |  |__________________________________________________________^
2019-07-24T01:45:14.7272258Z 21 | || & self , n : usize ) -> Option < Self > {
2019-07-24T01:45:14.7272657Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-24T01:45:14.7273089Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7273981Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7274736Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7275537Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7276131Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-24T01:45:14.7276374Z    |
2019-07-24T01:45:14.7276374Z    |
2019-07-24T01:45:14.7276675Z 81 | /  index_struct! {
2019-07-24T01:45:14.7277019Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-24T01:45:14.7277345Z 83 | |          value: usize,
2019-07-24T01:45:14.7277923Z 85 | |  }
2019-07-24T01:45:14.7278260Z    | |__- in this macro invocation
2019-07-24T01:45:14.7278302Z 
2019-07-24T01:45:14.7278302Z 
2019-07-24T01:45:14.7278584Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7278882Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-24T01:45:14.7279224Z    |
2019-07-24T01:45:14.7279622Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7280015Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7280471Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7280836Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7281115Z ...   |
2019-07-24T01:45:14.7281482Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-24T01:45:14.7281842Z    |  |______________________________________________________________^
2019-07-24T01:45:14.7282174Z 14 | || & mut self ) -> Self {
2019-07-24T01:45:14.7282557Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.7283008Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7283275Z ...   |
2019-07-24T01:45:14.7283621Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7285025Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7285470Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7286042Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-24T01:45:14.7286290Z    |
2019-07-24T01:45:14.7286290Z    |
2019-07-24T01:45:14.7286587Z 91 | /  index_struct! {
2019-07-24T01:45:14.7287220Z 93 | |          value: usize,
2019-07-24T01:45:14.7287507Z 94 | |      }
2019-07-24T01:45:14.7287822Z 95 | |  }
2019-07-24T01:45:14.7288130Z    | |__- in this macro invocation
2019-07-24T01:45:14.7288130Z    | |__- in this macro invocation
2019-07-24T01:45:14.7288171Z 
2019-07-24T01:45:14.7288452Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7288752Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-24T01:45:14.7289103Z    |
2019-07-24T01:45:14.7289524Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7289902Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7290704Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7291097Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7291349Z ...   |
2019-07-24T01:45:14.7291706Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-24T01:45:14.7292076Z    |  |__________________________________________________________________^
2019-07-24T01:45:14.7292417Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-24T01:45:14.7292831Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.7293267Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7293553Z ...   |
2019-07-24T01:45:14.7293879Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7294241Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7294881Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7295483Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-24T01:45:14.7295705Z    |
2019-07-24T01:45:14.7295705Z    |
2019-07-24T01:45:14.7296007Z 91 | /  index_struct! {
2019-07-24T01:45:14.7296640Z 93 | |          value: usize,
2019-07-24T01:45:14.7296943Z 94 | |      }
2019-07-24T01:45:14.7297244Z 95 | |  }
2019-07-24T01:45:14.7297541Z    | |__- in this macro invocation
2019-07-24T01:45:14.7297541Z    | |__- in this macro invocation
2019-07-24T01:45:14.7297579Z 
2019-07-24T01:45:14.7297885Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7298256Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-24T01:45:14.7298518Z    |
2019-07-24T01:45:14.7298893Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7299260Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7299724Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7300095Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7300344Z ...   |
2019-07-24T01:45:14.7300737Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-24T01:45:14.7302272Z    |  |___________________________________________________________________^
2019-07-24T01:45:14.7302753Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.7303214Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7303475Z ...   |
2019-07-24T01:45:14.7303830Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7304197Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7304815Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-24T01:45:14.7305526Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-24T01:45:14.7305753Z    |
2019-07-24T01:45:14.7305753Z    |
2019-07-24T01:45:14.7306043Z 91 | /  index_struct! {
2019-07-24T01:45:14.7306689Z 93 | |          value: usize,
2019-07-24T01:45:14.7306976Z 94 | |      }
2019-07-24T01:45:14.7307285Z 95 | |  }
2019-07-24T01:45:14.7307593Z    | |__- in this macro invocation
2019-07-24T01:45:14.7307593Z    | |__- in this macro invocation
2019-07-24T01:45:14.7307634Z 
2019-07-24T01:45:14.7307937Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7308439Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-24T01:45:14.7308651Z    |
2019-07-24T01:45:14.7309161Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-24T01:45:14.7309744Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-24T01:45:14.7310103Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-24T01:45:14.7310591Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-24T01:45:14.7310841Z ...   |
2019-07-24T01:45:14.7311228Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-24T01:45:14.7311587Z    |  |_____________________________________________________________________________^
2019-07-24T01:45:14.7311920Z 19 | || sub_one ( & self ) -> Self {
2019-07-24T01:45:14.7312333Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-24T01:45:14.7312748Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-24T01:45:14.7313030Z ...   |
2019-07-24T01:45:14.7313355Z 23 |  | } impl From < usize > for $ n {
2019-07-24T01:45:14.7313737Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-24T01:45:14.7355748Z    |  |________________________________________________________________- in this expansion of `index_struct!`

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors

This comment has been minimized.

Copy link
Contributor

commented Jul 27, 2019

☔️ The latest upstream changes (presumably #63029) made this pull request unmergeable. Please resolve the merge conflicts.

@CAD97 CAD97 force-pushed the CAD97:master branch from dcd6c51 to 566431f Jul 29, 2019

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Jul 29, 2019

The job mingw-check of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-07-29T16:27:47.8703081Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-07-29T16:27:47.8894330Z ##[command]git config gc.auto 0
2019-07-29T16:27:47.8972041Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-07-29T16:27:47.9032554Z ##[command]git config --get-all http.proxy
2019-07-29T16:27:47.9185028Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62886/merge:refs/remotes/pull/62886/merge
---
2019-07-29T16:28:24.2220083Z do so (now or later) by using -b with the checkout command again. Example:
2019-07-29T16:28:24.2220286Z 
2019-07-29T16:28:24.2220723Z   git checkout -b <new-branch-name>
2019-07-29T16:28:24.2221236Z 
2019-07-29T16:28:24.2221431Z HEAD is now at b0de99b5b Merge 566431f9c7bf69858dafb5413a0c7efa8a73eb2f into 04b88a9eba8abbac87eddcb2998beea09589c2c9
2019-07-29T16:28:24.2377019Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-07-29T16:28:24.2379846Z ==============================================================================
2019-07-29T16:28:24.2379903Z Task         : Bash
2019-07-29T16:28:24.2380009Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-07-29T16:34:16.9635657Z     Checking lock_api v0.1.3
2019-07-29T16:34:17.2728717Z    Compiling rustc_version v0.2.3
2019-07-29T16:34:18.6722337Z     Checking polonius-engine v0.9.0
2019-07-29T16:34:19.4265467Z     Checking chalk-engine v0.9.0
2019-07-29T16:34:19.5118489Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5126334Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-29T16:34:19.5132818Z    |
2019-07-29T16:34:19.5138577Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5144067Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5150009Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5155609Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5212828Z ...    |
2019-07-29T16:34:19.5213275Z 13 |   | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-29T16:34:19.5213670Z    |   |______________________________________________________________^
2019-07-29T16:34:19.5214021Z 14 |  || & mut self ) -> Self {
2019-07-29T16:34:19.5214416Z 15 |  || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5214890Z    |  ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5215338Z ...    |
2019-07-29T16:34:19.5215763Z 23 |   | } impl From < usize > for $ n {
2019-07-29T16:34:19.5216149Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5216573Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5217171Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-29T16:34:19.5217423Z    |
2019-07-29T16:34:19.5217423Z    |
2019-07-29T16:34:19.5217736Z 15 | /   index_struct! {
2019-07-29T16:34:19.5218081Z 16 | |       pub(crate) struct StackIndex {
2019-07-29T16:34:19.5218731Z 17 | |           value: usize,
2019-07-29T16:34:19.5219361Z 19 | |   }
2019-07-29T16:34:19.5219672Z    | |___- in this macro invocation
2019-07-29T16:34:19.5219725Z 
2019-07-29T16:34:19.5219725Z 
2019-07-29T16:34:19.5220040Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5220339Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-29T16:34:19.5220574Z    |
2019-07-29T16:34:19.5220956Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5221343Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5221698Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5222130Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5222582Z ...    |
2019-07-29T16:34:19.5222972Z 15 |   | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5223331Z    |   |__________________________________________________________________^
2019-07-29T16:34:19.5223697Z 16 |  || replace_zero ( & mut self ) -> Self {
2019-07-29T16:34:19.5224117Z 17 |  || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5224663Z    |  ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5224999Z ...    |
2019-07-29T16:34:19.5225337Z 23 |   | } impl From < usize > for $ n {
2019-07-29T16:34:19.5225724Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5226126Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5226798Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-29T16:34:19.5227070Z    |
2019-07-29T16:34:19.5227070Z    |
2019-07-29T16:34:19.5227409Z 15 | /   index_struct! {
2019-07-29T16:34:19.5227788Z 16 | |       pub(crate) struct StackIndex {
2019-07-29T16:34:19.5228136Z 17 | |           value: usize,
2019-07-29T16:34:19.5229171Z 19 | |   }
2019-07-29T16:34:19.5229497Z    | |___- in this macro invocation
2019-07-29T16:34:19.5229537Z 
2019-07-29T16:34:19.5229537Z 
2019-07-29T16:34:19.5229851Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5230140Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-29T16:34:19.5230373Z    |
2019-07-29T16:34:19.5230753Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5231139Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5231510Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5232060Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5232332Z ...    |
2019-07-29T16:34:19.5232726Z 17 |   | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5233106Z    |  _|___________________________________________________________________^
2019-07-29T16:34:19.5233529Z 18 | | | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5234070Z    | |_|___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5234398Z ...    |
2019-07-29T16:34:19.5234738Z 23 |   | } impl From < usize > for $ n {
2019-07-29T16:34:19.5235115Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5235541Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5236198Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-29T16:34:19.5236458Z    |
2019-07-29T16:34:19.5236458Z    |
2019-07-29T16:34:19.5236806Z 15 |  /  index_struct! {
2019-07-29T16:34:19.5237198Z 16 |  |      pub(crate) struct StackIndex {
2019-07-29T16:34:19.5237553Z 17 |  |          value: usize,
2019-07-29T16:34:19.5237893Z 18 |  |      }
2019-07-29T16:34:19.5238471Z 19 |  |  }
2019-07-29T16:34:19.5238850Z    |  |__- in this macro invocation
2019-07-29T16:34:19.5238903Z 
2019-07-29T16:34:19.5239226Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5239515Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-29T16:34:19.5239748Z    |
2019-07-29T16:34:19.5240132Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5240516Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5240884Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5241451Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5241722Z ...    |
2019-07-29T16:34:19.5242115Z 18 |   | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5242501Z    |  _|_____________________________________________________________________________^
2019-07-29T16:34:19.5242873Z 19 | | | sub_one ( & self ) -> Self {
2019-07-29T16:34:19.5243271Z 20 | | | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:19.5243786Z    | |_|________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5244120Z ...    |
2019-07-29T16:34:19.5244458Z 23 |   | } impl From < usize > for $ n {
2019-07-29T16:34:19.5244853Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5245258Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5245921Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-29T16:34:19.5246184Z    |
2019-07-29T16:34:19.5246184Z    |
2019-07-29T16:34:19.5246540Z 15 |  /  index_struct! {
2019-07-29T16:34:19.5246906Z 16 |  |      pub(crate) struct StackIndex {
2019-07-29T16:34:19.5342729Z 17 |  |          value: usize,
2019-07-29T16:34:19.5345337Z 18 |  |      }
2019-07-29T16:34:19.5345761Z 19 |  |  }
2019-07-29T16:34:19.5346119Z    |  |__- in this macro invocation
2019-07-29T16:34:19.5346163Z 
2019-07-29T16:34:19.5346462Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5346754Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-29T16:34:19.5347010Z    |
2019-07-29T16:34:19.5347378Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5347781Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5348442Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5348847Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5349140Z ...    |
2019-07-29T16:34:19.5349512Z 20 |   | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:19.5349899Z    |  _|__________________________________________________________^
2019-07-29T16:34:19.5350270Z 21 | | | & self , n : usize ) -> Option < Self > {
2019-07-29T16:34:19.5350781Z 22 | | | usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-29T16:34:19.5351302Z    | |_|______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5351654Z 23 |   | } impl From < usize > for $ n {
2019-07-29T16:34:19.5352098Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5352501Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5353115Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-07-29T16:34:19.5353353Z    |
2019-07-29T16:34:19.5353353Z    |
2019-07-29T16:34:19.5353673Z 15 | /   index_struct! {
2019-07-29T16:34:19.5354004Z 16 | |       pub(crate) struct StackIndex {
2019-07-29T16:34:19.5354353Z 17 | |           value: usize,
2019-07-29T16:34:19.5359503Z 19 | |   }
2019-07-29T16:34:19.5359896Z    | |___- in this macro invocation
2019-07-29T16:34:19.5359980Z 
2019-07-29T16:34:19.5359980Z 
2019-07-29T16:34:19.5360540Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5360868Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-29T16:34:19.5361154Z    |
2019-07-29T16:34:19.5361564Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5361991Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5362660Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5363088Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5363403Z ...   |
2019-07-29T16:34:19.5363820Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-29T16:34:19.5364213Z    |  |______________________________________________________________^
2019-07-29T16:34:19.5364611Z 14 | || & mut self ) -> Self {
2019-07-29T16:34:19.5365143Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5365687Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5365992Z ...   |
2019-07-29T16:34:19.5366360Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5366787Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5367240Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5367906Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-29T16:34:19.5368170Z    |
2019-07-29T16:34:19.5368170Z    |
2019-07-29T16:34:19.5448504Z 34 | /  index_struct! {
2019-07-29T16:34:19.5449002Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-29T16:34:19.5449369Z 36 | |          value: usize,
2019-07-29T16:34:19.5450071Z 38 | |  }
2019-07-29T16:34:19.5450426Z    | |__- in this macro invocation
2019-07-29T16:34:19.5450489Z 
2019-07-29T16:34:19.5450489Z 
2019-07-29T16:34:19.5450825Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5451148Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-29T16:34:19.5451426Z    |
2019-07-29T16:34:19.5451836Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5452265Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5452948Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5453377Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5453689Z ...   |
2019-07-29T16:34:19.5454098Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5454495Z    |  |__________________________________________________________________^
2019-07-29T16:34:19.5454910Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-29T16:34:19.5455464Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5456015Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5456320Z ...   |
2019-07-29T16:34:19.5456688Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5457116Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5457583Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5458545Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-29T16:34:19.5458823Z    |
2019-07-29T16:34:19.5458823Z    |
2019-07-29T16:34:19.5459161Z 34 | /  index_struct! {
2019-07-29T16:34:19.5459555Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-29T16:34:19.5459909Z 36 | |          value: usize,
2019-07-29T16:34:19.5460612Z 38 | |  }
2019-07-29T16:34:19.5460959Z    | |__- in this macro invocation
2019-07-29T16:34:19.5461020Z 
2019-07-29T16:34:19.5461020Z 
2019-07-29T16:34:19.5461344Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5461665Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-29T16:34:19.5461937Z    |
2019-07-29T16:34:19.5462344Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5462775Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5463365Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5463794Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5464091Z ...   |
2019-07-29T16:34:19.5464526Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5464925Z    |  |___________________________________________________________________^
2019-07-29T16:34:19.5465479Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5466022Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5466323Z ...   |
2019-07-29T16:34:19.5466710Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5467123Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5467583Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5468483Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-29T16:34:19.5468821Z    |
2019-07-29T16:34:19.5468821Z    |
2019-07-29T16:34:19.5469161Z 34 | /  index_struct! {
2019-07-29T16:34:19.5469528Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-29T16:34:19.5469903Z 36 | |          value: usize,
2019-07-29T16:34:19.5470573Z 38 | |  }
2019-07-29T16:34:19.5470947Z    | |__- in this macro invocation
2019-07-29T16:34:19.5470993Z 
2019-07-29T16:34:19.5470993Z 
2019-07-29T16:34:19.5471315Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5471655Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-29T16:34:19.5471912Z    |
2019-07-29T16:34:19.5472318Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5472764Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5473337Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5473790Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5474092Z ...   |
2019-07-29T16:34:19.5474510Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5474935Z    |  |_____________________________________________________________________________^
2019-07-29T16:34:19.5475327Z 19 | || sub_one ( & self ) -> Self {
2019-07-29T16:34:19.5475872Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:19.5476392Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5476691Z ...   |
2019-07-29T16:34:19.5477076Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5477488Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5477951Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5479019Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-29T16:34:19.5479302Z    |
2019-07-29T16:34:19.5479302Z    |
2019-07-29T16:34:19.5479643Z 34 | /  index_struct! {
2019-07-29T16:34:19.5480011Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-29T16:34:19.5480383Z 36 | |          value: usize,
2019-07-29T16:34:19.5481060Z 38 | |  }
2019-07-29T16:34:19.5481433Z    | |__- in this macro invocation
2019-07-29T16:34:19.5481476Z 
2019-07-29T16:34:19.5481476Z 
2019-07-29T16:34:19.5481802Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5482139Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-29T16:34:19.5482400Z    |
2019-07-29T16:34:19.5482806Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5483251Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5483813Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5484244Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5484558Z ...   |
2019-07-29T16:34:19.5484968Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:19.5485372Z    |  |__________________________________________________________^
2019-07-29T16:34:19.5485778Z 21 | || & self , n : usize ) -> Option < Self > {
2019-07-29T16:34:19.5486312Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-29T16:34:19.5486905Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5487546Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5488004Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5488755Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5489505Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-07-29T16:34:19.5489770Z    |
2019-07-29T16:34:19.5489770Z    |
2019-07-29T16:34:19.5490125Z 34 | /  index_struct! {
2019-07-29T16:34:19.5490496Z 35 | |      pub(crate) struct AnswerIndex {
2019-07-29T16:34:19.5490850Z 36 | |          value: usize,
2019-07-29T16:34:19.5491538Z 38 | |  }
2019-07-29T16:34:19.5491894Z    | |__- in this macro invocation
2019-07-29T16:34:19.5491954Z 
2019-07-29T16:34:19.5491954Z 
2019-07-29T16:34:19.5492285Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5492607Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-29T16:34:19.5492880Z    |
2019-07-29T16:34:19.5493288Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5493715Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5494458Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5494894Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5495191Z ...   |
2019-07-29T16:34:19.5495630Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-29T16:34:19.5496024Z    |  |______________________________________________________________^
2019-07-29T16:34:19.5496424Z 14 | || & mut self ) -> Self {
2019-07-29T16:34:19.5496962Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5497487Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5497808Z ...   |
2019-07-29T16:34:19.5498177Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5498996Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5499474Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5500129Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-29T16:34:19.5500391Z    |
2019-07-29T16:34:19.5500391Z    |
2019-07-29T16:34:19.5500731Z 81 | /  index_struct! {
2019-07-29T16:34:19.5501134Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-29T16:34:19.5501493Z 83 | |          value: usize,
2019-07-29T16:34:19.5502199Z 85 | |  }
2019-07-29T16:34:19.5502549Z    | |__- in this macro invocation
2019-07-29T16:34:19.5502594Z 
2019-07-29T16:34:19.5502594Z 
2019-07-29T16:34:19.5502939Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5503264Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-29T16:34:19.5503523Z    |
2019-07-29T16:34:19.5503945Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5504380Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5504958Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5505388Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5505685Z ...   |
2019-07-29T16:34:19.5506108Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5506508Z    |  |__________________________________________________________________^
2019-07-29T16:34:19.5506935Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-29T16:34:19.5507461Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5507984Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5508589Z ...   |
2019-07-29T16:34:19.5508963Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5509374Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5509866Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5510512Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-29T16:34:19.5510776Z    |
2019-07-29T16:34:19.5510776Z    |
2019-07-29T16:34:19.5511114Z 81 | /  index_struct! {
2019-07-29T16:34:19.5511517Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-29T16:34:19.5511875Z 83 | |          value: usize,
2019-07-29T16:34:19.5512574Z 85 | |  }
2019-07-29T16:34:19.5512924Z    | |__- in this macro invocation
2019-07-29T16:34:19.5512967Z 
2019-07-29T16:34:19.5512967Z 
2019-07-29T16:34:19.5513304Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5513627Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-29T16:34:19.5513886Z    |
2019-07-29T16:34:19.5514307Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5514883Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5515288Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5515737Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5516033Z ...   |
2019-07-29T16:34:19.5516465Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5516866Z    |  |___________________________________________________________________^
2019-07-29T16:34:19.5517405Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5517963Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5518623Z ...   |
2019-07-29T16:34:19.5519057Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5519471Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5519942Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5520591Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-29T16:34:19.5520854Z    |
2019-07-29T16:34:19.5520854Z    |
2019-07-29T16:34:19.5521211Z 81 | /  index_struct! {
2019-07-29T16:34:19.5521597Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-29T16:34:19.5521982Z 83 | |          value: usize,
2019-07-29T16:34:19.5522666Z 85 | |  }
2019-07-29T16:34:19.5523030Z    | |__- in this macro invocation
2019-07-29T16:34:19.5523074Z 
2019-07-29T16:34:19.5523074Z 
2019-07-29T16:34:19.5523398Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5523734Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-29T16:34:19.5523993Z    |
2019-07-29T16:34:19.5524397Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5524839Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5525423Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5525853Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5526167Z ...   |
2019-07-29T16:34:19.5526583Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5527035Z    |  |_____________________________________________________________________________^
2019-07-29T16:34:19.5647978Z 19 | || sub_one ( & self ) -> Self {
2019-07-29T16:34:19.5649042Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:19.5649649Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5649962Z ...   |
2019-07-29T16:34:19.5650352Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5650770Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5651243Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5651905Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-29T16:34:19.5652167Z    |
2019-07-29T16:34:19.5652167Z    |
2019-07-29T16:34:19.5652523Z 81 | /  index_struct! {
2019-07-29T16:34:19.5652908Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-29T16:34:19.5653264Z 83 | |          value: usize,
2019-07-29T16:34:19.5653964Z 85 | |  }
2019-07-29T16:34:19.5654329Z    | |__- in this macro invocation
2019-07-29T16:34:19.5654375Z 
2019-07-29T16:34:19.5654375Z 
2019-07-29T16:34:19.5654701Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5655024Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-07-29T16:34:19.5655300Z    |
2019-07-29T16:34:19.5655706Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5656320Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5656731Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5657160Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5657476Z ...   |
2019-07-29T16:34:19.5657884Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:19.5658272Z    |  |__________________________________________________________^
2019-07-29T16:34:19.5658706Z 21 | || & self , n : usize ) -> Option < Self > {
2019-07-29T16:34:19.5659236Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-07-29T16:34:19.5659795Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5660183Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5660609Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5661079Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5661727Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-07-29T16:34:19.5661987Z    |
2019-07-29T16:34:19.5661987Z    |
2019-07-29T16:34:19.5662620Z 81 | /  index_struct! {
2019-07-29T16:34:19.5663038Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-07-29T16:34:19.5663394Z 83 | |          value: usize,
2019-07-29T16:34:19.5664098Z 85 | |  }
2019-07-29T16:34:19.5664445Z    | |__- in this macro invocation
2019-07-29T16:34:19.5664491Z 
2019-07-29T16:34:19.5664491Z 
2019-07-29T16:34:19.5664835Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5665159Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-07-29T16:34:19.5665417Z    |
2019-07-29T16:34:19.5665841Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5666431Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5666857Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5667285Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5667581Z ...   |
2019-07-29T16:34:19.5668224Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-07-29T16:34:19.5668684Z    |  |______________________________________________________________^
2019-07-29T16:34:19.5669085Z 14 | || & mut self ) -> Self {
2019-07-29T16:34:19.5669645Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5670174Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5670497Z ...   |
2019-07-29T16:34:19.5670864Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5671276Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5671762Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5672411Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-29T16:34:19.5672675Z    |
2019-07-29T16:34:19.5672675Z    |
2019-07-29T16:34:19.5673013Z 91 | /  index_struct! {
2019-07-29T16:34:19.5673734Z 93 | |          value: usize,
2019-07-29T16:34:19.5674078Z 94 | |      }
2019-07-29T16:34:19.5674431Z 95 | |  }
2019-07-29T16:34:19.5674783Z    | |__- in this macro invocation
2019-07-29T16:34:19.5674783Z    | |__- in this macro invocation
2019-07-29T16:34:19.5674829Z 
2019-07-29T16:34:19.5675173Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5675499Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-07-29T16:34:19.5675755Z    |
2019-07-29T16:34:19.5676174Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5676752Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5677160Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5677606Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5677902Z ...   |
2019-07-29T16:34:19.5678556Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-07-29T16:34:19.5679001Z    |  |__________________________________________________________________^
2019-07-29T16:34:19.5679521Z 16 | || replace_zero ( & mut self ) -> Self {
2019-07-29T16:34:19.5680031Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5680522Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5680905Z ...   |
2019-07-29T16:34:19.5681282Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5681712Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5682184Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5682815Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-29T16:34:19.5683095Z    |
2019-07-29T16:34:19.5683095Z    |
2019-07-29T16:34:19.5683433Z 91 | /  index_struct! {
2019-07-29T16:34:19.5684154Z 93 | |          value: usize,
2019-07-29T16:34:19.5684507Z 94 | |      }
2019-07-29T16:34:19.5684852Z 95 | |  }
2019-07-29T16:34:19.5685202Z    | |__- in this macro invocation
2019-07-29T16:34:19.5685202Z    | |__- in this macro invocation
2019-07-29T16:34:19.5685246Z 
2019-07-29T16:34:19.5685567Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5685905Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-07-29T16:34:19.5686162Z    |
2019-07-29T16:34:19.5686568Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:19.5687323Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:19.5687761Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:19.5688203Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:19.5688894Z ...   |
2019-07-29T16:34:19.5689312Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-07-29T16:34:19.5689732Z    |  |___________________________________________________________________^
2019-07-29T16:34:19.5690315Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:19.5690877Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:19.5691180Z ...   |
2019-07-29T16:34:19.5691547Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:19.5691975Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:19.5692442Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-07-29T16:34:19.5693091Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-07-29T16:34:19.5693352Z    |
2019-07-29T16:34:19.5693352Z    |
2019-07-29T16:34:19.5693703Z 91 | /  index_struct! {
2019-07-29T16:34:19.5694407Z 93 | |          value: usize,
2019-07-29T16:34:19.5694768Z 94 | |      }
2019-07-29T16:34:19.5695101Z 95 | |  }
2019-07-29T16:34:19.5695448Z    | |__- in this macro invocation
2019-07-29T16:34:19.5695448Z    | |__- in this macro invocation
2019-07-29T16:34:19.5695509Z 
2019-07-29T16:34:20.2849305Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-07-29T16:34:20.2861153Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-07-29T16:34:20.2861511Z    |
2019-07-29T16:34:20.2861935Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-07-29T16:34:20.2862391Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-07-29T16:34:20.2863236Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-07-29T16:34:20.2863673Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-07-29T16:34:20.2863995Z ...   |
2019-07-29T16:34:20.2864420Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-07-29T16:34:20.2864852Z    |  |_____________________________________________________________________________^
2019-07-29T16:34:20.2865255Z 19 | || sub_one ( & self ) -> Self {
2019-07-29T16:34:20.2865811Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-07-29T16:34:20.2866360Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-07-29T16:34:20.2866670Z ...   |
2019-07-29T16:34:20.2867060Z 23 |  | } impl From < usize > for $ n {
2019-07-29T16:34:20.2867482Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-07-29T16:34:20.2867972Z    |  |________________________________________________________________- in this expansion of `index_struct!`

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@CAD97

This comment has been minimized.

Copy link
Contributor Author

commented Jul 29, 2019

Rebased for the #63029 test relocation. Still blocked on a chalk update.

@joshtriplett joshtriplett requested a review from scottmcm Aug 1, 2019

@joshtriplett

This comment has been minimized.

Copy link
Member

commented Aug 1, 2019

@adlerd

This comment has been minimized.

Copy link

commented Aug 7, 2019

The trait documentation seems inconsistent to me:

/// Returns `None` if ... `end` would never be reached.
/// * `steps_between(&a, &b) == Some(0)` if and only if `a >= b`
/// * `steps_between(&a, &b) == Some(n)` if and only if `a.forward(n) == Some(b)`

What is steps_between(&1, &0) supposed to return? We have a >= b so the second clause quoted above requires that this be Some(0). But the first clause requires that this be None, and the third clause indeed requires that this not be Some(_), so, None.

Perhaps it would be better to simply delete the second clause, since the third clause already covers the n == 0 case. That still allows for an exotic type where a.forward(0) != Some(a), so maybe the trait also ought to require that a.forward(0) == Some(a) as well as a.forward(x).forward(y) == a.forward(x + y).

@CAD97

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

Hm, that's a good catch @adlerd. This definitely needs to be worded better. There definitely is a contradiction here as currently worded.

I think eq(steps_between(&a, &b), Some(0)) ⟺ ge(a, b) is the correct semantics here. Key for these semantics is the use:

fn size_hint(&self) -> (usize, Option<usize>) {
match Step::steps_between(&self.start, &self.end) {
Some(hint) => (hint, Some(hint)),
None => (usize::MAX, None)
}
}

In effect, steps_between knows about Range's emptiness semantics. In effect, end is already reached, so returning Some(0) is correct.

We can change this if we rewrite <Range as Iterator>::size_hint:

    fn size_hint(&self) -> (usize, Option<usize>) { 
        if self.start <= self.end {
            let hint = Step::steps_between(&self.start, &self.end);
            (hint.unwrap_or(usize::MAX), hint)
        } else {
            (0, Some(0))
        }
    }

and it might be more correct to do so in order to open up Step. Doing this would also remove the need to bound on PartialOrd for Step, though Range would of course still require PartialOrd. It still seems that Step: PartialOrd is semantically correct, though. Maybe we should add invariants that ∀a>0: a.forward(n) > a and ∀a>0: a.backward(n) < a. This would then also encode that Step doesn't allow wrapping. (Of note: for _ in 0u8.. {} panics in release mode as well with this version of Step.) EDIT: mis-remembered. succ/pred for integers are still just Add::add/Sub::sub rather than forward(1).unwrap(). I haven't changed this due to issues found in #43127 where introducing panicking code paths here led to issues.

I've somewhat convinced myself that this change (steps_between doesn't know about Range start < end semantics) is best.

cc @SimonSapin again, who wrote #43127 and included these invariant lists originally.

That still allows for an exotic type where a.forward(0) != Some(a),

No, that's covered by "a.forward(n) equals Step::successor applied to a n times". If you apply successor 0 times, the result is obviously still the input. It could be worth spelling that out more explicitly, though.

steps_between doesn't know about Range
Additionally, clarify some invariant fallout from said change.
@CAD97

This comment has been minimized.

Copy link
Contributor Author

commented Aug 7, 2019

I made the adjustments suggested in the previous comment, alongside with tweaks to the presentation of Step invariants. 2e95e25

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

commented Aug 7, 2019

The job mingw-check of your PR failed (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-08-07T23:26:33.7810448Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-07T23:26:33.8009808Z ##[command]git config gc.auto 0
2019-08-07T23:26:33.8111281Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-07T23:26:33.8169017Z ##[command]git config --get-all http.proxy
2019-08-07T23:26:33.8325659Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/62886/merge:refs/remotes/pull/62886/merge
---
2019-08-07T23:27:08.2031624Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-07T23:27:08.2031656Z 
2019-08-07T23:27:08.2031888Z   git checkout -b <new-branch-name>
2019-08-07T23:27:08.2031918Z 
2019-08-07T23:27:08.2031966Z HEAD is now at 4859960f7 Merge 2e95e253d72feda0aa4d122ffa47ad0923f9ecc1 into ad7c55e1fc55d9af4787b285cec1c64e3480ae84
2019-08-07T23:27:08.2188823Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-07T23:27:08.2191777Z ==============================================================================
2019-08-07T23:27:08.2191833Z Task         : Bash
2019-08-07T23:27:08.2191880Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-07T23:33:03.7496045Z     Checking lock_api v0.1.3
2019-08-07T23:33:04.0836183Z    Compiling rustc_version v0.2.3
2019-08-07T23:33:05.4106242Z     Checking polonius-engine v0.9.0
2019-08-07T23:33:06.0688989Z     Checking chalk-engine v0.9.0
2019-08-07T23:33:06.1565779Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1570674Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-08-07T23:33:06.1575168Z    |
2019-08-07T23:33:06.1579419Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1583973Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1587697Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1591538Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1595737Z ...    |
2019-08-07T23:33:06.1599564Z 13 |   | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-08-07T23:33:06.1603187Z    |   |______________________________________________________________^
2019-08-07T23:33:06.1608895Z 14 |  || & mut self ) -> Self {
2019-08-07T23:33:06.1615825Z 15 |  || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1622546Z    |  ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1629846Z ...    |
2019-08-07T23:33:06.1657746Z 23 |   | } impl From < usize > for $ n {
2019-08-07T23:33:06.1659425Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1660282Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1661634Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-08-07T23:33:06.1662232Z    |
2019-08-07T23:33:06.1662232Z    |
2019-08-07T23:33:06.1664428Z 15 | /   index_struct! {
2019-08-07T23:33:06.1665591Z 16 | |       pub(crate) struct StackIndex {
2019-08-07T23:33:06.1666819Z 17 | |           value: usize,
2019-08-07T23:33:06.1671036Z 19 | |   }
2019-08-07T23:33:06.1672236Z    | |___- in this macro invocation
2019-08-07T23:33:06.1672302Z 
2019-08-07T23:33:06.1672302Z 
2019-08-07T23:33:06.1672668Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1673060Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-08-07T23:33:06.1673286Z    |
2019-08-07T23:33:06.1673654Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1674463Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1674827Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1675987Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1676314Z ...    |
2019-08-07T23:33:06.1676663Z 15 |   | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1677125Z    |   |__________________________________________________________________^
2019-08-07T23:33:06.1677579Z 16 |  || replace_zero ( & mut self ) -> Self {
2019-08-07T23:33:06.1677972Z 17 |  || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1678423Z    |  ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1679389Z ...    |
2019-08-07T23:33:06.1679753Z 23 |   | } impl From < usize > for $ n {
2019-08-07T23:33:06.1680121Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1680633Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1681343Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-08-07T23:33:06.1681558Z    |
2019-08-07T23:33:06.1681558Z    |
2019-08-07T23:33:06.1681859Z 15 | /   index_struct! {
2019-08-07T23:33:06.1685407Z 16 | |       pub(crate) struct StackIndex {
2019-08-07T23:33:06.1685740Z 17 | |           value: usize,
2019-08-07T23:33:06.1686459Z 19 | |   }
2019-08-07T23:33:06.1686811Z    | |___- in this macro invocation
2019-08-07T23:33:06.1686872Z 
2019-08-07T23:33:06.1686872Z 
2019-08-07T23:33:06.1687304Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1687569Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-08-07T23:33:06.1687796Z    |
2019-08-07T23:33:06.1688127Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1688479Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1688824Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1689179Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1689433Z ...    |
2019-08-07T23:33:06.1698193Z 17 |   | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1698608Z    |  _|___________________________________________________________________^
2019-08-07T23:33:06.1699038Z 18 | | | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1699474Z    | |_|___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1699750Z ...    |
2019-08-07T23:33:06.1700065Z 23 |   | } impl From < usize > for $ n {
2019-08-07T23:33:06.1700439Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1700828Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1709890Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-08-07T23:33:06.1710282Z    |
2019-08-07T23:33:06.1710282Z    |
2019-08-07T23:33:06.1710602Z 15 |  /  index_struct! {
2019-08-07T23:33:06.1710911Z 16 |  |      pub(crate) struct StackIndex {
2019-08-07T23:33:06.1711207Z 17 |  |          value: usize,
2019-08-07T23:33:06.1711784Z 19 |  |  }
2019-08-07T23:33:06.1712257Z    |  |__- in this macro invocation
2019-08-07T23:33:06.1712311Z 
2019-08-07T23:33:06.1712311Z 
2019-08-07T23:33:06.1712618Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1712882Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-08-07T23:33:06.1713110Z    |
2019-08-07T23:33:06.1713442Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1713790Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1714137Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1714492Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1714748Z ...    |
2019-08-07T23:33:06.1715594Z 18 |   | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1716000Z    |  _|_____________________________________________________________________________^
2019-08-07T23:33:06.1716362Z 19 | | | sub_one ( & self ) -> Self {
2019-08-07T23:33:06.1716757Z 20 | | | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.1717181Z    | |_|________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1717436Z ...    |
2019-08-07T23:33:06.1717765Z 23 |   | } impl From < usize > for $ n {
2019-08-07T23:33:06.1718126Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1718519Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1719233Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-08-07T23:33:06.1719469Z    |
2019-08-07T23:33:06.1719469Z    |
2019-08-07T23:33:06.1719762Z 15 |  /  index_struct! {
2019-08-07T23:33:06.1720080Z 16 |  |      pub(crate) struct StackIndex {
2019-08-07T23:33:06.1720404Z 17 |  |          value: usize,
2019-08-07T23:33:06.1721121Z 19 |  |  }
2019-08-07T23:33:06.1721426Z    |  |__- in this macro invocation
2019-08-07T23:33:06.1721466Z 
2019-08-07T23:33:06.1721739Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1721739Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1722031Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-08-07T23:33:06.1722245Z    |
2019-08-07T23:33:06.1722587Z 1  |   / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1722977Z 2  |   | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1736306Z 3  |   | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1736885Z 4  |   | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1737149Z ...    |
2019-08-07T23:33:06.1737499Z 20 |   | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.1738669Z    |  _|__________________________________________________________^
2019-08-07T23:33:06.1792197Z 21 | | | & self , n : usize ) -> Option < Self > {
2019-08-07T23:33:06.1792867Z 22 | | | usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-08-07T23:33:06.1793336Z    | |_|______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1793673Z 23 |   | } impl From < usize > for $ n {
2019-08-07T23:33:06.1794347Z 24 |   | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1794998Z    |   |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1795561Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/stack.rs:15:1
2019-08-07T23:33:06.1795783Z    |
2019-08-07T23:33:06.1795783Z    |
2019-08-07T23:33:06.1796073Z 15 | /   index_struct! {
2019-08-07T23:33:06.1796399Z 16 | |       pub(crate) struct StackIndex {
2019-08-07T23:33:06.1796704Z 17 | |           value: usize,
2019-08-07T23:33:06.1797797Z 19 | |   }
2019-08-07T23:33:06.1798241Z    | |___- in this macro invocation
2019-08-07T23:33:06.1798282Z 
2019-08-07T23:33:06.1798282Z 
2019-08-07T23:33:06.1798594Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1798862Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-08-07T23:33:06.1799214Z    |
2019-08-07T23:33:06.1799548Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1799916Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1800249Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1800596Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1800844Z ...   |
2019-08-07T23:33:06.1801185Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-08-07T23:33:06.1801515Z    |  |______________________________________________________________^
2019-08-07T23:33:06.1801842Z 14 | || & mut self ) -> Self {
2019-08-07T23:33:06.1802191Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1802600Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1802843Z ...   |
2019-08-07T23:33:06.1803149Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1803874Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1804435Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1805046Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-08-07T23:33:06.1805283Z    |
2019-08-07T23:33:06.1805283Z    |
2019-08-07T23:33:06.1805606Z 34 | /  index_struct! {
2019-08-07T23:33:06.1805944Z 35 | |      pub(crate) struct AnswerIndex {
2019-08-07T23:33:06.1806279Z 36 | |          value: usize,
2019-08-07T23:33:06.1807032Z 38 | |  }
2019-08-07T23:33:06.1807367Z    | |__- in this macro invocation
2019-08-07T23:33:06.1807408Z 
2019-08-07T23:33:06.1807408Z 
2019-08-07T23:33:06.1807710Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1808007Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-08-07T23:33:06.1808255Z    |
2019-08-07T23:33:06.1808626Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1809190Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1809523Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1809868Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1810121Z ...   |
2019-08-07T23:33:06.1810454Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1810776Z    |  |__________________________________________________________________^
2019-08-07T23:33:06.1811125Z 16 | || replace_zero ( & mut self ) -> Self {
2019-08-07T23:33:06.1811487Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1811904Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1812146Z ...   |
2019-08-07T23:33:06.1812444Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1812790Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1813266Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1814372Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-08-07T23:33:06.1814598Z    |
2019-08-07T23:33:06.1814598Z    |
2019-08-07T23:33:06.1814894Z 34 | /  index_struct! {
2019-08-07T23:33:06.1815203Z 35 | |      pub(crate) struct AnswerIndex {
2019-08-07T23:33:06.1815609Z 36 | |          value: usize,
2019-08-07T23:33:06.1816233Z 38 | |  }
2019-08-07T23:33:06.1816527Z    | |__- in this macro invocation
2019-08-07T23:33:06.1816575Z 
2019-08-07T23:33:06.1816575Z 
2019-08-07T23:33:06.1816850Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1817121Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-08-07T23:33:06.1817344Z    |
2019-08-07T23:33:06.1817686Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1818061Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1818401Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1818911Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1819156Z ...   |
2019-08-07T23:33:06.1819499Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1819832Z    |  |___________________________________________________________________^
2019-08-07T23:33:06.1820212Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1820624Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1820878Z ...   |
2019-08-07T23:33:06.1821177Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1821510Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1822194Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1822780Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-08-07T23:33:06.1823020Z    |
2019-08-07T23:33:06.1823020Z    |
2019-08-07T23:33:06.1823333Z 34 | /  index_struct! {
2019-08-07T23:33:06.1823894Z 35 | |      pub(crate) struct AnswerIndex {
2019-08-07T23:33:06.1824205Z 36 | |          value: usize,
2019-08-07T23:33:06.1824921Z 38 | |  }
2019-08-07T23:33:06.1825218Z    | |__- in this macro invocation
2019-08-07T23:33:06.1825258Z 
2019-08-07T23:33:06.1825258Z 
2019-08-07T23:33:06.1825539Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1825812Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-08-07T23:33:06.1826029Z    |
2019-08-07T23:33:06.1826386Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1826759Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1827103Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1827469Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1827866Z ...   |
2019-08-07T23:33:06.1828215Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1828551Z    |  |_____________________________________________________________________________^
2019-08-07T23:33:06.1828883Z 19 | || sub_one ( & self ) -> Self {
2019-08-07T23:33:06.1829249Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.1829641Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1829891Z ...   |
2019-08-07T23:33:06.1830191Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1830531Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1831021Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1831569Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-08-07T23:33:06.1831802Z    |
2019-08-07T23:33:06.1831802Z    |
2019-08-07T23:33:06.1832273Z 34 | /  index_struct! {
2019-08-07T23:33:06.1832585Z 35 | |      pub(crate) struct AnswerIndex {
2019-08-07T23:33:06.1832892Z 36 | |          value: usize,
2019-08-07T23:33:06.1833773Z 38 | |  }
2019-08-07T23:33:06.1834118Z    | |__- in this macro invocation
2019-08-07T23:33:06.1834158Z 
2019-08-07T23:33:06.1834437Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1834437Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1834721Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-08-07T23:33:06.1834937Z    |
2019-08-07T23:33:06.1835280Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1835671Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1836005Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1836371Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1836619Z ...   |
2019-08-07T23:33:06.1836966Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.1837310Z    |  |__________________________________________________________^
2019-08-07T23:33:06.1837665Z 21 | || & self , n : usize ) -> Option < Self > {
2019-08-07T23:33:06.1838053Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-08-07T23:33:06.1838483Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1838808Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1839177Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1839685Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1840314Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/table.rs:34:1
2019-08-07T23:33:06.1840547Z    |
2019-08-07T23:33:06.1840547Z    |
2019-08-07T23:33:06.1840869Z 34 | /  index_struct! {
2019-08-07T23:33:06.1841207Z 35 | |      pub(crate) struct AnswerIndex {
2019-08-07T23:33:06.1841532Z 36 | |          value: usize,
2019-08-07T23:33:06.1842276Z 38 | |  }
2019-08-07T23:33:06.1896667Z    | |__- in this macro invocation
2019-08-07T23:33:06.1896738Z 
2019-08-07T23:33:06.1896738Z 
2019-08-07T23:33:06.1897222Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1897514Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-08-07T23:33:06.1897752Z    |
2019-08-07T23:33:06.1898098Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1899128Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1899480Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1899837Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1900103Z ...   |
2019-08-07T23:33:06.1900456Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-08-07T23:33:06.1900800Z    |  |______________________________________________________________^
2019-08-07T23:33:06.1901146Z 14 | || & mut self ) -> Self {
2019-08-07T23:33:06.1901509Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1901944Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1902199Z ...   |
2019-08-07T23:33:06.1902510Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1902883Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1903478Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1904335Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-08-07T23:33:06.1904553Z    |
2019-08-07T23:33:06.1904553Z    |
2019-08-07T23:33:06.1904861Z 81 | /  index_struct! {
2019-08-07T23:33:06.1905189Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-08-07T23:33:06.1905606Z 83 | |          value: usize,
2019-08-07T23:33:06.1906239Z 85 | |  }
2019-08-07T23:33:06.1906530Z    | |__- in this macro invocation
2019-08-07T23:33:06.1906586Z 
2019-08-07T23:33:06.1906586Z 
2019-08-07T23:33:06.1906868Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1907145Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-08-07T23:33:06.1907376Z    |
2019-08-07T23:33:06.1907721Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1908103Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1908455Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1908811Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1909074Z ...   |
2019-08-07T23:33:06.1909417Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1909760Z    |  |__________________________________________________________________^
2019-08-07T23:33:06.1910121Z 16 | || replace_zero ( & mut self ) -> Self {
2019-08-07T23:33:06.1910494Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1910927Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1911184Z ...   |
2019-08-07T23:33:06.1911587Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1912076Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1912454Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1913043Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-08-07T23:33:06.1913282Z    |
2019-08-07T23:33:06.1913282Z    |
2019-08-07T23:33:06.1914198Z 81 | /  index_struct! {
2019-08-07T23:33:06.1914776Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-08-07T23:33:06.1915204Z 83 | |          value: usize,
2019-08-07T23:33:06.1915830Z 85 | |  }
2019-08-07T23:33:06.1916124Z    | |__- in this macro invocation
2019-08-07T23:33:06.1916179Z 
2019-08-07T23:33:06.1916179Z 
2019-08-07T23:33:06.1916458Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1916731Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-08-07T23:33:06.1916961Z    |
2019-08-07T23:33:06.1917463Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1917811Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1918138Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1918470Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1918714Z ...   |
2019-08-07T23:33:06.1919045Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1919376Z    |  |___________________________________________________________________^
2019-08-07T23:33:06.1919739Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1920137Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1920387Z ...   |
2019-08-07T23:33:06.1920676Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1921005Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1921662Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1922212Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-08-07T23:33:06.1922456Z    |
2019-08-07T23:33:06.1922456Z    |
2019-08-07T23:33:06.1922760Z 81 | /  index_struct! {
2019-08-07T23:33:06.1923101Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-08-07T23:33:06.1924063Z 83 | |          value: usize,
2019-08-07T23:33:06.1924748Z 85 | |  }
2019-08-07T23:33:06.1925044Z    | |__- in this macro invocation
2019-08-07T23:33:06.1925084Z 
2019-08-07T23:33:06.1925084Z 
2019-08-07T23:33:06.1925359Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1925649Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-08-07T23:33:06.1925863Z    |
2019-08-07T23:33:06.1926209Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1926609Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1926943Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1927465Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1927702Z ...   |
2019-08-07T23:33:06.1928042Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1928401Z    |  |_____________________________________________________________________________^
2019-08-07T23:33:06.1928942Z 19 | || sub_one ( & self ) -> Self {
2019-08-07T23:33:06.1929294Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.1929673Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1929907Z ...   |
2019-08-07T23:33:06.1930211Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1930659Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1931030Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1931559Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-08-07T23:33:06.1931797Z    |
2019-08-07T23:33:06.1931797Z    |
2019-08-07T23:33:06.1932089Z 81 | /  index_struct! {
2019-08-07T23:33:06.1932415Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-08-07T23:33:06.1932872Z 83 | |          value: usize,
2019-08-07T23:33:06.1933487Z 85 | |  }
2019-08-07T23:33:06.1934503Z    | |__- in this macro invocation
2019-08-07T23:33:06.1934551Z 
2019-08-07T23:33:06.1934834Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1934834Z error[E0407]: method `add_usize` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1935130Z   --> <::chalk_macros::index::index_struct macros>:20:58
2019-08-07T23:33:06.1935347Z    |
2019-08-07T23:33:06.1935700Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1936090Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1936424Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1936795Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1937579Z ...   |
2019-08-07T23:33:06.1937929Z 20 |  | Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.1938275Z    |  |__________________________________________________________^
2019-08-07T23:33:06.1938612Z 21 | || & self , n : usize ) -> Option < Self > {
2019-08-07T23:33:06.1939048Z 22 | || usize :: add_usize ( & self . value , n ) . map ( | value | Self { value } ) }
2019-08-07T23:33:06.1939464Z    | ||______________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1939775Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1940296Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1940662Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1941224Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:81:1
2019-08-07T23:33:06.1941454Z    |
2019-08-07T23:33:06.1941454Z    |
2019-08-07T23:33:06.1941767Z 81 | /  index_struct! {
2019-08-07T23:33:06.1942105Z 82 | |      pub struct TableIndex { // FIXME: pub b/c Fold
2019-08-07T23:33:06.1942636Z 83 | |          value: usize,
2019-08-07T23:33:06.1943210Z 85 | |  }
2019-08-07T23:33:06.1943481Z    | |__- in this macro invocation
2019-08-07T23:33:06.1944014Z 
2019-08-07T23:33:06.1944014Z 
2019-08-07T23:33:06.1944330Z error[E0407]: method `replace_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1944604Z   --> <::chalk_macros::index::index_struct macros>:13:62
2019-08-07T23:33:06.1944836Z    |
2019-08-07T23:33:06.1945193Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1945566Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1945914Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1946271Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1946533Z ...   |
2019-08-07T23:33:06.1946885Z 13 |  | usize :: steps_between ( & start . value , & end . value ) } fn replace_one (
2019-08-07T23:33:06.1947367Z    |  |______________________________________________________________^
2019-08-07T23:33:06.1947686Z 14 | || & mut self ) -> Self {
2019-08-07T23:33:06.1948022Z 15 | || Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1948425Z    | ||________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1948665Z ...   |
2019-08-07T23:33:06.1948951Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1949429Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1949784Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1950320Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-08-07T23:33:06.1950538Z    |
2019-08-07T23:33:06.1950538Z    |
2019-08-07T23:33:06.1950828Z 91 | /  index_struct! {
2019-08-07T23:33:06.1951548Z 93 | |          value: usize,
2019-08-07T23:33:06.1951891Z 94 | |      }
2019-08-07T23:33:06.1952178Z 95 | |  }
2019-08-07T23:33:06.1952470Z    | |__- in this macro invocation
2019-08-07T23:33:06.1952470Z    | |__- in this macro invocation
2019-08-07T23:33:06.1952519Z 
2019-08-07T23:33:06.1952800Z error[E0407]: method `replace_zero` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1953069Z   --> <::chalk_macros::index::index_struct macros>:15:66
2019-08-07T23:33:06.1953295Z    |
2019-08-07T23:33:06.1954015Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1954453Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1954809Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1955168Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1955416Z ...   |
2019-08-07T23:33:06.1955775Z 15 |  | Self { value : usize :: replace_one ( & mut self . value ) , } } fn
2019-08-07T23:33:06.1956128Z    |  |__________________________________________________________________^
2019-08-07T23:33:06.1956478Z 16 | || replace_zero ( & mut self ) -> Self {
2019-08-07T23:33:06.1956850Z 17 | || Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1957421Z    | ||_________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1957743Z ...   |
2019-08-07T23:33:06.1958038Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1958511Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1958868Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1959408Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-08-07T23:33:06.1959798Z    |
2019-08-07T23:33:06.1959798Z    |
2019-08-07T23:33:06.1960074Z 91 | /  index_struct! {
2019-08-07T23:33:06.1960759Z 93 | |          value: usize,
2019-08-07T23:33:06.1961068Z 94 | |      }
2019-08-07T23:33:06.1961351Z 95 | |  }
2019-08-07T23:33:06.1961634Z    | |__- in this macro invocation
2019-08-07T23:33:06.1961634Z    | |__- in this macro invocation
2019-08-07T23:33:06.1961672Z 
2019-08-07T23:33:06.1961951Z error[E0407]: method `add_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1962213Z   --> <::chalk_macros::index::index_struct macros>:17:67
2019-08-07T23:33:06.1962422Z    |
2019-08-07T23:33:06.1962772Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1963130Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1963460Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1964169Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1964443Z ...   |
2019-08-07T23:33:06.1964809Z 17 |  | Self { value : usize :: replace_zero ( & mut self . value ) , } } fn add_one (
2019-08-07T23:33:06.1965165Z    |  |___________________________________________________________________^
2019-08-07T23:33:06.1965542Z 18 | || & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.1965984Z    | ||___________________________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1966237Z ...   |
2019-08-07T23:33:06.1966562Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.1966916Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.1967580Z    |  |________________________________________________________________- in this expansion of `index_struct!`
2019-08-07T23:33:06.1968147Z   ::: /cargo/registry/src/github.com-1ecc6299db9ec823/chalk-engine-0.9.0/src/lib.rs:91:1
2019-08-07T23:33:06.1968385Z    |
2019-08-07T23:33:06.1968385Z    |
2019-08-07T23:33:06.1968829Z 91 | /  index_struct! {
2019-08-07T23:33:06.1969658Z 93 | |          value: usize,
2019-08-07T23:33:06.1969976Z 94 | |      }
2019-08-07T23:33:06.1970244Z 95 | |  }
2019-08-07T23:33:06.1970543Z    | |__- in this macro invocation
2019-08-07T23:33:06.1970543Z    | |__- in this macro invocation
2019-08-07T23:33:06.1970581Z 
2019-08-07T23:33:06.1970845Z error[E0407]: method `sub_one` is not a member of trait `std::iter::Step`
2019-08-07T23:33:06.1971121Z   --> <::chalk_macros::index::index_struct macros>:18:77
2019-08-07T23:33:06.1971329Z    |
2019-08-07T23:33:06.1971661Z 1  |  / ( $ v : vis struct $ n : ident { $ vf : vis value : usize , } ) => {
2019-08-07T23:33:06.1972039Z 2  |  | # [ derive ( Copy , Clone , PartialEq , Eq , PartialOrd , Ord , Hash ) ] $ v
2019-08-07T23:33:06.1972361Z 3  |  | struct $ n { $ vf value : usize , } impl $ n {
2019-08-07T23:33:06.1972704Z 4  |  | # [ allow ( dead_code ) ] $ v fn get_and_increment ( & mut self ) -> Self {
2019-08-07T23:33:06.1972959Z ...   |
2019-08-07T23:33:06.1973447Z 18 |  | & self ) -> Self { Self { value : usize :: add_one ( & self . value ) , } } fn
2019-08-07T23:33:06.2014473Z    |  |_____________________________________________________________________________^
2019-08-07T23:33:06.2015050Z 19 | || sub_one ( & self ) -> Self {
2019-08-07T23:33:06.2015437Z 20 | || Self { value : usize :: sub_one ( & self . value ) , } } fn add_usize (
2019-08-07T23:33:06.2015873Z    | ||________________________________________________________^ not a member of trait `std::iter::Step`
2019-08-07T23:33:06.2016126Z ...   |
2019-08-07T23:33:06.2016452Z 23 |  | } impl From < usize > for $ n {
2019-08-07T23:33:06.2017203Z 24 |  | fn from ( value : usize ) -> Self { Self { value : value } } } }
2019-08-07T23:33:06.2017710Z    |  |________________________________________________________________- in this expansion of `index_struct!`

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@ProgrammaticNajel

This comment has been minimized.

Copy link

commented Aug 16, 2019

Ping from triage. @scottmcm any updates on this? Thanks.

///
/// The `steps_between` function provides a way to efficiently compare
/// two `Step` objects.
/// This trait is `unsafe` because implementations of the `unsafe`

This comment has been minimized.

Copy link
@scottmcm

scottmcm Aug 17, 2019

Member

I think this should be in a # Safety section.

Also, if this is an unsafe trait it feels like it should also have requirements on Ord, like a.successor() > a (if the successor exists).

This comment has been minimized.

Copy link
@CAD97

CAD97 Aug 17, 2019

Author Contributor

We have

For any `a`, `n`:
* a.forward(n).unwrap() >= a
* a.backward(n).unwrap() <= a

This does allow for an exotic implementation where the successor operation is non-advancing, but I don't see a specific reason to rule that out.

But I definitely agree that it should be required for forward to be towards "larger" values and backward to be towards "smaller" values as defined by Ord. Range actually already relies on that for its correctness.

@JelteF

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2019

Just found this by accident trying to find out how to implement Sum/Product automatically for types for my derive_more crate. I think this change makes a lot of sense for range iterators. But I was wondering what the correct way is for getting the zero/one values of a type now that replace_one/replace_zero are being removed from it.

@CAD97

This comment has been minimized.

Copy link
Contributor Author

commented Aug 17, 2019

num-traits has One for the multiplicative identity and Zero for the additive identity.

Especially since the methods aren't used anymore, they really don't fit on Step. num-traits definitely feels like the right place for these identities to live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.