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

Remove mem.rs line numbers from const-size_of-cycle.stderr #53547

Closed
dtolnay opened this issue Aug 21, 2018 · 4 comments
Closed

Remove mem.rs line numbers from const-size_of-cycle.stderr #53547

dtolnay opened this issue Aug 21, 2018 · 4 comments
Assignees

Comments

@dtolnay
Copy link
Member

dtolnay commented Aug 21, 2018

--> $SRC_DIR/libcore/mem.rs:323:14

It is not nice for this test to fail any time we insert a line in mem.rs, as happened in #53503. Please implement this test in a way that does not hardcode a line number.

Please also try to find standard library line numbers in other ui tests and scrub those in the same way.

As far as I can tell, the const-size_of-cycle.stderr file was newly added in #53196 so attn @davidtwco.

@dtolnay
Copy link
Member Author

dtolnay commented Aug 21, 2018

rg SRC_DIR/lib src turns up only one other case:

::: $SRC_DIR/libcore/hash/mod.rs:185:13

@eddyb
Copy link
Member

eddyb commented Aug 21, 2018

We scrub line numbers on the left, I wonder if we should do it for all paths, always.
cc @nikomatsakis

@davidtwco
Copy link
Member

@eddyb I think it could make sense to keep line numbers for paths like it is now - I think there could be an (admittedly rare) case where a change causes an error to be reported on an incorrect line and that wouldn't be spotted (although, the highlighted code from the error would need to be the same on both lines - which isn't impossible, just unlikely).

Either way, I'll put together a PR that normalizes these two cases for the time being.

@davidtwco
Copy link
Member

Submitted #53558 that adds normalization for this case to compiletest as I think we wouldn't ever want to assert that line numbers from compiler source do not change in error messages.

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this issue Aug 22, 2018
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

No branches or pull requests

3 participants