From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41]) (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 12CA12F80 for ; Thu, 8 Jul 2021 14:18:31 +0000 (UTC) Received: by mail-vs1-f41.google.com with SMTP id j8so3708274vsd.0 for ; Thu, 08 Jul 2021 07:18:30 -0700 (PDT) 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=l11NGSYjTAbT8tEzMsBT3Wbi24GbM6gbgvI7f5BuBGQ=; b=TfdFIJTY0e4UuRNjv64mwheAsmMi6CrYeQYmzyyixXd0GpbSY/vMlTK+FP2ENpO1hN GDjglK9ZU3cLzzuA1GoKdgbVr05eQCPKetZ/9DIy0cbU+PpAVcsN3z/SV75W9EsvNcB2 t4oalPXaIQ44ZRx4ewlfl6gL1NOMxw1OY92nU/kdwiMeepBsrGsG6Avua/55QN5LoY1G D13Zephm5pm2j7mO8vvLr4uwalvEo87bRzzf/RgwuOtrZK8zQt4drYCkv7X3H/BIffjH aiQ2EpPuMKqo1Boje3x0S3mbIyVAOfgXO2/69hcP6/K1jDQUQ2M+2t/rYn3ry6h70kjd UJXg== X-Gm-Message-State: AOAM533sZtY9LpbtKcWRqr9CHuBuCSnHtaisSAwRx2f1TEccWtQR95s6 X7nS4u7U4GTl9kFWogIDQhZx96jEv3tmNV25BlgJ5Jqi X-Google-Smtp-Source: ABdhPJx+6a+dW9/po74K3DPYlPYnsJMbM82KOoqI9Pi7XJBjoCJ2+cQ80dnsLef2FBPES3/8Roh/tf43Rxy0E6RP0Os= X-Received: by 2002:a67:f98c:: with SMTP id b12mr28613076vsq.40.1625753910157; Thu, 08 Jul 2021 07:18:30 -0700 (PDT) Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1f2a62c19845e4602817c2130d47bbea02d04d1d.camel@HansenPartnership.com> <20210707203827.GI18396@quack2.suse.cz> In-Reply-To: From: Geert Uytterhoeven Date: Thu, 8 Jul 2021 16:18:19 +0200 Message-ID: Subject: Re: [TECH TOPIC] Rust for Linux To: Miguel Ojeda Cc: Wedson Almeida Filho , Jan Kara , Greg KH , James Bottomley , Julia Lawall , Laurent Pinchart , Linus Walleij , Roland Dreier , ksummit@lists.linux.dev Content-Type: text/plain; charset="UTF-8" Hi Miguel, On Thu, Jul 8, 2021 at 4:04 PM Miguel Ojeda wrote: > On Thu, Jul 8, 2021 at 3:43 PM Geert Uytterhoeven wrote: > > So what happens if this fails? > > Just in case: are you asking out of concern for "Rust panics" etc.? Exactly. > The upgrade call does not need to panic, they can be fallible; e.g. > the `Weak` types in the Rust standard library return an `Option`. > > Now, what the caller does if the upgrading fails depends on who the > caller is, as usual. Let's assume the caller access a member of the object regardless. What happens? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds