Skip to content

Commit 96d9761

Browse files
authored
Merge pull request #18466 from ChayimFriedman2/proper-lint-severity
Properly handle different defaults for severity of lints
2 parents 4dc0f27 + 2950325 commit 96d9761

File tree

15 files changed

+6645
-1453
lines changed

15 files changed

+6645
-1453
lines changed

src/tools/rust-analyzer/Cargo.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,10 @@ version = "0.1.5"
389389
source = "registry+https://github.com/rust-lang/crates.io-index"
390390
checksum = "9bda8e21c04aca2ae33ffc2fd8c23134f3cac46db123ba97bd9d3f3b8a4a85e1"
391391

392+
[[package]]
393+
name = "edition"
394+
version = "0.0.0"
395+
392396
[[package]]
393397
name = "either"
394398
version = "1.13.0"
@@ -1266,6 +1270,7 @@ name = "parser"
12661270
version = "0.0.0"
12671271
dependencies = [
12681272
"drop_bomb",
1273+
"edition",
12691274
"expect-test",
12701275
"limit",
12711276
"ra-ap-rustc_lexer",
@@ -2662,6 +2667,7 @@ version = "0.1.0"
26622667
dependencies = [
26632668
"anyhow",
26642669
"directories",
2670+
"edition",
26652671
"either",
26662672
"flate2",
26672673
"itertools",

src/tools/rust-analyzer/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ toolchain = { path = "./crates/toolchain", version = "0.0.0" }
8383
tt = { path = "./crates/tt", version = "0.0.0" }
8484
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
8585
vfs = { path = "./crates/vfs", version = "0.0.0" }
86+
edition = { path = "./crates/edition", version = "0.0.0" }
8687

8788
ra-ap-rustc_lexer = { version = "0.85", default-features = false }
8889
ra-ap-rustc_parse_format = { version = "0.85", default-features = false }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "edition"
3+
version = "0.0.0"
4+
rust-version.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
authors.workspace = true
8+
repository.workspace = true
9+
10+
[dependencies]
11+
12+
[lints]
13+
workspace = true

src/tools/rust-analyzer/crates/parser/src/edition.rs renamed to src/tools/rust-analyzer/crates/edition/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//! The edition of the Rust language used in a crate.
2-
// Ideally this would be defined in the span crate, but the dependency chain is all over the place
3-
// wrt to span, parser and syntax.
2+
// This should live in a separate crate because we use it in both actual code and codegen.
43
use std::fmt;
54

65
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]

src/tools/rust-analyzer/crates/ide-completion/src/completions/attribute/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub(super) fn complete_lint(
1111
existing_lints: &[ast::Path],
1212
lints_completions: &[Lint],
1313
) {
14-
for &Lint { label, description } in lints_completions {
14+
for &Lint { label, description, .. } in lints_completions {
1515
let (qual, name) = {
1616
// FIXME: change `Lint`'s label to not store a path in it but split the prefix off instead?
1717
let mut parts = label.split("::");

0 commit comments

Comments
 (0)