-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Let backends access span information #77614
Merged
Merged
Conversation
This file contains 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
Sometimes, a backend may need to emit warnings, errors, or otherwise need to know the span of the current item in a basic block. So, add a set_span method to give the backend that information.
(rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
approved these changes
Oct 6, 2020
@bors r+ |
📌 Commit c5bc956 has been approved by |
26 tasks
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 6, 2020
Rollup of 11 pull requests Successful merges: - rust-lang#76784 (Add some docs to rustdoc::clean::inline and def_id functions) - rust-lang#76911 (fix VecDeque::iter_mut aliasing issues) - rust-lang#77400 (Fix suggestions for x.py setup) - rust-lang#77515 (Update to chalk 0.31) - rust-lang#77568 (inliner: use caller param_env) - rust-lang#77571 (Use matches! for core::char methods) - rust-lang#77582 (Move `EarlyOtherwiseBranch` to mir-opt-level 2) - rust-lang#77590 (Update RLS and Rustfmt) - rust-lang#77605 (Fix rustc_def_path to show the full path and not the trimmed one) - rust-lang#77614 (Let backends access span information) - rust-lang#77624 (Add c as a shorthand check alternative for new options rust-lang#77603) Failed merges: r? `@ghost`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 18, 2020
Make set_span take mut self This was a mistake in rust-lang#77614 It's not a _huge_ deal, because backends can always implement this with interior mutability, but it's nice to avoid interior mutability when possible. For context, the `set_source_location` method, called alongside `set_span`, also takes `&mut self`. r? `@eddyb`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-codegen
Area: Code generation
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
Sometimes, a backend may need to emit warnings, errors, or otherwise need to know the span of the current item in a basic block. So, add a
set_span
method to give the backend that information.The
set_source_location
method already partially does this, however, it's disabled when debug info is disabled. There needs to be a way to unconditionally provide the span.