You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I wrote a regression test for a certain error and it held up the rollup PR (see #24979) because while my test passed the run-pass it failed during the pretty pass. The problem is that the prettifier (compiling with -Z unstable-options --pretty=expanded) transforms the original code example from #22471
typeFoo<T>whereT:Copy = Box<T>;
into
typeFoo<T> = Box<T>whereT:Copy;
which upon compilation leads to the following error:
error: expected one of `+`, `::`, or `;`, found `where`
type Foo<T> = Box<T> where T: Copy;
This seems to indicate a bug in the prettifier as (seemingly) valid code is transformed into non-compiling one.
The text was updated successfully, but these errors were encountered:
basically the PR that added the syntax type Foo<T> where T: Copy = Box<T>; should have updated the pretty code to handle that too. That's what the pretty tests are trying to enforce.
pnkfelix
changed the title
Prettifier transforms working code into non-compiling one
Pretty-printer incorrectly outputs type items with where clauses
May 4, 2015
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
May 4, 2015
So I wrote a regression test for a certain error and it held up the rollup PR (see #24979) because while my test passed the
run-pass
it failed during thepretty
pass. The problem is that the prettifier (compiling with-Z unstable-options --pretty=expanded
) transforms the original code example from #22471into
which upon compilation leads to the following error:
This seems to indicate a bug in the prettifier as (seemingly) valid code is transformed into non-compiling one.
The text was updated successfully, but these errors were encountered: