-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add inspection and setter methods to proc_macro::Diagnostic. #52896
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
This is the build failure: [00:23:33] error: This node does not have a stability attribute
[00:23:33] --> libproc_macro/diagnostic.rs:130:31
[00:23:33] |
[00:23:33] 130 | pub fn children(&self) -> impl Iterator<Item = &Diagnostic> {
[00:23:33] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...which doesn't make sense to me. The method is labeled #[unstable(feature = "proc_macro_diagnostic", issue = "38356")]
pub fn children(&self) -> impl Iterator<Item = &Diagnostic> { .. } The error is pointing at the return type. Is there some extra labeling that needs to happen, or is this a bug elsewhere? |
Looks good to me! That may be a bug in the stability lint perhaps? It hasn't been touched in a long long time :( |
cc @oli-obk looks like the stability marking pass is not recursing into |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Should be enough to add an arm to rust/src/librustc/middle/stability.rs Line 356 in a2af866
for |
@oli-obk Isn't the problem here that sometimes it doesn't get marked? |
that's weird. Maybe lowering places them inside the impl block instead of the surrounding module? |
Triage: Marking this as blocked on a fix to the stability marking pass. @oli-obk Is there a PR/issue about this problem? If there's not can you open one? |
@oli-obk Pinging to see if we can move this forward. Worst case, I'll just stop using |
Probably the same issue as #54045 where the same fix applies |
ba473c0
to
6975ac3
Compare
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
6975ac3
to
50d8693
Compare
Also updates the issue number for 'proc_macro_diagnostic'.
Worked around the bug by using a special-cased |
@alexcrichton How does this look? |
@bors: r+ Looks good to me! |
📌 Commit 10bb5ed has been approved by |
⌛ Testing commit 10bb5ed with merge 5d083073c915a70b2049d9eed696bf31603e3557... |
💔 Test failed - status-travis |
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Failure looks unrelated. Rerun? |
Add inspection and setter methods to proc_macro::Diagnostic. A few useful methods for `proc_macro::Diagnostic`. r? @alexcrichton
☀️ Test successful - status-appveyor, status-travis |
…crichton Make 'proc_macro::MultiSpan' public. Oversight from rust-lang#52896.
…crichton Make 'proc_macro::MultiSpan' public. Oversight from rust-lang#52896.
A few useful methods for
proc_macro::Diagnostic
.r? @alexcrichton