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

Fix "Mis-calculated spans" errors from -Z save-analysis + refactoring #43826

Merged
merged 1 commit into from
Aug 14, 2017

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented Aug 12, 2017

Removed the path span extraction methods from SpanUtils:

  • spans_with_brackets
  • spans_for_path_segments
  • spans_for_ty_params

Use the span fields in PathSegment and TyParam instead.

(Note that since it processes ast::Path not a qualified path (hir::QPath / ast::QSelf), UFCS path will be flattened: <Foo as a::b::c::Trait>::D::E::F::g will be seen as a::b::c::Trait::D::E::F::g.)

Fix #43796. Close #41478.

r? @nrc

@kennytm kennytm force-pushed the fix-43796-mis-calculated-spans branch from ccf964c to 03e107f Compare August 12, 2017 18:01
@petrochenkov
Copy link
Contributor

Thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Aug 12, 2017

📌 Commit 03e107f has been approved by petrochenkov

@bors
Copy link
Collaborator

bors commented Aug 12, 2017

⌛ Testing commit 03e107fb2a61f50c4469db6e2ea37c2c2668703f with merge bd64db92d92019a4c15cce7416e385e49b411dc2...

@kennytm kennytm force-pushed the fix-43796-mis-calculated-spans branch from 03e107f to 45fb5ab Compare August 12, 2017 19:36
@kennytm
Copy link
Member Author

kennytm commented Aug 12, 2017

@petrochenkov Sorry the PR-CI had shown failure, due to the new test case trying to write to a read-only file system. I've force-pushed a new commit. Maybe let's ensure the CI shows a green tick before re-r+'ing 🙂.

[00:51:12] /bin/sh: 1: cannot create stderr.txt: Read-only file system
[00:51:12] cat: stderr.txt: No such file or directory

@bors retry (stop the test, go to the next PR.)

@petrochenkov petrochenkov self-assigned this Aug 12, 2017
@alexcrichton alexcrichton added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 12, 2017
@kennytm kennytm force-pushed the fix-43796-mis-calculated-spans branch 2 times, most recently from a9a7b4c to a017b07 Compare August 12, 2017 21:58
@petrochenkov
Copy link
Contributor

All checks have passed

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 12, 2017

📌 Commit a017b07 has been approved by petrochenkov

@kennytm kennytm mentioned this pull request Aug 13, 2017
@bors
Copy link
Collaborator

bors commented Aug 13, 2017

⌛ Testing commit a017b079e94654af35570d6ddcb5b25bbc797229 with merge 924b9811d1b81b8eefec894e3818e0932673dcaf...

@bors
Copy link
Collaborator

bors commented Aug 13, 2017

💔 Test failed - status-appveyor

@kennytm kennytm force-pushed the fix-43796-mis-calculated-spans branch 2 times, most recently from 6c844bd to 6715007 Compare August 14, 2017 09:10
Use the `span` field in PathSegment and TyParam instead.

Fix rust-lang#43796. Close rust-lang#41478.
@kennytm kennytm force-pushed the fix-43796-mis-calculated-spans branch from 6715007 to 60377e4 Compare August 14, 2017 10:15
@kennytm
Copy link
Member Author

kennytm commented Aug 14, 2017

@petrochenkov The Windows error should be fixed now, hopefully. run-make test is hard :(

@petrochenkov
Copy link
Contributor

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 14, 2017

📌 Commit 60377e4 has been approved by petrochenkov

@bors
Copy link
Collaborator

bors commented Aug 14, 2017

⌛ Testing commit 60377e4 with merge df511d5...

bors added a commit that referenced this pull request Aug 14, 2017
…ochenkov

Fix "Mis-calculated spans" errors from `-Z save-analysis` + refactoring

Removed the path span extraction methods from `SpanUtils`:

* spans_with_brackets
* spans_for_path_segments
* spans_for_ty_params

Use the `span` fields in `PathSegment` and `TyParam` instead.

(Note that since it processes `ast::Path` not a qualified path (`hir::QPath` / `ast::QSelf`), UFCS path will be flattened: `<Foo as a::b::c::Trait>::D::E::F::g` will be seen as `a::b::c::Trait::D::E::F::g`.)

Fix #43796. Close #41478.

r? @nrc
@bors
Copy link
Collaborator

bors commented Aug 14, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing df511d5 to master...

@bors bors merged commit 60377e4 into rust-lang:master Aug 14, 2017
@kennytm kennytm deleted the fix-43796-mis-calculated-spans branch August 16, 2017 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants