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

Add regression test for #22471 #24979

Merged
merged 1 commit into from
May 5, 2015
Merged

Add regression test for #22471 #24979

merged 1 commit into from
May 5, 2015

Conversation

jooert
Copy link
Contributor

@jooert jooert commented Apr 30, 2015

Closes #22471.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

@pnkfelix
Copy link
Member

@bors r+ e13d886 rollup

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

@Manishearth
Copy link
Member

@bors: r-

bors added a commit that referenced this pull request May 1, 2015
@jooert
Copy link
Contributor Author

jooert commented May 1, 2015

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
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
Copy link
Contributor Author

jooert commented May 1, 2015

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

@Manishearth
Copy link
Member

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

@jooert
Copy link
Contributor Author

jooert commented May 1, 2015

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
Member

Yes, please file it! :)

@jooert
Copy link
Contributor Author

jooert commented May 1, 2015

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

@jooert
Copy link
Contributor Author

jooert commented May 5, 2015

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

@pnkfelix
Copy link
Member

pnkfelix commented May 5, 2015

@bors r+ c4d8102 rollup

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

bors commented May 5, 2015

⌛ Testing commit c4d8102 with merge 6cd7486...

@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