Skip to content
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

Disable some incorrect rust-analyzer diagnostics on beta #136236

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/tools/rust-analyzer/crates/hir-def/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl FunctionData {
.map(Box::new);
let rustc_allow_incoherent_impl = attrs.by_key(&sym::rustc_allow_incoherent_impl).exists();
if flags.contains(FnFlags::HAS_UNSAFE_KW)
&& !crate_graph[krate].edition.at_least_2024()
// && !crate_graph[krate].edition.at_least_2024()
&& attrs.by_key(&sym::rustc_deprecated_safe_2024).exists()
{
flags.remove(FnFlags::HAS_UNSAFE_KW);
Expand Down
6 changes: 3 additions & 3 deletions src/tools/rust-analyzer/crates/hir-ty/src/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ impl<'a> TyLoweringContext<'a> {
self
}

pub fn push_diagnostic(&mut self, type_ref: TypeRefId, kind: TyLoweringDiagnosticKind) {
let source = match self.types_source_map {
pub fn push_diagnostic(&mut self, type_ref: TypeRefId, _kind: TyLoweringDiagnosticKind) {
let _source = match self.types_source_map {
Some(source_map) => {
let Ok(source) = source_map.type_syntax(type_ref) else {
stdx::never!("error in synthetic type");
Expand All @@ -237,7 +237,7 @@ impl<'a> TyLoweringContext<'a> {
}
None => Either::Left(type_ref),
};
self.diagnostics.push(TyLoweringDiagnostic { source, kind });
// self.diagnostics.push(TyLoweringDiagnostic { source, kind });
}
}

Expand Down
Loading