Skip to content

Commit

Permalink
Auto merge of #137959 - matthiaskrgr:rollup-62vjvwr, r=matthiaskrgr
Browse files Browse the repository at this point in the history
Rollup of 12 pull requests

Successful merges:

 - #135767 (Future incompatibility warning `unsupported_fn_ptr_calling_conventions`: Also warn in dependencies)
 - #137852 (Remove layouting dead code for non-array SIMD types.)
 - #137863 (Fix pretty printing of unsafe binders)
 - #137882 (do not build additional stage on compiler paths)
 - #137894 (Revert "store ScalarPair via memset when one side is undef and the other side can be memset")
 - #137902 (Make `ast::TokenKind` more like `lexer::TokenKind`)
 - #137921 (Subtree update of `rust-analyzer`)
 - #137922 (A few cleanups after the removal of `cfg(not(parallel))`)
 - #137939 (fix order on shl impl)
 - #137946 (Fix docker run-local docs)
 - #137955 (Always allow rustdoc-json tests to contain long lines)
 - #137958 (triagebot.toml: Don't label `test/rustdoc-json` as A-rustdoc-search)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Mar 4, 2025
2 parents c001c2a + fdb93c1 commit 98c2b4c
Show file tree
Hide file tree
Showing 207 changed files with 5,985 additions and 4,207 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/autopublish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

jobs:
publish:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 22
if: needs.changes.outputs.typescript == 'true'

- name: Install xvfb
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ env:

jobs:
rust:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: Rust
runs-on: ubuntu-latest
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-libs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
publish-libs:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
steps:
Expand Down
59 changes: 27 additions & 32 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ env:
RUSTUP_MAX_RETRIES: 10
FETCH_DEPTH: 0 # pull in the tags for the version string
MACOSX_DEPLOYMENT_TARGET: 13.0
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABIHF_LINKER: arm-linux-gnueabihf-gcc
ZIG_VERSION: 0.13.0
ZIGBUILD_VERSION: 0.19.8

jobs:
dist:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
include:
Expand All @@ -36,13 +36,15 @@ jobs:
code-target: win32-arm64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
zig_target: x86_64-unknown-linux-gnu.2.28
code-target: linux-x64
container: rockylinux:8
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
zig_target: aarch64-unknown-linux-gnu.2.28
code-target: linux-arm64
- os: ubuntu-latest
target: arm-unknown-linux-gnueabihf
zig_target: arm-unknown-linux-gnueabihf.2.28
code-target: linux-armhf
- os: macos-13
target: x86_64-apple-darwin
Expand All @@ -64,40 +66,33 @@ jobs:
with:
fetch-depth: ${{ env.FETCH_DEPTH }}

- name: Install toolchain dependencies
if: matrix.container == 'rockylinux:8'
shell: bash
run: |
dnf install -y gcc
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --profile minimal --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
- name: Install Node.js toolchain
uses: actions/setup-node@v4
with:
node-version: 22

- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup target add ${{ matrix.target }}
rustup component add rust-src
rustup target add ${{ matrix.target }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Update apt repositories
if: matrix.target == 'aarch64-unknown-linux-gnu' || matrix.target == 'arm-unknown-linux-gnueabihf'
run: sudo apt-get update

- name: Install AArch64 target toolchain
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: sudo apt-get install gcc-aarch64-linux-gnu

- name: Install ARM target toolchain
if: matrix.target == 'arm-unknown-linux-gnueabihf'
run: sudo apt-get install gcc-arm-linux-gnueabihf
- name: Install Zig toolchain
if: ${{ matrix.zig_target }}
run: |
which cargo
curl -L "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-$(uname -m)-${ZIG_VERSION}.tar.xz" | sudo tar JxC /usr/local
sudo ln -s "/usr/local/zig-linux-$(uname -m)-${ZIG_VERSION}/zig" /usr/local/bin/zig
curl -L "https://github.com/rust-cross/cargo-zigbuild/releases/download/v${ZIGBUILD_VERSION}/cargo-zigbuild-v${ZIGBUILD_VERSION}.x86_64-unknown-linux-musl.tar.gz" | tar zxC ~/.cargo/bin
- name: Dist
- name: Dist (plain)
if: ${{ !matrix.zig_target }}
run: cargo xtask dist --client-patch-version ${{ github.run_number }}

- name: Dist (using zigbuild)
if: ${{ matrix.zig_target }}
run: RA_TARGET=${{ matrix.zig_target}} cargo xtask dist --client-patch-version ${{ github.run_number }} --zig

- run: npm ci
working-directory: editors/code

Expand Down Expand Up @@ -139,7 +134,7 @@ jobs:
path: ./dist

dist-x86_64-unknown-linux-musl:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: dist (x86_64-unknown-linux-musl)
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -185,15 +180,15 @@ jobs:
path: ./dist

publish:
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event.action == 'workflow_dispatch' }}
if: ${{ github.repository == 'rust-lang/rust-analyzer' || github.event_name == 'workflow_dispatch' }}
name: publish
runs-on: ubuntu-latest
needs: ["dist", "dist-x86_64-unknown-linux-musl"]
steps:
- name: Install Nodejs
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- run: echo "TAG=$(date --iso -u)" >> $GITHUB_ENV
if: github.ref == 'refs/heads/release'
Expand Down
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ extend-ignore-re = [
"INOUT",
"optin",
"=Pn",
# ignore `// spellchecker:off` until `// spellchecker:on`
"(?s)(#|//)\\s*spellchecker:off.*?\\n\\s*(#|//)\\s*spellchecker:on",
]

