From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 7D2942EBB84 for ; Tue, 25 Nov 2025 09:38:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764063513; cv=none; b=NHwD9U81z6UWBTRD4PZvANgyzlScUwAWtJauhgCntfx5LwOx0SEsWyTO0mhOYfNcXtzpJjuwwy71+MXu7Jor7Dti1SZwDq2KJjWrbCxP2s1t/Q6kE/APr6dS72h63SobSZ8R0hDhw2piWZsL3u3dUUtE41QIOZaOMNQWWA2w2IY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764063513; c=relaxed/simple; bh=PzyJCo0NMDC3zrGjoc3Af43gFBEssNp6mXzXvVML1Ng=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lALFo/UQ/520vHWcPb94w6DfUOPjSmbxjpjhycPO3y4C0X+yZaFfQAMDvXRFdL/atPrL8BoaI4nQZ03HCvpSe5j0xBj4xnYpdQZc3yFE/nJC0+4xcagixgY3rJx+0WQDeoXZBqG87IvTrKZ8NVEl8a5Q3U10xfsdh7BCoxAX2eM= 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=fk03Eece; arc=none smtp.client-ip=209.85.214.176 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="fk03Eece" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-29808a9a96aso60707415ad.1 for ; Tue, 25 Nov 2025 01:38:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764063511; x=1764668311; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3kvg2CC0/0PmPD+bUYi5OSZ99SQYfWFsx9xU/p31vcY=; b=fk03EeceQru1mFcjw70hm5x2Mgh1gzMFAddDOqJZGZSgEx7SD7K39AroX5EGRM4HHb VbXv8tpQt4724W5aXg0Hu2Qd/GEGC5YxUOPrgc+CFRa7JMLPQiYBKy8E5MPdz4Ov+yCp IwEaMO85Aqtz7Lb0s9hRxsiRg02xi5jWeamDA6wm02yeHCHhGyYJZM8zKpMOKKK8RS+G obhWhYMEKSSiMF3t0TAcn59H46bBWV1QVOzL1kzNMJamK1EeXYvsufB+T2l02vzRAidH Sr0aQCS1JjNgeKwiv1ENh9/ICQ1iV38pydS9Szu0DoyeEf16r2cIU42+crZNebgTn8Kr EKyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764063511; x=1764668311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3kvg2CC0/0PmPD+bUYi5OSZ99SQYfWFsx9xU/p31vcY=; b=IUjFz1ttd1uQfwI0W7PVjm4hOgc604uVcLJcwwLv/sm20icr4RDbt0cyXwLRlYYVmD 8FY4DdtKe37t0KIyeNLYpIcKGkIlmQOB9g/FzZPFpmG11HwE0w0MNka/yRzZHeBBSXvp hNanE4iK9Z06csIwVmeS0LkDUxT4fAUxq4kYUaOuQzNaVXXZhC5iqb3WW/+QgeuKjJo/ 47vXLxjUcCN0kWxAEgKfwIrVmapzyT9TODmZntm/7d2w38E3VahOUHC7WeemhSV7a+pd sPvKoHXoOjJ+bbgptFcU/wtR+kjp42F0JIA/FUyAMlfJ/oTyYbCy2I2zmkbAD2j0+sF/ WqvA== X-Forwarded-Encrypted: i=1; AJvYcCWBqGvBFxchRiYEU9BCwmK6EmUEWGaKdVAWfiBUoWGM4Ktrswp8iiFIb3q0TwS/34WrCOpBdK/dYCKlW+Q=@vger.kernel.org X-Gm-Message-State: AOJu0YyyGDqxHn6CyuzhmFsnGyi2enWqDQsmVG8wj0KZpd6mY5Rta4DT mwLSYCf7kpuTwf/c9BjuFabs5B9RrdSsbLNfwc5rvs7PjNbu/L01+5S2VCT6xA== X-Gm-Gg: ASbGnct8dKc7iR9vIvXMIE1guKeos7PX1n3sgSaWXBMRvH8cYJdrbmFN4XYeprHcMOP T184x/HNTZF2CX/xb65JecROyyqj+ahsOrpBsR8eZZsjRSWHRK74NBELoFqFyOYbrYkYRleMH9L wc+O0I2PHLoBLcDUGCr80j0srfEu8KNAy/DNTD06l5XnBL/PzHPE/7Of0hLQaX4ODk8mafE1JIK TN1lqWij9Xld3dFksq3xErbwiaStgEBoNuvugW3tQFrUx0MWm+o2JQRztWv5uGpZA/mRykUpJGe GzDYoJicdA6sz66Q9RRnGEUEwMqoQDc4s48z0FRGuGE9GBO7Y85NEbKN9NJedcayB+o7VcpxD6y d8pss1VqUercvHAR5kCWb3F99Osm4/QsQWMbLHHp/IMZxfeoPjnibCKOlzscB8kLVTYerQeq3ks OV1YiQd+UmdnoJPDPcTw//MRE60dono4OU X-Google-Smtp-Source: AGHT+IGDZyxuVTVY/bzA2yeS86Pm1DIgZCtnxsJ+F9ZKGd59POWb9qoDVQdCxfHQiEF4RzOy29ipqQ== X-Received: by 2002:a17:903:440c:b0:297:d697:41e with SMTP id d9443c01a7336-29b6bf3b588mr174847565ad.37.1764063510703; Tue, 25 Nov 2025 01:38:30 -0800 (PST) Received: from localhost.localdomain ([104.28.217.218]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-29b5b13de62sm162581935ad.36.2025.11.25.01.38.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Nov 2025 01:38:30 -0800 (PST) From: Jesung Yang To: Miguel Ojeda Cc: Boqun Feng , Gary Guo , =?UTF-8?q?Bj=C3=B6rn=20Roy=20Baron?= , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, Jesung Yang Subject: [PATCH 2/2] rust: quote: make rust-analyzer treat `core` and `std` as dependencies Date: Tue, 25 Nov 2025 09:33:00 +0000 Message-ID: X-Mailer: git-send-email 2.47.3 In-Reply-To: <6dbdf6e1c1639ae381ca9ab7041f84728ffa2267.1764062688.git.y.j3ms.n@gmail.com> References: <6dbdf6e1c1639ae381ca9ab7041f84728ffa2267.1764062688.git.y.j3ms.n@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Fix the `generate_rust_analyzer.py` script to ensure that the `rust-project.json` it produces includes `core` and `std` in the `deps` field for the `quote` crate. `quote` directly references items from both `core` and `std`, so rust-analyzer should treat them as dependencies to provide correct IDE support. For example, the `::quote::ToTokens` trait is implemented for `std::ffi::CString`. With `std` listed in the `deps` field, rust-analyzer can show the expected autocomplete for the `::quote::ToTokens` methods on `std::ffi::CString`. Verified the explicit uses of `core` and `std` using: grep -rnE 'core::|std::' rust/quote/ Fixes: 88de91cc1ce7 ("rust: quote: enable support in kbuild") Signed-off-by: Jesung Yang --- Unlike [PATCH 1/2], this change doesn't seem to offer a noticeable benefit at the moment, but I've included it for completeness. --- scripts/generate_rust_analyzer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py index 3b169904ee41..b8080febc4bd 100755 --- a/scripts/generate_rust_analyzer.py +++ b/scripts/generate_rust_analyzer.py @@ -96,7 +96,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs, core_edit append_crate( "quote", srctree / "rust" / "quote" / "lib.rs", - ["alloc", "proc_macro", "proc_macro2"], + ["core", "alloc", "std", "proc_macro", "proc_macro2"], cfg=crates_cfgs["quote"], ) -- 2.47.3