Remove some uses of guess_head_span#99911
Merged
bors merged 3 commits intorust-lang:masterfrom Aug 1, 2022
Merged
Conversation
Contributor
|
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
cjgillot
commented
Jul 29, 2022
| | | ||
| LL | trait Foo<X = Box<dyn Foo>> { | ||
| | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| LL | / trait Foo<X = Box<dyn Foo>> { |
Contributor
Author
There was a problem hiding this comment.
This span was wrong, as it's supposed to point to the module.
davidtwco
approved these changes
Jul 29, 2022
Member
davidtwco
left a comment
There was a problem hiding this comment.
One nit, otherwise LGTM, r=me when CI passes
| let fix_span = |span: Span, query: &QueryStackFrame| { | ||
| sess.source_map().guess_head_span(query.default_span(span)) | ||
| }; | ||
| let fix_span = |span: Span, query: &QueryStackFrame| query.default_span(span); |
Member
There was a problem hiding this comment.
nit: does it still make sense to have a closure for this?
davidtwco
approved these changes
Aug 1, 2022
Member
|
@bors r+ |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 1, 2022
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#99340 (Fix ICE in Definitions::create_def) - rust-lang#99629 (Improve `cannot move out of` error message) - rust-lang#99864 (bootstrap: don't emit warn about duplicated deps with same/different features if some of sets actually empty) - rust-lang#99911 (Remove some uses of `guess_head_span`) - rust-lang#99976 (Make Rustdoc exit with correct error code when scraping examples from invalid files) - rust-lang#100003 (Improve size assertions.) - rust-lang#100012 (Avoid `Ty` to `String` conversions) - rust-lang#100020 (better error when python is not found in x - issue rust-lang#99648) Failed merges: - rust-lang#99994 (Replace `guess_head_span` with `opt_span`) r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
That function cuts a span at the first occurrence of
{. Usingdef_spanis almost always more precise.