Skip to content

Fix indentation of error message#39940

Merged
bors merged 1 commit into
rust-lang:masterfrom
sgrif:sg-indentation
Feb 25, 2017
Merged

Fix indentation of error message#39940
bors merged 1 commit into
rust-lang:masterfrom
sgrif:sg-indentation

Conversation

@sgrif

@sgrif sgrif commented Feb 18, 2017

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

r? @nikomatsakis

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

@alexcrichton

Copy link
Copy Markdown
Member

@bors: r+

@bors

bors commented Feb 18, 2017

Copy link
Copy Markdown
Collaborator

📌 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

bors commented Feb 19, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit ec648a1 with merge 1780ccb...

@bors

bors commented Feb 19, 2017

Copy link
Copy Markdown
Collaborator

💔 Test failed - status-travis

@alexcrichton

alexcrichton commented Feb 21, 2017 via email

Copy link
Copy Markdown
Member

@nikomatsakis

Copy link
Copy Markdown
Contributor

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

@sgrif

sgrif commented Feb 22, 2017

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Contributor

@sgrif ah ok

@sgrif

sgrif commented Feb 22, 2017

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
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