-
Notifications
You must be signed in to change notification settings - Fork 908
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
utils: Add CodeMapExt extension trait for span_* methods #857
Conversation
I like the refactoring. Is there any need for a trait here? It doesn't seem to make sense for anything other than a CodeMap to implement this stuff, so maybe it is better to just make the methods inherent methods on the CodeMap? If you do think we should keep the trait, I would like a more descriptive name than CodeMapExt CodeMapSpanUtils or something. |
I'm not sure about
In my branch where I'm working on that, I actually created a |
I guess there's no reason that could't be |
Ok, that makes sense, sorry I got confused with something else.
|
This commit adds a CodeMapSpanUtils extension trait on CodeMap, and moves some functions to methods there: - span_after - span_after_last - span_before This better reflects them being lookup methods on the codemap.
3a3919e
to
d82d9fc
Compare
Sounds good. I've updated it to be |
utils: Add CodeMapExt extension trait for span_* methods
This commit adds a `codemap` module, and moves the `CodemapSpanUtils` added in rust-lang#857 to it. This is preparation for adding more `Codemap` specific utilities. Refs rust-lang#434
This commit adds a `codemap` module, and moves the `CodemapSpanUtils` added in rust-lang#857 to it. This is preparation for adding more `Codemap` specific utilities. Refs rust-lang#434
This commit adds a `codemap` module, and moves the `CodemapSpanUtils` added in rust-lang#857 to it. This is preparation for adding more `Codemap` specific utilities. Refs rust-lang#434
This commit adds a `codemap` module, and moves the `CodemapSpanUtils` added in rust-lang#857 to it. This is preparation for adding more `Codemap` specific utilities. Refs rust-lang#434
This commit adds a CodeMapExt extension trait on CodeMap, and moves some
functions to methods there:
This better reflects them being lookup methods on the codemap.