Skip to content

minor: Mark unresolved associated item diagnostic as experimental #16330

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

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

zheylmun
Copy link
Contributor

@zheylmun zheylmun commented Jan 9, 2024

Per #16327 unresolved associated item has false positives. Mark the diagnostic as experimental until this is more dependable.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 9, 2024
@@ -373,7 +373,7 @@ pub fn diagnostics(
AnyDiagnostic::UndeclaredLabel(d) => handlers::undeclared_label::undeclared_label(&ctx, &d),
AnyDiagnostic::UnimplementedBuiltinMacro(d) => handlers::unimplemented_builtin_macro::unimplemented_builtin_macro(&ctx, &d),
AnyDiagnostic::UnreachableLabel(d) => handlers::unreachable_label::unreachable_label(&ctx, &d),
AnyDiagnostic::UnresolvedAssocItem(d) => handlers::unresolved_assoc_item::unresolved_assoc_item(&ctx, &d),
AnyDiagnostic::UnresolvedAssocItem(d) => handlers::unresolved_assoc_item::unresolved_assoc_item(&ctx, &d).experimental(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be better to add .experimental() after Diagnostic::new

Diagnostic::new_with_syntax_node_ptr(
ctx,
DiagnosticCode::RustcHardError("E0599"),
"no such associated item",
d.expr_or_pat.clone().map(Into::into),
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've been running into this false positive in a few projects recently. Thank you for all the awesome work, Rust Analyzer is fantastic and keeps getting better.

@Veykril Veykril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 10, 2024
@Veykril
Copy link
Member

Veykril commented Jan 10, 2024

Thanks!
@bors r+

@bors
Copy link
Contributor

bors commented Jan 10, 2024

📌 Commit 1aff815 has been approved by Veykril

It is now in the queue for this repository.

@Veykril Veykril changed the title Mark unresolved associated item diagnostic as experimental minor: Mark unresolved associated item diagnostic as experimental Jan 10, 2024
@bors
Copy link
Contributor

bors commented Jan 10, 2024

⌛ Testing commit 1aff815 with merge e5a1118...

@bors
Copy link
Contributor

bors commented Jan 10, 2024

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing e5a1118 to master...

@bors bors merged commit e5a1118 into rust-lang:master Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants