Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5871564rwb; Mon, 14 Nov 2022 10:35:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf7eRoiykz7cYMsn4wie9AB2DlevHqsza/oQEGbfjoqpA8r3Odzit9rlWAGx8Lio8qbCEeSq X-Received: by 2002:a17:906:f74e:b0:7ad:975f:b576 with SMTP id jp14-20020a170906f74e00b007ad975fb576mr11231351ejb.49.1668450958288; Mon, 14 Nov 2022 10:35:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668450958; cv=none; d=google.com; s=arc-20160816; b=wtYM9s24s+Te3NCf6c1VH+gX0UuK0FJqpFcOjdJ8KH/yNn77hPIh7BdE5qdNA5mNxm tlZ72wYnwxxgTv11iwQ3ldc9v4ICdKGysUy9A4FvELg39X9fD0EXNvivVqDgdzJtxqmK ru5mufZZWqgnzqZmQcRGc7MrJqfOrv3LpHqjKZn61I6FuRX+A9/vXz0pYaOgVhIXRbiw EWk4Nv7X93rkuEhYgYL1dncW1SVMtubKovwpD98PvsgU5FFYHGzlN1KypRwS2nrJwKBm 8H9b/b2K5vcD/KlWft2vaA/v5g+W8Jqm9pQRUAEgRSRm0XpwwnDjM8qSOmKeMpGAYPja 4tmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=dJhdvZIL4dk79Y3gG/NcL+fwogDMvYUZLhwwyEHygOE=; b=YtewOZ6IoCrf9Ii6GZAyhq5cxPeIdz07WAI9ytJNHZfN/Mbp8dQKQpu2BU5q9zd4a/ 2R2xQxE0O+NWz6lgXthC/hOmz1Ay2vcyE6cdFjyUJ2eV+O5mAzN6vJc/vArzagF3PDqp NJvrsr2GmthkV0+h0L7zPFs3X8JJKpMBX6pHQohbvo6aPB3Ilsfoc5ozbCgFVlCm227g R9wLMxVcbzDj+yN3jiW1n7eywN11ATW6Tp5BsU/FJpB/68OC8umvcT1f2uYCsMfvprVf 28vCSFyJj4A9ZJoaPC89bcwp4HoSsINWtK10eEowIBFBTSHf2VKXpRsXKkZbqMdUBA4X 1aaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Ghk/bDvt"; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt20-20020a1709072d9400b0073ce34d1a13si9925246ejc.499.2022.11.14.10.35.35; Mon, 14 Nov 2022 10:35:58 -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; dkim=pass header.i=@gmail.com header.s=20210112 header.b="Ghk/bDvt"; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236612AbiKNSWT (ORCPT + 88 others); Mon, 14 Nov 2022 13:22:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237226AbiKNSWO (ORCPT ); Mon, 14 Nov 2022 13:22:14 -0500 Received: from mail-yw1-x112a.google.com (mail-yw1-x112a.google.com [IPv6:2607:f8b0:4864:20::112a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22D1C1E0; Mon, 14 Nov 2022 10:22:14 -0800 (PST) Received: by mail-yw1-x112a.google.com with SMTP id 00721157ae682-3691e040abaso114499137b3.9; Mon, 14 Nov 2022 10:22:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=dJhdvZIL4dk79Y3gG/NcL+fwogDMvYUZLhwwyEHygOE=; b=Ghk/bDvtvykckld0AKbfuQzvD+2Rlsr0agjZxZ6786dart7MCb+IoxAaz28aIKu0r5 jU97rIgPPMsw6Xh0uI5w5qZ92ZLTVqjNaIi7cJWzQl/I2e+gAGjwPHzJ7RsGpj0DvxM8 XJHgreVIm1xQeI9KLSWdPnka/7A+NFJOVBhXLVlNFCAy5VLSr3pg/2l+fxeF+hZc8FAH NIGBtwWBwrc6ZKE4gkCKz3o5zebil7r6zm4f7mR24MurTdNhOmDEAvLJce4GU5aQI3WO hEn8oEo5kfR+AMZ8hE1FYEFlm63aAsld6rL57UYGH6zL0eAbmZRgM6aDGbHcXIGJjx4j pDnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=dJhdvZIL4dk79Y3gG/NcL+fwogDMvYUZLhwwyEHygOE=; b=E4qGdkHh9n+65eYsKYbzmDVpPbV1gO9hHe0d8WzHtPuudCV66InLzt7FsFo9ZW6Zzi SnhfcIEt1t6i8CZKLkqzyQUzJwT9JODcZ++4PmsVpoDu5za6mnwk/dBUqe/FV8VPmyoA dnp7fpCj84YRJowgVvQDa5RlOHh/B/AJCU/rrK2+9vPvBz8MGoK2lKH3n1FvyetjFK/I /Xq5EF3zGXfLCQNuvmWn3yzQCz562ati8++oK/x9/Ewgd/OylqmYMM2p4SVHz+jIsP6b 4tYaYWazQmQ4zRrg6aZWSB1R2lhA4zX4JqXBMpQB8QRM729d+uiV6CRBrMjNt7sXZ6zl AoVg== X-Gm-Message-State: ANoB5pnbq5mkjvGdzeqtr+7K7MU/XnIH6EwBSEyzEAlUDgZsO4xv7LUM twaDRfqq4Dfx7PYjIDgufumlwa/KOoM3ucFKb5I= X-Received: by 2002:a81:7912:0:b0:342:4d19:c7b with SMTP id u18-20020a817912000000b003424d190c7bmr13767068ywc.67.1668450133388; Mon, 14 Nov 2022 10:22:13 -0800 (PST) MIME-Version: 1.0 References: <20221110164152.26136-1-ojeda@kernel.org> <20221110164152.26136-26-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Mon, 14 Nov 2022 19:22:02 +0100 Message-ID: Subject: Re: [PATCH v1 25/28] rust: add `build_error` crate To: Wei Liu Cc: Miguel Ojeda , Wedson Almeida Filho , Alex Gaynor , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 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)? Thanks a lot for the reviews, Wei! Cheers, Miguel