From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) (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 4463C168 for ; Thu, 8 Jul 2021 14:28:36 +0000 (UTC) Received: by mail-io1-f49.google.com with SMTP id q2so8336058iot.11 for ; Thu, 08 Jul 2021 07:28:36 -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=mgBIinccgboj4I/S31NNfXN5g1fpE3DADylHYQTAphw=; b=KqYpo+KXeaGce3f1T7QfCKLD8EGwvKZYopuV6y3H5H/hoaJfOBN8ppxVh34amnBD8K spcDKV4nBmt2UEcmjE+95jETSJqRbgxjs8z/NbZprs1H5r4ycjUK10rdCDl8/O0ylR+u 21bhhqyACPPmBCq8nvBACBTXcsmD98nhwylpJ61i1xu7LLr80n6AouM3Y5O8JZ3gDQjU MKFOFQrZl3/Ti2Gg54KvvqxED0qfftOsYdKkMsIFbro/DfHTbQv1bkWsncXYycCr6xVd ovFw0NzyUTYTtzsESglplsf2QdBRX4sRl7ADhEFwQQP9GcfyFRVrt/HpkakjeqeY5sB6 t2FA== 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=mgBIinccgboj4I/S31NNfXN5g1fpE3DADylHYQTAphw=; b=gXtQbC2JfRlv2xx+HUZU7lSA6UvlL/RHWebb2fr6bRIwe6Z0JqD0YG4bXlEHm5JBrL 26j0WNaiKlVndTDaJ3NM7WJfFE2+MCpzltxomKq+kKzhQL4dR06Bw/CoYc5td/jvuiLU iwbrlRvNSuMoqOBt8zlFkUt3DNXnt74Rl36bRPAKlXkWZIrCvad4DZFiUlOm+xc5UV5H i43eD6+elSL1jpoP1Se+r75FWd9O6ktMPcDdc5OvecLi6uVOCVvnVUmzr5QpaTHtNl2+ VYyI/ePHavC6TVWvdv/CtKQXSnJnn7YHYGxHK36xAj6dgcNotMA1oSODUFb04NWBVvHe T4ZA== X-Gm-Message-State: AOAM533YcsZnhr4uBPbBPlhOGwWHzuOvhzEKVHBecvujDIBeMYxWjwMb tyRRQ4Br6hcJ05blqj2EfmR6CCD5QCIA/UYiBIQ= X-Google-Smtp-Source: ABdhPJxoMICAwBdg9Eh1wA+cEiNpCJe+HZvMj2jiaSBdynXbPaozGBhBfgHm+S2YOOtQbh0wDbXccjeEPHzkK6wS/aU= X-Received: by 2002:a5e:d512:: with SMTP id e18mr24165139iom.149.1625754515461; Thu, 08 Jul 2021 07:28:35 -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: Miguel Ojeda Date: Thu, 8 Jul 2021 16:28:24 +0200 Message-ID: Subject: Re: [TECH TOPIC] Rust for Linux To: Geert Uytterhoeven 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" On Thu, Jul 8, 2021 at 4:18 PM Geert Uytterhoeven wrote: > > Exactly. I had a feeling... :) > Let's assume the caller access a member of the object regardless. > What happens? That is the key: they cannot access it to begin with because the returned `Option` is empty, so there is not even an object you can "access", thus asking "what happens?" does not have a meaning. In code: pub fn f(weak: Weak) { let strong = weak.upgrade(); if let Some(content) = strong { println!("{}", content); } // There is no `content` here, so you cannot do anything with it } Cheers, Miguel