Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6074726rwb; Mon, 14 Nov 2022 13:59:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf5fL01Yh7mhJTCTKaM4glLHb/99i1NzRsIY5i0LzbnLmeTY0lGuZnIwUSP3Psm98eOvXqy5 X-Received: by 2002:a17:90a:c087:b0:212:cd9c:b44f with SMTP id o7-20020a17090ac08700b00212cd9cb44fmr15163049pjs.14.1668463177833; Mon, 14 Nov 2022 13:59:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668463177; cv=none; d=google.com; s=arc-20160816; b=Q2LiBFUSI+y1GR+JYi4ZSFSg0ZqSWYY8Qi+Gn7WGDAfhg1subAxBmHVtEUhxDk83BQ djJzDYC7GfTqFdXX+UldKk8mdj548yJfoTN48fywBuxKItKYeujE2i8b7x46D3WuUqey zhoQWzFbG5AJk8k6HE5ZqiiXgiD1b85t0PXdVoLeTw/MoaeGWIpYPgLDeEKEvcCviVBN N8me5u4r1IpuVajWptIcpTK6ErP4CZWKHBMrMOJ+SrPf5Ft/y3OGhKWUkP5sPtGhr9hn Nvx/GmL2kiZIrJ96KotE+l0f5poQ98jcKx/pDU3s8SpUByQWgycPH/uB5cg+EqJWgPxc h9fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=cdv5tthp2cYx/JZK69g8/6+Z4be/rjjn+QYGbW7ClUA=; b=Ad9Or23W/6pRXy6AD3i9e9xczkeM3mmUtYAzaGCuubi4QHjwikDeWzo8u7GrieDncR A63oZ+xrB022B8l2GY+KEqqWQEvLiJQCDpyT9v6ZRiImlvetrYFvACEU/iCnRfjZblRO f/fjgUeUYHUgy06dXVO7a7PL2nC5BNCGUb7ekheL5J8kkg/Cap97qhp0MDWG0zXOteS7 ArlzuMCtl4oc0WwCdsy19hTS9o+oI1N+GLmFGjD59D+dnc4zsb0qRKAssZwbxcqWNPtA EnIYyRD1TeuGlvtd0VOsWnz4vO7+f1Th04HJutIlZA4bW+y45y66xjwIG01YGXhS970u H5pA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w9-20020a631609000000b0046fef65f738si10244023pgl.793.2022.11.14.13.59.23; Mon, 14 Nov 2022 13:59:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237017AbiKNVGY (ORCPT + 88 others); Mon, 14 Nov 2022 16:06:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43650 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235551AbiKNVGX (ORCPT ); Mon, 14 Nov 2022 16:06:23 -0500 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 428C9265; Mon, 14 Nov 2022 13:06:22 -0800 (PST) Received: by mail-wm1-f52.google.com with SMTP id v7so8385657wmn.0; Mon, 14 Nov 2022 13:06:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=cdv5tthp2cYx/JZK69g8/6+Z4be/rjjn+QYGbW7ClUA=; b=xdfXXRSwSj1cM2SVHnLhtG++1PA7oaiky6RP7H4nlq+OqjWkJXtnBvVca9iLOF6a7Y zSQWBjWm2Sqlz87ySCTYEirIDSmmKLft281kbV53Md3gxpmWA1bpmgWdPnV1/AEMolUm fu1ucd5Ufhw0XLYRSavj9u/HlP8B+AQbnRwGtC+g5cJBS28MoPca+MtKlPOoW9t4wwuZ tdRFuSzKhdnCPbF+4Xm0bo9RUql9+UNe+H6a4QIzDW2ut9ceOHz6FOZJmI42PfV55RaH UV6C4YkKQ0myk46BB0Vok/rmYdfQgQOcPFd1AD/qmzw0QJXu+Tc3xgVCY0iT66+fWtEd 6jyQ== X-Gm-Message-State: ANoB5pkZPAxcRks9LdanhCcaWztOAaBh/OCjq00J5sKTQApvUeNkQOyq QkVx3m1cfJFHy+xUOSsVYR5z+kIEuqs= X-Received: by 2002:a05:600c:3544:b0:3cf:b067:416c with SMTP id i4-20020a05600c354400b003cfb067416cmr9441924wmq.134.1668459964440; Mon, 14 Nov 2022 13:06:04 -0800 (PST) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id o15-20020a05600c510f00b003c6d21a19a0sm15255965wms.29.2022.11.14.13.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Nov 2022 13:06:04 -0800 (PST) Date: Mon, 14 Nov 2022 21:06:02 +0000 From: Wei Liu To: Miguel Ojeda Cc: Wei Liu , Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?iso-8859-1?Q?Bj=F6rn?= Roy Baron , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Subject: Re: [PATCH v1 25/28] rust: add `build_error` crate Message-ID: References: <20221110164152.26136-1-ojeda@kernel.org> <20221110164152.26136-26-ojeda@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 14, 2022 at 07:22:02PM +0100, Miguel Ojeda wrote: > On Mon, Nov 14, 2022 at 3:30 PM Wei Liu wrote: > > > > a const function `build_error` > > > > Without this I read it as a "normal non-const function". > > Sounds good to me, especially given the sentence that goes after that. > > (I think "function" does not imply one or the other in principle. To > me, `const` ones are normal too, in the sense that they can be used as > any other function.) > > > I can work out what the code does, but I also happen to know what Rust's > > const means and its behaviour in non-const context. Other kernel > > developers may not. Even so the description is a bit difficult for me to > > parse. > > > > Maybe a few sentences about const and its behaviours can help? > > Not sure if we should explain language details in the documentation of > particular functions. But I agree this case is a bit special. > > What about linking the Rust reference/book/... (so that those terms > are clickable when rendered)? I think this works too. > > Thanks a lot for the reviews, Wei! > You're welcome. Thanks, Wei. > Cheers, > Miguel