[default.extend-words]
Expand Down
33 changes: 15 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ salsa.opt-level = 3
miniz_oxide.opt-level = 3

[profile.release]
incremental = true
# Set this to 1 or 2 to get more useful backtraces in debugger.
debug = 0

Expand Down Expand Up @@ -86,12 +85,12 @@ vfs-notify = { path = "./crates/vfs-notify", version = "0.0.0" }
vfs = { path = "./crates/vfs", version = "0.0.0" }
edition = { path = "./crates/edition", version = "0.0.0" }

ra-ap-rustc_hashes = { version = "0.97", default-features = false }
ra-ap-rustc_lexer = { version = "0.97", default-features = false }
ra-ap-rustc_parse_format = { version = "0.97", default-features = false }
ra-ap-rustc_index = { version = "0.97", default-features = false }
ra-ap-rustc_abi = { version = "0.97", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.97", default-features = false }
ra-ap-rustc_hashes = { version = "0.98", default-features = false }
ra-ap-rustc_lexer = { version = "0.98", default-features = false }
ra-ap-rustc_parse_format = { version = "0.98", default-features = false }
ra-ap-rustc_index = { version = "0.98", default-features = false }
ra-ap-rustc_abi = { version = "0.98", default-features = false }
ra-ap-rustc_pattern_analysis = { version = "0.98", default-features = false }

# local crates that aren't published to crates.io. These should not have versions.

Expand Down
1 change: 0 additions & 1 deletion crates/base-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true

[lib]
doctest = false

[dependencies]
lz4_flex = { version = "0.11", default-features = false }
Expand Down
1 change: 0 additions & 1 deletion crates/cfg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true

[lib]
doctest = false

[dependencies]
rustc-hash.workspace = true
Expand Down
1 change: 0 additions & 1 deletion crates/hir-def/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ license.workspace = true
rust-version.workspace = true

[lib]
doctest = false

[dependencies]
arrayvec.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion crates/hir-def/src/dyn_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
//!
//! It is used like this:
//!
//! ```
//! ```ignore
//! # use hir_def::dyn_map::DynMap;
//! # use hir_def::dyn_map::Key;
//! // keys define submaps of a `DynMap`
//! const STRING_TO_U32: Key<String, u32> = Key::new();
//! const U32_TO_VEC: Key<u32, Vec<bool>> = Key::new();
Expand Down
6 changes: 3 additions & 3 deletions crates/hir-def/src/item_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,20 +883,20 @@ pub struct UseTree {

#[derive(Debug, Clone, Eq, PartialEq)]
pub enum UseTreeKind {
/// ```
/// ```ignore
/// use path::to::Item;
/// use path::to::Item as Renamed;
/// use path::to::Trait as _;
/// ```
Single { path: Interned<ModPath>, alias: Option<ImportAlias> },

/// ```
/// ```ignore
/// use *; // (invalid, but can occur in nested tree)
/// use path::*;
/// ```
Glob { path: Option<Interned<ModPath>> },

/// ```
/// ```ignore
/// use prefix::{self, Item, ...};
/// ```
Prefixed { prefix: Option<Interned<ModPath>>, list: Box<[UseTree]> },
Expand Down
10 changes: 7 additions & 3 deletions crates/hir-def/src/macro_expansion_tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use hir_expand::{
db::ExpandDatabase,
proc_macro::{ProcMacro, ProcMacroExpander, ProcMacroExpansionError, ProcMacroKind},
span_map::SpanMapRef,
InFile, MacroCallKind, MacroFileId, MacroFileIdExt,
InFile, MacroCallKind, MacroFileId, MacroFileIdExt, MacroKind,
};
use intern::Symbol;
use itertools::Itertools;
Expand Down Expand Up @@ -211,7 +211,11 @@ pub fn identity_when_valid(_attr: TokenStream, item: TokenStream) -> TokenStream

if let Some(src) = src {
if let Some(file_id) = src.file_id.macro_file() {
if file_id.is_attr_macro(&db) || file_id.is_custom_derive(&db) {
if let MacroKind::Derive
| MacroKind::DeriveBuiltIn
| MacroKind::Attr
| MacroKind::AttrBuiltIn = file_id.kind(&db)
{
let call = file_id.call_node(&db);
let mut show_spans = false;
let mut show_ctxt = false;
Expand All @@ -236,7 +240,7 @@ pub fn identity_when_valid(_attr: TokenStream, item: TokenStream) -> TokenStream
for impl_id in def_map[local_id].scope.impls() {
let src = impl_id.lookup(&db).source(&db);
if let Some(macro_file) = src.file_id.macro_file() {
if macro_file.is_builtin_derive(&db) {
if let MacroKind::DeriveBuiltIn | MacroKind::Derive = macro_file.kind(&db) {
let pp = pretty_print_macro_expansion(
src.value.syntax().clone(),
db.span_map(macro_file.into()).as_ref(),
Expand Down
2 changes: 1 addition & 1 deletion crates/hir-def/src/nameres/mod_resolution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl DirPath {
/// So this is the case which doesn't really work I think if we try to be
/// 100% platform agnostic:
///
/// ```
/// ```ignore
/// mod a {
/// #[path="C://sad/face"]
/// mod b { mod c; }
Expand Down
Loading

0 comments on commit 98c2b4c

Please sign in to comment.