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

Fix indentation of error message #39940

Merged
merged 1 commit into from
Feb 25, 2017
Merged

Conversation

sgrif
Copy link
Contributor

@sgrif sgrif commented Feb 18, 2017

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

screen shot 2017-02-18 at 4 35 36 pm

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 18, 2017

📌 Commit ec648a1 has been approved by alexcrichton

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 19, 2017
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
@bors
Copy link
Contributor

bors commented Feb 19, 2017

⌛ Testing commit ec648a1 with merge 1780ccb...

@bors
Copy link
Contributor

bors commented Feb 19, 2017

💔 Test failed - status-travis

@alexcrichton
Copy link
Member

alexcrichton commented Feb 21, 2017 via email

@nikomatsakis
Copy link
Contributor

@sgrif example code? it probably means you've got a recursive enum somewhere.

@sgrif
Copy link
Contributor Author

sgrif commented Feb 22, 2017

@nikomatsakis The type is an hlist, which is recursive but not represented as an enum. The code this impl (but for a 16 element hlist/tuple instead of 2):

impl<A, B, SqlA, SqlB, DB> Queryable<Cons<SqlA, Cons<SqlB, Nil>>, DB> for (A, B) where
    DB: Backend + HasSqlType<SqlA> + HasSqlType<SqlB>,
    DB: HasSqlType<Cons<SqlA, Cons<SqlB, Nil>>>,
    A: Queryable<SqlA, DB>,
    B: Queryable<SqlB, DB>,
    Cons<A, Cons<B, Nil>>: FromSqlRow<Cons<SqlA, Cons<SqlB, Nil>>, DB>,
{
    type Row = Cons<A, Cons<B, Nil>>;

    fn build(Cons(a, Cons(b, Nil)): Self::Row) -> Self {
        (a, b)
    }
}

We ended up dropping the max size we generate that impl for to 12, which resolved the issue. (We picked 12 arbitrarily because it's the largest tuple that libstd provides impls of things like PartialEq for. Any number smaller than 16 would have worked as well). Upping the recursion limit worked there as well.

@nikomatsakis
Copy link
Contributor

@sgrif ah ok

@sgrif
Copy link
Contributor Author

sgrif commented Feb 22, 2017

@nikomatsakis The error message should probably mention that #![recursion_limit="double"] is an option though. Not sure how to make this do that

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 22, 2017
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
@GuillaumeGomez
Copy link
Member

@bors: rollup

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 23, 2017
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 23, 2017
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Feb 24, 2017
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Feb 24, 2017
Fix indentation of error message

So I just encountered this error for the first time. It's unclear what
it means, why I encountered it, or how to fix it. But worst of all, it
has a random newline and weird indentation! This commit fixes that last
bit.

<img width="680" alt="screen shot 2017-02-18 at 4 35 36 pm" src="https://cloud.githubusercontent.com/assets/1529387/23097087/0ef5ac4a-f5f9-11e6-9132-18ce759f7092.png">
bors added a commit that referenced this pull request Feb 24, 2017
Rollup of 17 pull requests

- Successful merges: #39777, #39815, #39845, #39886, #39892, #39903, #39905, #39914, #39927, #39940, #40010, #40030, #40048, #40050, #40052, #40060, #40071
- Failed merges:
bors added a commit that referenced this pull request Feb 25, 2017
Rollup of 11 pull requests

- Successful merges: #39777, #39815, #39845, #39886, #39940, #40010, #40030, #40048, #40050, #40052, #40071
- Failed merges:
@bors bors merged commit ec648a1 into rust-lang:master Feb 25, 2017
@sgrif sgrif deleted the sg-indentation branch February 25, 2017 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants