From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80514212B38; Thu, 27 Mar 2025 11:50:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743076233; cv=none; b=GbuswJpIeWkDQQkuDOBxMuOWSMn5E5vgJHpVUcM89mVh1pc/R/JDhHuJU2ESEoBM0ngxUj/VG+Asi4C3ft+O0V5SafwGfBYbcqdpgfsbQQAsBOTrhHiySWY1yELgNLhZ+9yg/HbQCeiQvG9gN+6D2Hza5FWtJe25Y3rKWAW+U6U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743076233; c=relaxed/simple; bh=PeVyVMBC5eU+KwcsRny3CgOSWBNkaR0c3V+ay+UFp1U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JRNxT8jYJrWLUBUqhXUSFBg38T06bejqyFCKIQRBIwiZEQ5jzxFop1p0lpxQBUDRPvb0WDTvUAVCTLBa/WQmPCXcEfPXtRk6Lmhmh4w23x7mTbpk5d0sDTY/NvzqkwIwoojplI0/5+rUCLGEcgiH7gupANgAyHmk8jIyvBLrVQg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=drtu6bwf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="drtu6bwf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8C57C4CEDD; Thu, 27 Mar 2025 11:50:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1743076233; bh=PeVyVMBC5eU+KwcsRny3CgOSWBNkaR0c3V+ay+UFp1U=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=drtu6bwfPr0RhNHzF9uI8D3GxKtMKN1SaRKwTwifwjFgzi8xBDOKU43sEWqlo+JsI 2HEC+adMvOaYzzsT28H6PB7Qmku7Bre21/W5ZwrnL+UMwTFhnof1z3nE0R6OaciUCz aCA0OAS/uy7QTPeDjRGNWiQdYj0HcyCPXzBbO8SXKB/RsunmRrnrUyd19ws5J9f0su tUoooPWvCMoqbhBzTY2ztci5XVR/k/Ea7i1x7ds6RhLGmZVmGEllqeUDN6R9oFOVdp rd3Dm8MELd5BppLtw17k5bZ4hhF+LDeTFgfZWT7GW4W9rlejnuyv8cbiB6Me94T4jV 7unq8vgwCWRMA== Date: Thu, 27 Mar 2025 12:50:26 +0100 From: Danilo Krummrich To: Daniel Almeida Cc: Mark Brown , Miguel Ojeda , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , Benno Lossin , Andreas Hindborg , Alice Ryhl , Trevor Gross , Boris Brezillon , Sebastian Reichel , lgirdwood@gmail.com, linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org Subject: Re: [PATCH RESEND v2] rust: regulator: add a bare minimum regulator abstraction Message-ID: References: <20250326-topics-tyr-regulator-v2-1-780b0362f70d@collabora.com> <0698A75E-D43C-4D02-B734-BFE1B3CC5D34@collabora.com> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Mar 27, 2025 at 08:46:29AM -0300, Daniel Almeida wrote: > Any function that takes 'self' by value (i.e.: “self" instead of “&self” ) > effectively kills it. I'm sure Daniel didn't mean it that way, but to avoid confusion, I want to clarify that a function that takes `self` as argument not necessarily results in `self` being destroyed. It could be moved into some other structure, directly returned by the same function etc. It's just that if the functions lets `self` go out of scope, then it's destroyed.