Skip to content

Add regression test for #22471#24979

Merged
bors merged 1 commit into
rust-lang:masterfrom
jooert:test-22471
May 5, 2015
Merged

Add regression test for #22471#24979
bors merged 1 commit into
rust-lang:masterfrom
jooert:test-22471

Conversation

@jooert

@jooert jooert commented Apr 30, 2015

Copy link
Copy Markdown
Contributor

Closes #22471.

@rust-highfive

Copy link
Copy Markdown
Contributor

r? @nikomatsakis

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

@pnkfelix

Copy link
Copy Markdown
Contributor

@bors r+ e13d886 rollup

Manishearth added a commit to Manishearth/rust that referenced this pull request May 1, 2015
@Manishearth

Copy link
Copy Markdown
Member

@Manishearth

Copy link
Copy Markdown
Member

@bors: r-

bors added a commit that referenced this pull request May 1, 2015
@jooert

jooert commented May 1, 2015

Copy link
Copy Markdown
Contributor Author

I'm sorry I messed up the rollup PR! The weird thing is: When I run

make check-stage1-rpass TESTNAME=issue-22471

locally, the test passes, but it fails when I run

make check-stage1-pretty TESTNAME=issue-22471

However, when I run the exact same command that the test runner claims to compile the test with, compilation works without errors. Compiling with another (nightly f9e53c7 2015-04-24) locally installed version of rustc works fine too. Perhaps there is something I still don't understand about the testing system, but I thought if a test compiles fine using the just compiled rustc and using an older version, too, the test should be good to go.
Nevertheless, even though I don't understand what is failing here, I'm still sorry for the inconvience caused!

@Manishearth

Copy link
Copy Markdown
Member

No problem.

Put an // ignore-pretty on the test, I suspect the literal is getting cropped. (See other tests with the ignore-pretty annotation to figure out how to do it).

@jooert

jooert commented May 1, 2015

Copy link
Copy Markdown
Contributor Author

Ok, I added the // ignore-pretty. So what is "pretty" supposed to do in comparison to the ordinary "run-pass"?

@Manishearth

Copy link
Copy Markdown
Member

It runs the test through the prettifier (-Z unstable-options --pretty=expanded) and tries it again.

@jooert

jooert commented May 1, 2015

Copy link
Copy Markdown
Contributor Author

Ah, I see! In this particular case it turns

type Foo<T> where T: Copy = Box<T>;

into

type Foo<T> = Box<T> where T: Copy;

The latter fails with

error: expected one of `+`, `::`, or `;`, found `where`
type Foo<T> = Box<T> where T: Copy;

while the former compiles fine. Isn't that a bug in the prettifier if it transforms working code into non-compiling?

@Manishearth

Copy link
Copy Markdown
Member

Yes, please file it! :)

@jooert

jooert commented May 1, 2015

Copy link
Copy Markdown
Contributor Author

Ok. 😃
Thank you for your patience and your explanations!

@jooert

jooert commented May 5, 2015

Copy link
Copy Markdown
Contributor Author

This can be merged now, as #25092 has landed.

@pnkfelix

pnkfelix commented May 5, 2015

Copy link
Copy Markdown
Contributor

@bors r+ c4d8102 rollup

bors added a commit that referenced this pull request May 5, 2015
@bors

bors commented May 5, 2015

Copy link
Copy Markdown
Collaborator

⌛ Testing commit c4d8102 with merge 6cd7486...

@bors

bors commented May 5, 2015

Copy link
Copy Markdown
Collaborator

@bors bors merged commit c4d8102 into rust-lang:master May 5, 2015
@jooert jooert deleted the test-22471 branch May 5, 2015 20:27
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.

Internal error looking up a definition [E0242] with where clause on type alias

6 participants