Skip to content

Commit

Permalink
Rollup merge of #120636 - lnicola:sync-from-ra, r=lnicola
Browse files Browse the repository at this point in the history
Subtree update of `rust-analyzer`

r? ghost
  • Loading branch information
matthiaskrgr authored Feb 5, 2024
2 parents d8e9ddc + 98ad126 commit bc98f57
Show file tree
Hide file tree
Showing 197 changed files with 3,103 additions and 2,004 deletions.
24 changes: 21 additions & 3 deletions src/tools/rust-analyzer/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Switch to stable toolchain
run: |
rustup update --no-self-update stable
rustup component add --toolchain stable rust-src
rustup component add --toolchain stable rust-src clippy
rustup default stable
- name: Run analysis-stats on rust-analyzer
Expand All @@ -103,6 +103,10 @@ jobs:
RUSTC_BOOTSTRAP: 1
run: target/${{ matrix.target }}/debug/rust-analyzer analysis-stats --with-deps $(rustc --print sysroot)/lib/rustlib/src/rust/library/std

- name: clippy
if: matrix.os == 'ubuntu-latest'
run: cargo clippy --all-targets

# Weird targets to catch non-portable code
rust-cross:
if: github.repository == 'rust-lang/rust-analyzer'
Expand Down Expand Up @@ -203,11 +207,25 @@ jobs:
working-directory: ./editors/code
if: needs.changes.outputs.typescript == 'true'

typo-check:
name: Typo Check
runs-on: ubuntu-latest
timeout-minutes: 10
env:
FORCE_COLOR: 1
TYPOS_VERSION: v1.18.0
steps:
- name: download typos
run: curl -LsSf https://github.com/crate-ci/typos/releases/download/$TYPOS_VERSION/typos-$TYPOS_VERSION-x86_64-unknown-linux-musl.tar.gz | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin

- name: check for typos
run: typos

end-success:
name: bors build finished
if: github.event.pusher.name == 'bors' && success()
runs-on: ubuntu-latest
needs: [rust, rust-cross, typescript]
needs: [rust, rust-cross, typescript, typo-check]
steps:
- name: Mark the job as successful
run: exit 0
Expand All @@ -216,7 +234,7 @@ jobs:
name: bors build finished
if: github.event.pusher.name == 'bors' && !success()
runs-on: ubuntu-latest
needs: [rust, rust-cross, typescript]
needs: [rust, rust-cross, typescript, typo-check]
steps:
- name: Mark the job as a failure
run: exit 1
4 changes: 2 additions & 2 deletions src/tools/rust-analyzer/.github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
- os: ubuntu-20.04
target: arm-unknown-linux-gnueabihf
code-target: linux-armhf
- os: macos-11
- os: macos-12
target: x86_64-apple-darwin
code-target: darwin-x64
- os: macos-11
- os: macos-12
target: aarch64-apple-darwin
code-target: darwin-arm64

Expand Down
31 changes: 31 additions & 0 deletions src/tools/rust-analyzer/.typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[default.extend-identifiers]
AnserStyle = "AnserStyle"
datas = "datas"
impl_froms = "impl_froms"
selfs = "selfs"

[default.extend-words]
anser = "anser"
ba = "ba"
fo = "fo"
ket = "ket"
makro = "makro"
raison = "raison"
trivias = "trivias"
TOOD = "TOOD"

[default]
extend-ignore-re = [
# ignore string which contains $x (x is a num), which use widely in test
".*\\$\\d.*",
# ignore generated content like `boxed....nner()`, `Defaul...efault`
"\\w*\\.{3,4}\\w*",
]

[files]
extend-exclude = [
"*.json",
"*.rast",
"crates/parser/test_data/lexer/err/*",
"bench_data/*",
]
75 changes: 53 additions & 22 deletions src/tools/rust-analyzer/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"

[[package]]
name = "always-assert"
version = "0.1.3"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4436e0292ab1bb631b42973c61205e704475fe8126af845c8d923c0996328127"
checksum = "a1078fa1ce1e34b1872d8611ad921196d76bdd7027e949fbe31231abde201892"
dependencies = [
"log",
"tracing",
]

