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

Compiletest should detect when a .nll.stderr file matches the .stderr file #51204

Closed
oli-obk opened this issue May 30, 2018 · 1 comment · Fixed by #51427
Closed

Compiletest should detect when a .nll.stderr file matches the .stderr file #51204

oli-obk opened this issue May 30, 2018 · 1 comment · Fixed by #51427
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented May 30, 2018

This happens when NLL has been fixed up to the point where it reproduces borrowck's output. (example: #51186)

If both are the same, automatically remove the .nll.stderr in --bless mode and emit an error without --bless.

Here's what --bless does when it detects that the output of files has changed. Something similar can be done as a new check for equality of the .nll.* and .* files. It would probably be best to extract the replacing code from the current --bless impl to a separate function so it can be reused.

@oli-obk oli-obk added A-testsuite Area: The testsuite used to check the correctness of rustc E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels May 30, 2018
@FelixMcFelix
Copy link
Contributor

I'd be happy to pick this up, I'll give it a go.

FelixMcFelix added a commit to FelixMcFelix/rust that referenced this issue Jun 8, 2018
UI tests in bless mode should now check to see if `.nll.*` files have a
matching `.*` file. If a match is found, it will be deleted.
This should be extensible to other modes (i.e., Polonius).
On running with `--bless`, the two files removed in rust-lang#51186 are, in turn,
removed automatically.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jun 8, 2018
…oli-obk

compiletest: autoremove duplicate .nll.* files (rust-lang#51204)

UI tests in bless mode should now check to see if `.nll.*` files have a
matching `.*` file. If a match is found, it will be deleted.
This should be extensible to other modes (i.e., Polonius).
On running with `--bless`, the two files removed in rust-lang#51186 are, in turn,
removed automatically.

fixes rust-lang#51204
bors added a commit that referenced this issue Jun 8, 2018
Rollup of 13 pull requests

Successful merges:

 - #50143 (Add deprecation lint for duplicated `macro_export`s)
 - #51099 (Fix Issue 38777)
 - #51276 (Dedup auto traits in trait objects.)
 - #51298 (Stabilize unit tests with non-`()` return type)
 - #51360 (Suggest parentheses when a struct literal needs them)
 - #51391 (Use spans pointing at the inside of a rustdoc attribute)
 - #51394 (Use scope tree depths to speed up `nearest_common_ancestor`.)
 - #51396 (Make the size of Option<NonZero*> a documented guarantee.)
 - #51401 (Warn on `repr` without hints)
 - #51412 (Avoid useless Vec clones in pending_obligations().)
 - #51427 (compiletest: autoremove duplicate .nll.* files (#51204))
 - #51436 (Do not require stage 2 compiler for rustdoc)
 - #51437 (rustbuild: generate full list of dependencies for metadata)

Failed merges:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants