GNU bug report logs - #69625
30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Yuan Fu <casouri@HIDDEN>; Keywords: patch; dated Fri, 8 Mar 2024 04:45:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Mar 2024 04:44:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 07 23:44:46 2024
Received: from localhost ([127.0.0.1]:55837 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1riS6A-0007TR-19
	for submit <at> debbugs.gnu.org; Thu, 07 Mar 2024 23:44:46 -0500
Received: from lists.gnu.org ([209.51.188.17]:49502)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <casouri@HIDDEN>) id 1riS63-0007TE-QV
 for submit <at> debbugs.gnu.org; Thu, 07 Mar 2024 23:44:43 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <casouri@HIDDEN>) id 1riS5X-0005E8-9Q
 for bug-gnu-emacs@HIDDEN; Thu, 07 Mar 2024 23:44:07 -0500
Received: from mail-oi1-x22b.google.com ([2607:f8b0:4864:20::22b])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <casouri@HIDDEN>) id 1riS5V-0001YC-Kk
 for bug-gnu-emacs@HIDDEN; Thu, 07 Mar 2024 23:44:06 -0500
Received: by mail-oi1-x22b.google.com with SMTP id
 5614622812f47-3c1a1e1e539so1242456b6e.1
 for <bug-gnu-emacs@HIDDEN>; Thu, 07 Mar 2024 20:44:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1709873043; x=1710477843; darn=gnu.org;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=KDuSUVKywPNW4oZU/z2rru0TUDFnBHHWfi2EFXirAyM=;
 b=F7w3O5bJWeLTL4QKr4WfhoKGEahH/btG/F/p2E7Mslo6jy73jG1oZdoudPoi5LJAul
 JmVRTuTYWOBcYiYYoCM68bTb1Of6q5yiEFJpXV7bQHRYvGbArJmi4AXVy8NaA23JztDO
 w1PyNNM9PSVV8tNwGRWKeUXuEbOJXnA4SFPQyygP79+Xx51AN7OSp0lredFLTL240cD9
 47Yz1T2dm/4g4vVT4URR4i2OjtwKza7VxwTJ/JKCVz/OBDc68VEUBSMWIQ8YwGQlwswa
 WX1teUsP9vhku7GJbYHuYO9XsTB8FF9gm2imBAAvEfQmsldNQFlbJmH92JAEafGWrutw
 B6/A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1709873043; x=1710477843;
 h=to:date:message-id:subject:mime-version:content-transfer-encoding
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=KDuSUVKywPNW4oZU/z2rru0TUDFnBHHWfi2EFXirAyM=;
 b=OIDIIpm/h7FDLmuxT/1kKkuIVoeRmgHh3CK4t+DFPqwSYh5W1UdXiBuhTc3bG6H1CZ
 +tQOfujXxhWhx3q2mlJuWFXBhToP7PId/VH0ji4NdeghpwgKhcHM4CrddDLv+jsjK06Y
 F94XFyY+E/2rm72RtqLbM6rfREqWMfDrSzAYV3A0CJu/sH9jNRFUOFHDVwuxH0KezBDS
 R8gbVlpClx9Geveh1ewXgFMaUO2IYgFSmcsVzZfj+xow9SzteRKPQfwZNfNz67/YTvzA
 hWFz63nqLLZAwwDZsqQwEY7e6gYfdRhsFNoYGWj1K8mwMT5NaJ4eqrD4oCoZi1GSRqpr
 /lcw==
X-Gm-Message-State: AOJu0YyO0XLDO0tcj2SXZ855zOUUJkfUDvtWjQG4Qg2xA30VmPeMW0Y/
 8wWwIyMOTAJCJNcVf+wQUhKk1dxV8CzzS7s81dHwG8Y3wLoKRQ52p0AU7uwQ
X-Google-Smtp-Source: AGHT+IEGc03Ma+4DzIOPqF9g7wcsrausItXtVUk/9TqbgSpSNgAC1mJAyTZNWlFvU9hCuYoA67WCdA==
X-Received: by 2002:a05:6808:4c8:b0:3c2:1e69:47db with SMTP id
 a8-20020a05680804c800b003c21e6947dbmr6057877oie.6.1709873043431; 
 Thu, 07 Mar 2024 20:44:03 -0800 (PST)
Received: from smtpclient.apple ([2601:641:300:4910:5d7a:40d1:8598:1830])
 by smtp.gmail.com with ESMTPSA id
 a8-20020a63d408000000b005cf5bf78b74sm11879309pgh.17.2024.03.07.20.44.02
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);
 Thu, 07 Mar 2024 20:44:02 -0800 (PST)
From: Yuan Fu <casouri@HIDDEN>
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\))
Subject: 30.0.50; [PATCH] rust-ts-mode doesn't fontify some enum
Message-Id: <CD02B2B2-ACA6-484B-B832-B7F0F3F3B385@HIDDEN>
Date: Thu, 7 Mar 2024 20:43:51 -0800
To: Bug Report Emacs <bug-gnu-emacs@HIDDEN>
X-Mailer: Apple Mail (2.3731.700.6)
Received-SPF: pass client-ip=2607:f8b0:4864:20::22b;
 envelope-from=casouri@HIDDEN; helo=mail-oi1-x22b.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

X-Debug-CC: dev@HIDDEN <mailto:dev@HIDDEN>

(I lied a little bit about on the [PATCH] part: I have a solution but =
didn=E2=80=99t turn it into a patch yet.)

The problem is follows: given the rust code below, some enum are not =
fontified with type face under font lock level 3, and those enum are =
fontified as function or variable under font lock level 4.

fn main() {
    func(MyEnum::VariantA(0));
    func(MyEnum::VariantB);
    func(VariantC);
    func(VariantD(0));
}

VariantA and VariantB are fontified correctly, but VariantC and VariantD =
are not.

I think a simple rule that fontifies every capitalized identifier would =
fix this. But I don=E2=80=99t know if that=E2=80=99ll create other =
problem. AFAIK capitalized identifier is always some type in rust, =
right?

This is first reported on rust-mode=E2=80=99s GitHub repo: =
https://github.com/rust-lang/rust-mode/issues/518

Yuan=




Acknowledgement sent to Yuan Fu <casouri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#69625; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 8 Mar 2024 05:00:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.