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

syntax/hir: give loop labels a span #33351

Merged
merged 1 commit into from
May 27, 2016
Merged

Conversation

birkenfeld
Copy link
Contributor

This makes the "shadowing labels" warning not print the entire loop as a span, but only the lifetime.

Also makes #31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).

@rust-highfive
Copy link
Collaborator

r? @pnkfelix

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

@jonas-schievink
Copy link
Contributor

This is a libsyntax [breaking-change], right? In that case, cc #31645 and cc @Manishearth, not sure how big the impact would be.

@birkenfeld
Copy link
Contributor Author

I suppose so, yes. There might also be a reason for these not to have a span, I don't know :)

@Manishearth
Copy link
Member

Nah, lots of things don't have a span just because it's not necessary.

But yeah, to whoever reviews this: please just write r=whatever without mentioning bors, don't actually approve it. This will be merged when we have sufficient other libsyntax breaking changes.

@llogiq
Copy link
Contributor

llogiq commented May 2, 2016

So I could help getting this merged by breaking libsyntax in other ways? 😜

@Manishearth
Copy link
Member

lol. Make a change large enough that it's going to need rebases every day and I'm fine with batching up now, otherwise we really should wait.

@birkenfeld
Copy link
Contributor Author

@Manishearth isn't Niko's diagnostics change pretty breaking? At least it will break clippy (cf PR there).

@Manishearth
Copy link
Member

[breaking-batch] applies to libsyntax public APIs and semantics only, since that breaks syntax extensions and the serde/aster/quasi stuff -- this leads to a disturbance in the Force, as if millions of lockfiles suddenly cried out in terror.

On the other hand, clippy doesn't break dependencies since people don't use it as a mandatory dependency (or shouldn't, at any rate), so it's just a matter of ignoring clippy failures in travis for a day. Problematic, but less so. Besides, clippy depends on so many random-and-totally-unstable bits of the compiler that we'd be freezing too much. OTOH it's pretty okay if libsyntax's API is somewhat frozen, since it's mostly not going to change anyway.

@bors
Copy link
Contributor

bors commented May 10, 2016

☔ The latest upstream changes (presumably #33443) made this pull request unmergeable. Please resolve the merge conflicts.

visitor.visit_expr(subexpression);
visitor.visit_block(block);
walk_opt_ident(visitor, expression.span, opt_ident)
for sp_ident in opt_sp_ident {
Copy link
Member

@pnkfelix pnkfelix May 10, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I'd personally prefer if let Some(sp_ident) to for here, but I won't block this PR on that nit.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's how I'd write it too, I kept it consistent with existing code (line 826).

@pnkfelix
Copy link
Member

@Manishearth r=me

@bors
Copy link
Contributor

bors commented May 14, 2016

☔ The latest upstream changes (presumably #33532) made this pull request unmergeable. Please resolve the merge conflicts.

@bors
Copy link
Contributor

bors commented May 18, 2016

☔ The latest upstream changes (presumably #33654) made this pull request unmergeable. Please resolve the merge conflicts.

@birkenfeld
Copy link
Contributor Author

@Manishearth please let me know when a batch is about to land. I don't want to rebase for no reason.

@Manishearth
Copy link
Member

Could you rebase this? The batch will happen soon

This makes the "shadowing labels" warning *not* print the entire loop
as a span, but only the lifetime.

Also makes rust-lang#31719 go away, but does not fix its root cause (the span
of the expanded loop is still wonky, but not used anymore).
Manishearth added a commit to Manishearth/rust that referenced this pull request May 26, 2016
…elix

 This makes the \"shadowing labels\" warning *not* print the entire loop as a span, but only the lifetime.

Also makes rust-lang#31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
Manishearth added a commit to Manishearth/rust that referenced this pull request May 27, 2016
…elix

 This makes the \"shadowing labels\" warning *not* print the entire loop as a span, but only the lifetime.

Also makes rust-lang#31719 go away, but does not fix its root cause (the span of the expanded loop is still wonky, but not used anymore).
@bors bors merged commit 2e812e1 into rust-lang:master May 27, 2016
@birkenfeld birkenfeld deleted the loop-label-spans branch August 7, 2016 08:15
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.

7 participants