[[package]]
Expand Down Expand Up @@ -78,6 +78,7 @@ dependencies = [
"span",
"stdx",
"syntax",
"tracing",
"triomphe",
"vfs",
]
Expand Down Expand Up @@ -494,8 +495,10 @@ dependencies = [
"profile",
"rustc-hash",
"smallvec",
"span",
"stdx",
"syntax",
"tracing",
"triomphe",
"tt",
]
Expand Down Expand Up @@ -592,7 +595,7 @@ dependencies = [
"profile",
"project-model",
"ra-ap-rustc_abi",
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.35.0",
"ra-ap-rustc_pattern_analysis",
"rustc-hash",
"scoped-tls",
Expand Down Expand Up @@ -670,6 +673,7 @@ dependencies = [
"test-fixture",
"test-utils",
"text-edit",
"tracing",
]

[[package]]
Expand All @@ -690,6 +694,7 @@ dependencies = [
"test-fixture",
"test-utils",
"text-edit",
"tracing",
]

[[package]]
Expand Down Expand Up @@ -747,6 +752,7 @@ dependencies = [
"test-fixture",
"test-utils",
"text-edit",
"tracing",
]

[[package]]
Expand Down Expand Up @@ -1342,6 +1348,7 @@ dependencies = [
"once_cell",
"perf-event",
"tikv-jemalloc-ctl",
"tracing",
"winapi",
]

Expand Down Expand Up @@ -1419,12 +1426,12 @@ dependencies = [

[[package]]
name = "ra-ap-rustc_abi"
version = "0.33.0"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ce9100fc66c6c60aeeb076868ead9c2eaa65d6a5a90404f08c242327a92ff4b"
checksum = "3c0baa423a2c2bfd6e4bd40e7215f7ddebd12a649ce0b65078a38b91068895aa"
dependencies = [
"bitflags 2.4.1",
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.35.0",
"tracing",
]

Expand All @@ -1435,7 +1442,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e5313d7f243b63ef9e58d94355b11aa8499f1328055f1f58adf0a5ea7d2faca"
dependencies = [
"arrayvec",
"ra-ap-rustc_index_macros",
"ra-ap-rustc_index_macros 0.33.0",
"smallvec",
]

[[package]]
name = "ra-ap-rustc_index"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "322b751895cc4a0a2ee0c6ab36ec80bc8abf5f8d76254c482f96f03c27c92ebe"
dependencies = [
"arrayvec",
"ra-ap-rustc_index_macros 0.35.0",
"smallvec",
]

Expand All @@ -1451,23 +1469,35 @@ dependencies = [
"synstructure",
]

[[package]]
name = "ra-ap-rustc_index_macros"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "054e25eac52f0506c1309ca4317c11ad4925d7b99eb897f71aa7c3cbafb46c2b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.39",
"synstructure",
]

[[package]]
name = "ra-ap-rustc_lexer"
version = "0.33.0"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2d221356e5717595e8a0afa5fba1620dcb4032ab784dc4d98fdc7284e3feb66"
checksum = "c8da0fa51a1a97ba4296a1c78fa454815a153b472e2546b6338a0902ad59e015"
dependencies = [
"unicode-properties",
"unicode-xid",
]

[[package]]
name = "ra-ap-rustc_parse_format"
version = "0.33.0"
version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab62fc925612374103b4f178da347b535b35d9eb1ff5ba42105c990b2e25a164"
checksum = "3851f930a54adcb76889983dcd5c00a0c4e206e190e1384dbc00d49b82dfb45e"
dependencies = [
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.35.0",
"ra-ap-rustc_lexer",
]

Expand All @@ -1478,7 +1508,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c4085e0c771fd4b883930b599ef42966b855762bbe4052c17673b3253421a6d"
dependencies = [
"derivative",
"ra-ap-rustc_index",
"ra-ap-rustc_index 0.33.0",
"rustc-hash",
"rustc_apfloat",
"smallvec",
Expand Down Expand Up @@ -1581,7 +1611,6 @@ dependencies = [
"tikv-jemallocator",
"toolchain",
"tracing",
"tracing-log",
"tracing-subscriber",
"tracing-tree",
"triomphe",
Expand All @@ -1595,26 +1624,26 @@ dependencies = [

[[package]]
name = "rust-analyzer-salsa"
version = "0.17.0-pre.5"
version = "0.17.0-pre.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca9d387a9801f4fb9b366789ad1bfc08448cafc49cf148d907cfcd88ab665d7f"
checksum = "719825638c59fd26a55412a24561c7c5bcf54364c88b9a7a04ba08a6eafaba8d"
dependencies = [
"indexmap",
"lock_api",
"log",
"oorandom",
"parking_lot",
"rust-analyzer-salsa-macros",
"rustc-hash",
"smallvec",
"tracing",
"triomphe",
]

[[package]]
name = "rust-analyzer-salsa-macros"
version = "0.17.0-pre.5"
version = "0.17.0-pre.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a2035f385d7fae31e9b086f40b272ee1d79c484472f31c9a10348a406e841eaf"
checksum = "4d96498e9684848c6676c399032ebc37c52da95ecbefa83d71ccc53b9f8a4a8e"
dependencies = [
"heck",
"proc-macro2",
Expand Down Expand Up @@ -1661,9 +1690,9 @@ dependencies = [

[[package]]
name = "scip"
version = "0.3.1"
version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e84d21062a3ba08d58870c8c36b0c005b2b2261c6ad1bf7042585427c781883"
checksum = "e5dc1bd66649133af84ab62436ddd2856c2605182b02dec2cd197f684dfe15ef"
dependencies = [
"protobuf",
]
Expand Down Expand Up @@ -1863,6 +1892,7 @@ dependencies = [
"stdx",
"test-utils",
"text-edit",
"tracing",
"triomphe",
"ungrammar",
]
Expand Down Expand Up @@ -1890,6 +1920,7 @@ dependencies = [
"rustc-hash",
"stdx",
"text-size",
"tracing",
]

[[package]]
Expand Down
31 changes: 8 additions & 23 deletions src/tools/rust-analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ tt = { path = "./crates/tt", version = "0.0.0" }
vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }

ra-ap-rustc_lexer = { version = "0.33.0", default-features = false }
ra-ap-rustc_parse_format = { version = "0.33.0", default-features = false }
ra-ap-rustc_index = { version = "0.33.0", default-features = false }
ra-ap-rustc_abi = { version = "0.33.0", default-features = false }
ra-ap-rustc_lexer = { version = "0.35.0", default-features = false }
ra-ap-rustc_parse_format = { version = "0.35.0", default-features = false }
ra-ap-rustc_index = { version = "0.35.0", default-features = false }
ra-ap-rustc_abi = { version = "0.35.0", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.33.0", default-features = false }

# local crates that aren't published to crates.io. These should not have versions.
Expand Down Expand Up @@ -113,7 +113,7 @@ itertools = "0.12.0"
libc = "0.2.150"
nohash-hasher = "0.2.0"
rayon = "1.8.0"
rust-analyzer-salsa = "0.17.0-pre.5"
rust-analyzer-salsa = "0.17.0-pre.6"
rustc-hash = "1.1.0"
semver = "1.0.14"
serde = { version = "1.0.192", features = ["derive"] }
Expand All @@ -128,9 +128,9 @@ text-size = "1.1.1"
tracing = "0.1.40"
tracing-tree = "0.3.0"
tracing-subscriber = { version = "0.3.18", default-features = false, features = [
"registry",
"fmt",
"tracing-log",
"registry",
"fmt",
"tracing-log",
] }
triomphe = { version = "0.1.10", default-features = false, features = ["std"] }
xshell = "0.2.5"
Expand Down Expand Up @@ -167,29 +167,14 @@ new_ret_no_self = "allow"

## Following lints should be tackled at some point
borrowed_box = "allow"
borrow_deref_ref = "allow"
derivable_impls = "allow"
derived_hash_with_manual_eq = "allow"
field_reassign_with_default = "allow"
forget_non_drop = "allow"
format_collect = "allow"
large_enum_variant = "allow"
needless_doctest_main = "allow"
new_without_default = "allow"
non_canonical_clone_impl = "allow"
non_canonical_partial_ord_impl = "allow"
self_named_constructors = "allow"
skip_while_next = "allow"
too_many_arguments = "allow"
toplevel_ref_arg = "allow"
type_complexity = "allow"
unnecessary_cast = "allow"
unnecessary_filter_map = "allow"
unnecessary_lazy_evaluations = "allow"
unnecessary_mut_passed = "allow"
useless_conversion = "allow"
useless_format = "allow"
wildcard_in_or_patterns = "allow"
wrong_self_convention = "allow"

## warn at following lints
Expand Down
Loading

0 comments on commit bc98f57

Please sign in to comment.