From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f193.google.com (mail-pf1-f193.google.com [209.85.210.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 568E36FC3 for ; Sat, 24 Jan 2026 05:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.193 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769230810; cv=none; b=ZbPxGHrDcjrOol2YWSAYwYPT/Q8T+AQ2RNVm+fkqDka2beFrWudcHoqaeIrwuKTPUiAkSzcI8vmlBubfBJEh4S92zYGMtSuq7Y1VYofOV4DbTvIVKGuyEWpLk+2uJoqBQGTBUUGJGLTl2qtfNJaef1l0fbG1/Z4pIQFltOfCXQg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769230810; c=relaxed/simple; bh=JAYk98kNhc2Awngl+QSq4p+BT0oGKfb8R1JBOMRKjig=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Cc:Subject: References:In-Reply-To; b=sh2hdWDyi9SpkdEATEt5foy/86EiAhJlCZQNYtCsCUw64FQDXX9SZelJkmjtRjcbkfmyJ8SjfXh3DkybNPWMBCOnUlvKMgSko0SK+SHNqtVmgagyJxQKmDZRSt6Ejp8N3H0U30Fm8BD8URWGsdBVeP7bAmqif6PIhzp4dEC+kok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NTehVCLm; arc=none smtp.client-ip=209.85.210.193 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NTehVCLm" Received: by mail-pf1-f193.google.com with SMTP id d2e1a72fcca58-8217f2ad01eso2673519b3a.2 for ; Fri, 23 Jan 2026 21:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769230809; x=1769835609; darn=vger.kernel.org; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=r0oMptKZnPoc3jSB5+lH8abtIhg7pHGO46z434wdV4I=; b=NTehVCLmTzveW2BDpaIwlj13YUGg/b1IEtQn2XiqyiiMvds5Isny/9c6oJL/dSyBLi 0UQ0sr0zxAWSo8MonzgDFrWMLe3MJ4raPDhDpQD9zNjqgZ3L4D1f3ik1y9tD7pEQcQkn CNaolnb33YVnsWHFmWe3FAL5sVRMoWt+9BC1Gs2DNraFpQcSPlYRTRPmDZaamS0jBL2r vnxlUJDTn+8Q48urgtBZj74/q11wNeNO7mu9AxPJFUlQ1hcyYWrGVe+yrMaBe/0sWKMY DWpk0Vw5ofxbv5CMTi34sFCn7Nr1FCTsadqL/Te6olef5an1VGJh84QWrncnZILBTYvl SRBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769230809; x=1769835609; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r0oMptKZnPoc3jSB5+lH8abtIhg7pHGO46z434wdV4I=; b=ZxTGDNipJYkerQJNxIGW1RYoN/2V3JOllgtKFy5+4v3PYvSVSMsRuQ0sk8dpvUXTYC BlU6c8RQVhORMUAQG/2M4yMv+OEjyALZLkLOMLsI6+HoLBwL3tN/GhjRhfvqW41/fkhO 00UpSOR8Kh04THQAp+uz6tNJ+/NanYsEZK6M83sgcLjtiZ6RJGGlf3HAQLMCN3XGTCUk 9UzKfsEPY4RLGQa1M7lQJKBuVTtkbwlkZN8J3zpkR/I0EGEP1ZD3joViEgyg5NKeDwWb SZbuRRVY1XQ3cDqtDN9QLYDUWOoXtxYZ7NGK0ySKcHhI1aVPmK6uPjMLNgzgO6ESm4Ip mAXQ== X-Forwarded-Encrypted: i=1; AJvYcCUJMSHu3sypSFs9M6VPHSVQ3HlfrCPKe3QxoW71Je9zmsslteMxNtr7pX5qX9K73dKZm/vJWUw+8k7moEg=@vger.kernel.org X-Gm-Message-State: AOJu0YzSAVflBBJiWg9zyh4m1yRdvL0gnaul/OdBzrtAWFTzJL+154jO HjpTVRq6ZoQ7taIx6S5IBsN1c5lbXezq3jmfjGtJbg9KegLN6oKbc3YZDtc0Qc6hSL8= X-Gm-Gg: AZuq6aIOECa8+dwSKvxKWuo5vv/RDCJ1OToJUMxQYyeiUWjVZQOit4S24tVHbXHlr7a T4AMar1fQlUxhc1KSR1NUWe5xj6t0zLnJrNbhNQIOiI0ozNAYjDn3SNTv3WLIcPfwko92I9l9xH EAJHX05IKy8Ww0Sw3QpH36qUiDyQap+pwWWV2zu7xcAAAnrCxOxLevJhUTHCD2e1NiKhJvPSw/+ Pa4eV1tOgrlS7G0i8TWr/NgT774BJzxe9EF0Ct8DwKRZlq0r5rHVaW0liN5alWWtmsujIYfQVzx TJYicxIS0uHGl9ps4HhPZ9Xl0uzxwRUqTcUoa1DqDqJQHCAMgSJFQokB4jx8luccorX7NrOtA4p 5BLjJJeG6WiYlc5HOP7WECy56nJT2dl0uVHkcB9UJmd3If6xnW5XZnkoQhKEN+cGl5VKNDjgtWg cPA5EbvA== X-Received: by 2002:a05:6a00:148a:b0:81f:b3ce:17a3 with SMTP id d2e1a72fcca58-82317ecd3e0mr4584439b3a.48.1769230808558; Fri, 23 Jan 2026 21:00:08 -0800 (PST) Received: from localhost ([112.149.32.52]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-82318770179sm3481986b3a.67.2026.01.23.21.00.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Jan 2026 21:00:08 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 24 Jan 2026 14:00:04 +0900 Message-Id: From: "Jesung Yang" To: =?utf-8?q?=ED=95=98=EC=8A=B9=EC=A2=85?= , "Jesung Yang" Cc: "Miguel Ojeda" , "Boqun Feng" , "Gary Guo" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Andreas Hindborg" , "Alice Ryhl" , "Trevor Gross" , "Danilo Krummrich" , "Tamir Duberstein" , , Subject: Re: [PATCH v2] scripts: generate_rust_analyzer: fix resolution of #[pin_data] macros X-Mailer: aerc 0.21.0 References: <20260123-fix-pin-init-crate-dependecies-v2-1-bb1c2500e54c@gmail.com> In-Reply-To: On Sat Jan 24, 2026 at 11:14 AM KST, =ED=95=98=EC=8A=B9=EC=A2=85 wrote: > 2026=EB=85=84 1=EC=9B=94 24=EC=9D=BC (=ED=86=A0) AM 9:43, Jesung Yang =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: [...] >> Perhaps I'm missing something, but I wasn't able to reproduce this >> problem (which I think is expected as the `kernel` crate already depends >> on `pin_init`) with the following setup: >> >> Tree: linux-next (next-20260122) [1] >> (includes latest changes from `rust-fixes` and `pin-init-next`) >> Files: samples/rust/rust_*.rs, specifically rust_configfs.rs >> rust-analyzer: 2024-04-29 (which corresponds to our MSRV), 2026-01-12 >> >> Could you share your environment details and a minimal reproducible >> example? > > Sure! Here are the details of my environment: > Tree: rust-fixes (commit a44bfed) [2] > rust-analyzer: The latest stable release (managed by the Zed IDE > default channel). > > verified the issue with the following modules: > - samples/rust/rust_configfs.rs > - drivers/block/rnull/rnull.rs > > My reproduction steps were: > 1. Without the patch: Hovering over structs annotated with #[pin_data] > (e.g., RustConfigfs, NullBlkModule) provided no information/diagnostics. > 2. "Go to Definition" on those symbols also failed to locate the definiti= on. > 3. After applying this patch and restarting the LSP server, both > actions succeeded. I've discovered that rust-analyzer fails to resolve `#[pin_data]`-annotated structs if (and only if) we compile our proc-macros, which essentially feeds `*.so` files to rust-analyzer. If we don't compile anything, it resolves those structs correctly (despite some diagnostic errors, if enabled). This issue appears to be related to rust-analyzer's proc-macro expansion logic, but anyway, this simple patch restores the IDE functionality. So, Reviewed-by: Jesung Yang Thanks! Best regards, Jesung