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

Get information out of Span #44

Closed
celinval opened this issue Oct 10, 2023 · 1 comment
Closed

Get information out of Span #44

celinval opened this issue Oct 10, 2023 · 1 comment
Assignees

Comments

@celinval
Copy link
Contributor

celinval commented Oct 10, 2023

Provide an API that users can use to retrieve specific information of a Span, such as filename, line number.

@ouz-a
Copy link

ouz-a commented Oct 11, 2023

Well I'm not entirely sure in which format you want line numbers(a struct, opaque), but this should be easy enough.
@rustbot claim

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 13, 2023
Add ability to get lines/filename for Span in smir

Wasn't sure about how to structure lines, so went with safest option, also I'm not sure why `span_to_lines` returns `vec`.

Addresses rust-lang/project-stable-mir#44

r? `@oli-obk`
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Oct 14, 2023
Add ability to get lines/filename for Span in smir

Wasn't sure about how to structure lines, so went with safest option, also I'm not sure why `span_to_lines` returns `vec`.

Addresses rust-lang/project-stable-mir#44

r? ``@oli-obk``
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Oct 14, 2023
Rollup merge of rust-lang#116630 - ouz-a:smir_span_better, r=oli-obk

Add ability to get lines/filename for Span in smir

Wasn't sure about how to structure lines, so went with safest option, also I'm not sure why `span_to_lines` returns `vec`.

Addresses rust-lang/project-stable-mir#44

r? ``@oli-obk``
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

2 participants