From nobody Mon Feb 9 10:32:35 2026 Received: from gu.d.sender-sib.com (gu.d.sender-sib.com [77.32.148.22]) (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 6009641A84 for ; Sun, 14 Apr 2024 13:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=77.32.148.22 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713100899; cv=none; b=OgbjsKoh12PeUdEzexw4EtTju4kRIh/xxoOWhJjAPYzmHuxdJTSp6aFLexZqT0r8YjKElMdv8IQClWPcTS/2Nuo86SZi0qh0Q/r39/O2d953nGCnK+aXdCJGkGIae/IT5ieE+cqpoJxc8lBSPpzCwDLYTLnVP+WDHBKpgraWUjo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713100899; c=relaxed/simple; bh=TD6uMI7QAWgg3XSqO08rarrvGml8Sx7m6ell7wkf6CU=; h=Date:Subject:Mime-Version:Message-Id:To:From; b=uOYHdjuD0me9p+Z2i3cfb9Okwqtl1+XDg+Z5jgCczNvcbIYjaXo6U9QGaLWgWEPS3NpeZcthAHppBurObQG8tpUehEJHTRDrtiuB9l+RJ0kwnrPiYddLXbX1zDQ36i0aeJ2+uqZ4UuKoInHdoy1hFbpDjltFfVG+udLf10neIDg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raxyte.com; spf=pass smtp.mailfrom=gu.d.sender-sib.com; dkim=pass (1024-bit key) header.d=raxyte.com header.i=@raxyte.com header.b=pAaePoZO; arc=none smtp.client-ip=77.32.148.22 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=raxyte.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gu.d.sender-sib.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=raxyte.com header.i=@raxyte.com header.b="pAaePoZO" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raxyte.com; q=dns/txt; s=mail; bh=CRndFbjNIKMcK8zR6tbvt/PU4cTYUy67e6MOk0bjXFY=; h=from:subject:date:to:mime-version:content-transfer-encoding:x-csa-complaints:list-unsubscribe-post; b=pAaePoZOskZ9WmQ4QnxPKvkkeS6BJy+KJFQHrN0agCfWt/jKUc2I9adcEsEM32NB+mvU8WW9AVfo cmQfP9EOE3cTXI2+HLasz4OpdIZs1hici6RMcc3wuxJk5trW41oy+W4pDzqpXL3GHDZyNNEnE4zt NiHMwNO0gJh/HT36XEs= Received: by smtp-relay.sendinblue.com with ESMTP id ca7b5992-61ae-4353-adcb-f81d7ca12f0d; Sun, 14 April 2024 13:20:26 +0000 (UTC) X-Mailin-EID: MjY2MTUxODYyfmxpbnV4LWtlcm5lbEB2Z2VyLmtlcm5lbC5vcmd%2BPDIwMjQwNDE0MTMxOTI4Ljg0NjYyNS0xLWRldkByYXh5dGUuY29tPn5ndS5kLnNlbmRlci1zaWIuY29t Date: Sun, 14 Apr 2024 18:49:28 +0530 Subject: [PATCH] rust: update `dbg!()` to format column number X-Mailer: git-send-email 2.44.0 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 Message-Id: Origin-messageId: <20240414131928.846625-1-dev@raxyte.com> To: ,,,,,,,,,,, X-sib-id: tx-3UtHO3ro1AhphuDfZo2H2csw-KDWx18r1_y-zyyD5k6CBR-0p500iirHn-_v0t4umZi7PYt2f15O1HmJwVEJPKp57WmmDcEK1IU68I_hGnw1J8LFCP_QFUKvIklq1W1KzzL4FvIrfFzmiQSjSmNkFuSb_tcqzUNdOpEvMCmWCKCFJ-4XnqmTM X-CSA-Complaints: csa-complaints@eco.de List-Unsubscribe-Post: List-Unsubscribe=One-Click Feedback-ID: 77.32.148.22:7517309_-1:7517309:Sendinblue From: Content-Type: text/plain; charset="utf-8" In Rust 1.76.0, the `dbg!()` macro was updated to also format the column number. The reason cited was usage of a few characters worth of horizontal space while allowing direct jumps to the source location. [1] Link: https://github.com/rust-lang/rust/pull/114962 [1] Link: https://github.com/Rust-for-Linux/linux/issues/1065 Signed-off-by: Raghav Narang --- Branch rust-next=20 rust/kernel/std_vendor.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/rust/kernel/std_vendor.rs b/rust/kernel/std_vendor.rs index 388d6a514..39679a960 100644 --- a/rust/kernel/std_vendor.rs +++ b/rust/kernel/std_vendor.rs @@ -146,15 +146,16 @@ macro_rules! dbg { // `$val` expression could be a block (`{ .. }`), in which case the `p= r_info!` // will be malformed. () =3D> { - $crate::pr_info!("[{}:{}]\n", ::core::file!(), ::core::line!()) + $crate::pr_info!("[{}:{}:{}]\n", ::core::file!(), ::core::line!(),= ::core::column!()) }; ($val:expr $(,)?) =3D> { // Use of `match` here is intentional because it affects the lifet= imes // of temporaries - https://stackoverflow.com/a/48732525/1063961 match $val { tmp =3D> { - $crate::pr_info!("[{}:{}] {} =3D {:#?}\n", - ::core::file!(), ::core::line!(), ::core::stringify!($= val), &tmp); + $crate::pr_info!("[{}:{}:{}] {} =3D {:#?}\n", + ::core::file!(), ::core::line!(), ::core::column!(), + ::core::stringify!($val), &tmp); tmp } } base-commit: 8db31d3f3bd5dbc8cf3a22bba04b4b4add7f984e --=20 2.44.0