From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f74.google.com (mail-wm1-f74.google.com [209.85.128.74]) (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 D28C833F8A1 for ; Thu, 19 Feb 2026 14:34:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.74 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771511666; cv=none; b=ZQDFr1RiinhmxzNQRzPes654rLcA6/R3iWlXW+thiOztwsFSPLadmlr2K5rq1PFrz3VRL6/6TwZqSQEtg2IKwt8futnfho1yHNdYT1rnOt7Vr83LHuIdYfJRv8Nd0DnsLF4OAS1KH8lh+/0QluaQx4HSV84R30zJqxzar5hr1hc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771511666; c=relaxed/simple; bh=TwBpYocc+CnzwY+5av4C0zbWylZqk7tUtrk7t6D667k=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=eFEYYhqvd3DgzuGZ9AmQMeq1prRCJCG4BZDLF92yLQ1kh16jooa5uCt8yEMDVxjrKDtgRBBz7hvV4y96OFHOpvvHfq8586yoB5I6lZE0g/BpDwptsTh3WUvN88lI2nWCvIHMqexv2NYSkiScGTpYFKH2w+rvUVI1spu+wAE+OxI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Qptehnaa; arc=none smtp.client-ip=209.85.128.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aliceryhl.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Qptehnaa" Received: by mail-wm1-f74.google.com with SMTP id 5b1f17b1804b1-483786a09b1so10373655e9.3 for ; Thu, 19 Feb 2026 06:34:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771511663; x=1772116463; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=IOzT2wFH/GzUYi6lTDkDLSd1BG4gudq8s1ArkyhE1lk=; b=QptehnaaWTI1zjckCQi9P/V9b77T6Fms/Oqk9Bt0B7WKoB7qKkwJIyGlUB2tsPvCg6 S0XYjVVmUi9mjoYrN0Vibpsoy9/hLXgAVoRFeaIMxHDwmvpMje9qOE2jc0+bQHdx+Zsi dNWUTqWeXndQM0dtwn8aZ5L+AxuhUtmctkgQO9J3t+XWYUTiXpyHwfGj8EQ7abDkK2dH kp62spKadpRaoxfnsS+fDPFVWbcLuAnansOcR0gylvmKUutGzltNZtFcrtNtMmQ+vuBu nyo0TxXRg9bDItAbw3oVY0s8JIk5eSHPNXMfwAk/xnbC0CzH+D1uMd3W09EXOcrlNY/U IfTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771511663; x=1772116463; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IOzT2wFH/GzUYi6lTDkDLSd1BG4gudq8s1ArkyhE1lk=; b=hTGSaTUC8tHwMRaugFIo8k9IL0Eju0gFlAjd5gKu7zEZ9OYp76EeLqxyhHuieLoXxu 7judbBcJy6/IG7Apvu7HmTT/Q8DxaJPorOpGRuwyESPBwywkDG0Zq646+/HeGf8ylJcB TmSdhm804JCsfZ5iBTs5x/j9FVb7iBJDbzxVFV9GDWhU1clLIDIq7cb3O5P46tXEAp0p bUMm7l6HAgVtIVlSS3i1EGqdOpvouIcQds8thPo6I2jwXa3GzIMsiJXmPnev/kl2JcYI uxIi2nUtRtZEZZzU8nWDnpjTUSGt9I9vK8SBlEg9v1WC1XB0U3uKXug5o5gcfE8ak/VJ J5cg== X-Forwarded-Encrypted: i=1; AJvYcCVAKA+8i065S7MGEqtByRS9tqWWmr2215jxVgC5w8oGBBpz3p3PqKKU4C3QRzv0Bx95cmjoo79CuEohU7U=@vger.kernel.org X-Gm-Message-State: AOJu0YzW3ZDaI6N9m8zShmLD4Tdo/sgNWAd/CWe2NixH2uafYrBczfNX faZzr5/tvRS0ta4Y2HNf+9SP0osSVLVLI3R8sBNUsEeIqZf98AeI1DlXh2lDX6ieXVAAw4inOjJ vlj48l48rfGGkgrznwg== X-Received: from wrua7.prod.google.com ([2002:a5d:4d47:0:b0:437:6ebe:6e6a]) (user=aliceryhl job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6000:400e:b0:436:14c7:32a6 with SMTP id ffacd0b85a97d-43958e4f838mr9356335f8f.43.1771511662753; Thu, 19 Feb 2026 06:34:22 -0800 (PST) Date: Thu, 19 Feb 2026 14:34:21 +0000 In-Reply-To: <0655a26e89c960d73888dcfed70645ec@garyguo.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260219-close-fd-check-current-v1-0-fcab8d8469f5@google.com> <20260219-close-fd-check-current-v1-1-fcab8d8469f5@google.com> <0655a26e89c960d73888dcfed70645ec@garyguo.net> Message-ID: Subject: Re: [PATCH 1/3] rust: sync: implement == operator for ARef From: Alice Ryhl To: Gary Guo Cc: Greg Kroah-Hartman , Carlos Llamas , Miguel Ojeda , Boqun Feng , "=?utf-8?B?QmrDtnJu?= Roy Baron" , Benno Lossin , Andreas Hindborg , Trevor Gross , Danilo Krummrich , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" On Thu, Feb 19, 2026 at 02:27:38PM +0000, Gary Guo wrote: > On 2026-02-19 13:52, Alice Ryhl wrote: > > Rust Binder wants to perform a comparison between ARef and &Task, > > so define the == operator for ARef<_> when compared with another ARef<_> > > or just a reference. The operator is implemented in terms of the same > > operator applied to the inner type. > > > > Signed-off-by: Alice Ryhl > > I suppose `PartialEq` cannot be implemented due to trait coherence issue? That's right: error[E0119]: conflicting implementations of trait `core::cmp::PartialEq>` for type `sync::aref::ARef<_>` --> /usr/local/google/home/aliceryhl/devel/linux/rust/kernel/sync/aref.rs:185:1 | 174 | / impl PartialEq> for ARef 175 | | where 176 | | T: AlwaysRefCounted + PartialEq, 177 | | U: AlwaysRefCounted, | |________________________- first implementation here ... 185 | / impl PartialEq for ARef 186 | | where 187 | | T: AlwaysRefCounted + PartialEq, | |_______________________________________^ conflicting implementation for `sync::aref::ARef<_>` I can mention this in commit msg if I send another version. > Reviewed-by: Gary Guo Thanks!