Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp357720pxb; Wed, 14 Apr 2021 17:44:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwN9fQGVhzPfT8KnRuw46OnlGMxVoa1BiO21z7nIIio17z2JqltYlNh3a/mZ8dZnGEZyiRM X-Received: by 2002:a17:906:3ce9:: with SMTP id d9mr756374ejh.172.1618447451321; Wed, 14 Apr 2021 17:44:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618447451; cv=none; d=google.com; s=arc-20160816; b=uB/rL9B8TsutQUH+ikvcOuvcikH9q6BeX4SY2MUgFmT57mLGPdQgkVQ5fm4BiA1Awg uQYI5+CMnaLawjEBVYVV4SUhdNCiuuLtLOG9qDHLzquRLvm/iaR04yZ71B73XzrK3dl8 yWIH6SXM+HTeGv/dWkqRYE+tm3iQuoYbrQCh9r/Ewax0kmnSzXalArL39DHMcQEDkDbS afnDUe4CGSeGSoCqVdtex1F5NUn7WNHHWVCR/FaSlBYpZMRNFHS7H+AjV7Z/kuRJZQL+ BQuipgH7FIqApAILvxYXB5XggYN+VnCFzAaL/ZQqccaUbMOsdNE7VnOywnwrXtOMzoKT TyNg== 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=OuYCRH1SziDsj1kqjHDWxqQ5BotcKF1FQqzVQmKFEPE=; b=pmTzcryIBD+cE3szZMc7vfbkosb7FVyFvrvqCG5dTByXcM6uxIN2TGIs1vznvvlfiO AGAVeZ2aGmtvtx36F0LqNbxqwSAeFwP0WIdxTd5jhWoklkmQ6WDHOdOlszeDAjJpaZe/ aVoUe0YEigotzPSGkbrJHUPhg1uZb22/61HMnu3m5Gfv6jvyOTT/ndO5yajDoD3SP6Iw bu295tCCVG16FJEuVQyBq1tHhafZfd69R2ss3tm/ClRDFobU4CLOgEKJAQscbZl+F+US WrftjIld+cu0FUhu7s75ofD8sKLCgDZLOXin062ii+wglNoUYvYOcSRv8wShJvapzkCL EsFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mweODhNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si1023143edd.467.2021.04.14.17.43.48; Wed, 14 Apr 2021 17:44:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mweODhNr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1353404AbhDNTfJ (ORCPT + 99 others); Wed, 14 Apr 2021 15:35:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353424AbhDNTfI (ORCPT ); Wed, 14 Apr 2021 15:35:08 -0400 Received: from mail-yb1-xb2f.google.com (mail-yb1-xb2f.google.com [IPv6:2607:f8b0:4864:20::b2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1429AC061574; Wed, 14 Apr 2021 12:34:47 -0700 (PDT) Received: by mail-yb1-xb2f.google.com with SMTP id y2so21332049ybq.13; Wed, 14 Apr 2021 12:34:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OuYCRH1SziDsj1kqjHDWxqQ5BotcKF1FQqzVQmKFEPE=; b=mweODhNrb9PpKwieuzoTUwAKqnwWNCJrjuokkP0kSU1eRO3k96fFb7EjFpJq1ByFio JvpGmSiV5XK1f2Y/lbbcQHwn2gxOJeFPYyAsQT/krJQEPw/iFp9iV9JzGSxHuDLGAhih NTI/Kaq83cCFu6CwdkupcJ5BlPV6QMRR+XxM2Grq4bb8lbTCCwcskOEa2b63Do8mP7hy vE2NupWXNGtinfXftEl4pavEVzXpIBMDCUnI9E9PhP3UySwyrhrMg6ErlFco3QZc5mK4 nIW5MB3d3HN/gL4iLJNi7R1Xb41Wqgc1MVjSpUE4uBoIHvoX6GgglLleBpxnA2LBS8q+ /rQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OuYCRH1SziDsj1kqjHDWxqQ5BotcKF1FQqzVQmKFEPE=; b=cgA16AMEexYVwL0ripVI4D7gTcftX/cL//DJVKVkSe8YakCL4yz1N+DzF0At6mHVlg d6rOPHwSa0hW+SN3Pz3PsNFNm+KUNJ7dM49ZitxppRcYhBIyHUc8hQyDx9rQXQQ5n4PB 6yKLGS82IoLSsimgamzOB6u4iy0lvTAAbqxGKUNAb7pwzxNJoM04md1tZN64jcJNdmsl kfhZ3e3OmbE8U6aW4yPiY0+xKfmttrCKLBBjMqS2pszqTACbj5luLECMVHhB20Bvqk5j wpE4bGiM6hszuRgXleh6vV0KbbHcOB6tSNzdEz2+srBnwC6xe6LglyIDdb51ImBlEdhM xtPA== X-Gm-Message-State: AOAM530cEBhPMKs9vLAdJJa/Id4tDTdMe+hdWWViffpxsxg5Z/BuXq9T QYCK0CaRpPWOHmUThQTgLTUjM4EbmvrNb1LtV/8= X-Received: by 2002:a25:7909:: with SMTP id u9mr54142916ybc.22.1618428886475; Wed, 14 Apr 2021 12:34:46 -0700 (PDT) MIME-Version: 1.0 References: <20210414184604.23473-1-ojeda@kernel.org> <20210414184604.23473-6-ojeda@kernel.org> In-Reply-To: From: Miguel Ojeda Date: Wed, 14 Apr 2021 21:34:35 +0200 Message-ID: Subject: Re: [PATCH 05/13] Rust: Compiler builtins crate To: Linus Torvalds Cc: Miguel Ojeda , Greg Kroah-Hartman , rust-for-linux@vger.kernel.org, Linux Kbuild mailing list , "open list:DOCUMENTATION" , Linux Kernel Mailing List , Alex Gaynor , Geoffrey Thomas , Finn Behrens , Adam Bratschi-Kaye , Wedson Almeida Filho Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 14, 2021 at 9:19 PM Linus Torvalds wrote: > > Not being a Rust person, I can only guess based on random pattern > matching, but this _looks_ like these "panicking intrinsics" panic at > run-time (by calling BUG()). Your pattern matching works well :) > Is there some way these things could cause built-time link errors > instead, so that if somebody uses 128-bit shifts, or floating point > ops in the rust code, they show up as build failures, not as run-time > ones? Yes, we should definitely make this a compile-time error if possible! This was the easy way out for the moment. In general, there are some things that are currently unneeded from the Rust standard library. When we get to remove those, many of those intrinsics should go away, and then we can leave it as a link error. Cheers, Miguel