From: arthur.cohen@embecosm.com
To: gcc-patches@gcc.gnu.org
Cc: gcc-rust@gcc.gnu.org, Arthur Cohen <arthur.cohen@embecosm.com>
Subject: [COMMITTED 134/146] gccrs: derive(Clone): Manually generate AssertParamIsCopy struct for unions
Date: Fri, 21 Mar 2025 13:07:15 +0100 [thread overview]
Message-ID: <20250321123226.184882-135-arthur.cohen@embecosm.com> (raw)
In-Reply-To: <20250321123226.184882-1-arthur.cohen@embecosm.com>
From: Arthur Cohen <arthur.cohen@embecosm.com>
gcc/rust/ChangeLog:
* expand/rust-derive-clone.cc (DeriveClone::visit_union): Manually generate
the struct used for asserting a union implements Copy.
---
gcc/rust/expand/rust-derive-clone.cc | 38 +++++++++++++++++++++++++---
1 file changed, 34 insertions(+), 4 deletions(-)
diff --git a/gcc/rust/expand/rust-derive-clone.cc b/gcc/rust/expand/rust-derive-clone.cc
index 18436be4bf7..8093bf67ff0 100644
--- a/gcc/rust/expand/rust-derive-clone.cc
+++ b/gcc/rust/expand/rust-derive-clone.cc
@@ -17,6 +17,8 @@
// <http://www.gnu.org/licenses/>.
#include "rust-derive-clone.h"
+#include "rust-ast.h"
+#include "rust-ast-dump.h"
#include "rust-item.h"
namespace Rust {
@@ -238,13 +240,40 @@ void
DeriveClone::visit_union (Union &item)
{
// FIXME: Should be $crate::core::clone::AssertParamIsCopy (or similar)
+ // (Rust-GCC#3329)
+
+ auto copy_path = TypePath (vec (builder.type_path_segment ("Copy")), loc);
+ auto sized_path = TypePath (vec (builder.type_path_segment ("Sized")), loc);
+
+ auto copy_bound = std::unique_ptr<TypeParamBound> (
+ new TraitBound (copy_path, item.get_locus ()));
+ auto sized_bound = std::unique_ptr<TypeParamBound> (
+ new TraitBound (sized_path, item.get_locus (), false, true));
+
+ auto bounds = std::vector<std::unique_ptr<TypeParamBound>> ();
+ bounds.emplace_back (std::move (copy_bound));
+ bounds.emplace_back (std::move (sized_bound));
+
+ // struct AssertParamIsCopy<T: Copy + ?Sized> { _t: PhantomData<T> }
+ auto assert_param_is_copy = "AssertParamIsCopy";
+ auto t = std::unique_ptr<GenericParam> (
+ new TypeParam (Identifier ("T"), item.get_locus (), std::move (bounds)));
+ auto assert_param_is_copy_struct = builder.struct_struct (
+ assert_param_is_copy, vec (std::move (t)),
+ {StructField (
+ Identifier ("_t"),
+ builder.single_generic_type_path (
+ "PhantomData",
+ GenericArgs (
+ {}, {GenericArg::create_type (builder.single_type_path ("T"))}, {})),
+ Visibility::create_private (), item.get_locus ())});
// <Self>
auto arg = GenericArg::create_type (builder.single_type_path ("Self"));
// AssertParamIsCopy::<Self>
auto type = std::unique_ptr<TypePathSegment> (
- new TypePathSegmentGeneric (PathIdentSegment ("AssertParamIsCopy", loc),
+ new TypePathSegmentGeneric (PathIdentSegment (assert_param_is_copy, loc),
false, GenericArgs ({}, {arg}, {}, loc), loc));
auto type_paths = std::vector<std::unique_ptr<TypePathSegment>> ();
type_paths.emplace_back (std::move (type));
@@ -252,11 +281,12 @@ DeriveClone::visit_union (Union &item)
auto full_path
= std::unique_ptr<Type> (new TypePath ({std::move (type_paths)}, loc));
- auto stmts = std::vector<std::unique_ptr<Stmt>> ();
- stmts.emplace_back (
- builder.let (builder.wildcard (), std::move (full_path), nullptr));
auto tail_expr = builder.deref (builder.identifier ("self"));
+ auto stmts
+ = vec (std::move (assert_param_is_copy_struct),
+ builder.let (builder.wildcard (), std::move (full_path), nullptr));
+
auto block = builder.block (std::move (stmts), std::move (tail_expr));
expanded = clone_impl (clone_fn (std::move (block)),
--
2.45.2
next prev parent reply other threads:[~2025-03-21 12:36 UTC|newest]
Thread overview: 147+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 12:05 [PATCHSET] Update Rust frontend 21/03/2024 3/4 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 001/146] gccrs: Fix bad recursive operator overload call arthur.cohen
2025-03-21 12:05 ` [COMMITTED 002/146] gccrs: Insert trait names during toplevel resolution 2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 003/146] gccrs: Fix variable shadowing in late " arthur.cohen
2025-03-21 12:05 ` [COMMITTED 004/146] gccrs: Add a newline to the end of nr2/exclude arthur.cohen
2025-03-21 12:05 ` [COMMITTED 005/146] gccrs: Rename some PathIdentSegment functions arthur.cohen
2025-03-21 12:05 ` [COMMITTED 006/146] gccrs: Use name resolution 2.0 in TraitItemReference arthur.cohen
2025-03-21 12:05 ` [COMMITTED 007/146] gccrs: Use name resolver 2.0 in CompileTraitItem arthur.cohen
2025-03-21 12:05 ` [COMMITTED 008/146] gccrs: Improve path handling while testing name resolution 2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 009/146] gccrs: Fix name resolution 2.0 definition lookups in unsafe checker arthur.cohen
2025-03-21 12:05 ` [COMMITTED 010/146] rust: Desugar IfLet* into MatchExpr arthur.cohen
2025-03-21 12:05 ` [COMMITTED 011/146] gccrs: Use name resolution 2.0 in TraitResolver arthur.cohen
2025-03-21 12:05 ` [COMMITTED 012/146] gccrs: Resolve SelfParam in name resolution 2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 013/146] gccrs: add test case to show method resolution is working arthur.cohen
2025-03-21 12:05 ` [COMMITTED 014/146] gccrs: Make TyTy::TupleType::get_unit_type cache its return value arthur.cohen
2025-03-21 12:05 ` [COMMITTED 015/146] gccrs: fix bad type inferencing on path's arthur.cohen
2025-03-21 12:05 ` [COMMITTED 016/146] gccrs: Remove usage of Resolver::get_builtin_types arthur.cohen
2025-03-21 12:05 ` [COMMITTED 017/146] gccrs: Improve handling of struct expressions in nr2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 018/146] gccrs: fix bad type inference on local patterns arthur.cohen
2025-03-21 12:05 ` [COMMITTED 019/146] gccrs: Use name resolver 2.0 in VisibilityResolver arthur.cohen
2025-03-21 12:05 ` [COMMITTED 020/146] gccrs: Use name resolver 2.0 for module descendance checks arthur.cohen
2025-03-21 12:05 ` [COMMITTED 021/146] gccrs: Reorganize the CPU feature detection arthur.cohen
2025-03-21 12:05 ` [COMMITTED 022/146] gccrs: fix ICE for placeholder which is not setup arthur.cohen
2025-03-21 12:05 ` [COMMITTED 023/146] gccrs: fix typechecking of Fn trait calls using ADT types arthur.cohen
2025-03-21 12:05 ` [COMMITTED 024/146] gccrs: Improve handling of implicit Self parameter in AST arthur.cohen
2025-03-21 12:05 ` [COMMITTED 025/146] gccrs: add test case to show issue is fixed arthur.cohen
2025-03-21 12:05 ` [COMMITTED 026/146] gccrs: hir: Mark AttrVec::get_outer_attrs as override arthur.cohen
2025-03-21 12:05 ` [COMMITTED 027/146] gccrs: typecheck: Remove unused parameter in TyTyCheckCallExpr arthur.cohen
2025-03-21 12:05 ` [COMMITTED 028/146] gccrs: asm: Fix clang warnings arthur.cohen
2025-03-21 12:05 ` [COMMITTED 029/146] gccrs: Fix bad handling for recursive type query arthur.cohen
2025-03-21 12:05 ` [COMMITTED 030/146] gccrs: Push ribs by kind rather than by value arthur.cohen
2025-03-21 12:05 ` [COMMITTED 031/146] gccrs: Improve handling of static items in toplevel 2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 032/146] gccrs: Refactor HIR to reduce the amount of raw pointers arthur.cohen
2025-03-21 12:05 ` [COMMITTED 033/146] gccrs: Refactor HIR with optionals, references & newtypes arthur.cohen
2025-03-21 12:05 ` [COMMITTED 034/146] gccrs: Refactor hir to avoid raw pointers and unneeded fwd arthur.cohen
2025-03-21 12:05 ` [COMMITTED 035/146] gccrs: Fixes some tests appearing with a moved variant arthur.cohen
2025-03-21 12:05 ` [COMMITTED 036/146] gccrs: Fix Generic type retrieval arthur.cohen
2025-03-21 12:05 ` [COMMITTED 037/146] gccrs: FnParam cloning now keeps projections arthur.cohen
2025-03-21 12:05 ` [COMMITTED 038/146] gccrs: Refactor optional initializers arthur.cohen
2025-03-21 12:05 ` [COMMITTED 039/146] gccrs: Fix FnParam pattern location ternary logic arthur.cohen
2025-03-21 12:05 ` [COMMITTED 040/146] gccrs: Add optional template arguments to please GCC4.8 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 041/146] gccrs: Use default constructor for default arguments arthur.cohen
2025-03-21 12:05 ` [COMMITTED 042/146] gccrs: Use a reference wrapper to please GCC 4.8 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 043/146] gccrs: Use nr2.0 in PrivacyReporter arthur.cohen
2025-03-21 12:05 ` [COMMITTED 044/146] gccrs: Handle type path segments during late resolution 2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 045/146] gccrs: Use nr2.0 in typechecker arthur.cohen
2025-03-21 12:05 ` [COMMITTED 046/146] gccrs: Clean up some system includes arthur.cohen
2025-03-21 12:05 ` [COMMITTED 047/146] gccrs: fix crashes in hir dump since move to references arthur.cohen
2025-03-21 12:05 ` [COMMITTED 048/146] gccrs: empty match expressions should resolve to ! arthur.cohen
2025-03-21 12:05 ` [COMMITTED 049/146] gccrs: Prevent execution of some nr1.0 functions with nr2.0 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 050/146] gccrs: Prepend crate name to functions with nr2 arthur.cohen
2025-03-21 12:05 ` [COMMITTED 051/146] gccrs: fix crash in hir dump with missing guards arthur.cohen
2025-03-21 12:05 ` [COMMITTED 052/146] gccrs: improve handling of Self Type paths arthur.cohen
2025-03-21 12:05 ` [COMMITTED 053/146] gccrs: allow casts from numeric types to floats arthur.cohen
2025-03-21 12:05 ` [COMMITTED 054/146] gccrs: ensure packed and aligned is applied properly arthur.cohen
2025-03-21 12:05 ` [COMMITTED 055/146] gccrs: lang-items: Move comment about arithmetic lang items arthur.cohen
2025-03-21 12:05 ` [COMMITTED 056/146] gccrs: mappings: Move lang_item definitions to .cc arthur.cohen
2025-03-21 12:05 ` [COMMITTED 057/146] gccrs: hir: Remove duplicate function in TraitItemFunc arthur.cohen
2025-03-21 12:05 ` [COMMITTED 058/146] gccrs: stacked-contexts: Add peek() method arthur.cohen
2025-03-21 12:06 ` [COMMITTED 059/146] gccrs: ast: Use StackedContexts class in ContextualASTVisitor arthur.cohen
2025-03-21 12:06 ` [COMMITTED 060/146] gccrs: Remove bad assertion in name resolution arthur.cohen
2025-03-21 12:06 ` [COMMITTED 061/146] gccrs: constant evaluation like these are coercion sites arthur.cohen
2025-03-21 12:06 ` [COMMITTED 062/146] gccrs: add checks for division by zero and left shift overflow arthur.cohen
2025-03-21 12:06 ` [COMMITTED 063/146] gccrs: add test case to show issue is fixed arthur.cohen
2025-03-21 12:06 ` [COMMITTED 064/146] gccrs: fix crash in hir dump arthur.cohen
2025-03-21 12:06 ` [COMMITTED 065/146] gccrs: lang-items: Store NodeId mappings for lang items arthur.cohen
2025-03-21 12:06 ` [COMMITTED 066/146] gccrs: lang-items: Add lang-items AST collector arthur.cohen
2025-03-21 12:06 ` [COMMITTED 067/146] gccrs: attributes: Add class for sharing methods on attributes arthur.cohen
2025-03-21 12:06 ` [COMMITTED 068/146] gccrs: type-check: Remove unused capture in nr2.0 arthur.cohen
2025-03-21 12:06 ` [COMMITTED 069/146] gccrs: Fix ForeverStack::find_starting_point output parameter arthur.cohen
2025-03-21 12:06 ` [COMMITTED 070/146] gccrs: ast: Add LangItemPath class arthur.cohen
2025-03-21 12:06 ` [COMMITTED 071/146] gccrs: derive(Copy): Use new LangItemPath arthur.cohen
2025-03-21 12:06 ` [COMMITTED 072/146] gccrs: hir: Start adapting visitors to accept multiple kinds of Paths arthur.cohen
2025-03-21 12:06 ` [COMMITTED 073/146] gccrs: nr1.0: Resolve lang item paths properly arthur.cohen
2025-03-21 12:06 ` [COMMITTED 074/146] gccrs: hir: Lower lang-item paths arthur.cohen
2025-03-21 12:06 ` [COMMITTED 075/146] gccrs: nr2.0: Resolve lang item paths properly arthur.cohen
2025-03-21 12:06 ` [COMMITTED 076/146] gccrs: lang-item: Remove unused NodeId from LangItemPath arthur.cohen
2025-03-21 12:06 ` [COMMITTED 077/146] gccrs: fix bad not expression in rust arthur.cohen
2025-03-21 12:06 ` [COMMITTED 078/146] gccrs: implement the TuplePattern and use it for function patterns arthur.cohen
2025-03-21 12:06 ` [COMMITTED 079/146] gccrs: Made changes to AST::TraitImpl constructor for TypePath arthur.cohen
2025-03-21 12:06 ` [COMMITTED 080/146] gccrs: add ptr to int and int to ptr type cast rules arthur.cohen
2025-03-21 12:06 ` [COMMITTED 081/146] gccrs: typecheck-path: Fix typo (reciever -> receiver) arthur.cohen
2025-03-21 12:06 ` [COMMITTED 082/146] gccrs: parser: Add testcases for multiline strings arthur.cohen
2025-03-21 12:06 ` [COMMITTED 083/146] gccrs: resolve: Name resolve trait bounds properly arthur.cohen
2025-03-21 12:06 ` [COMMITTED 084/146] gccrs: typecheck: Add note about erorring out on additional trait bounds arthur.cohen
2025-03-21 12:06 ` [COMMITTED 085/146] gccrs: lang-item: Add Sync trait arthur.cohen
2025-03-21 12:06 ` [COMMITTED 086/146] gccrs: lang-item: Add Option::{None, Some}, Iterator::next, IntoIter::into_iter arthur.cohen
2025-03-21 12:06 ` [COMMITTED 087/146] gccrs: lang-items: Collect trait functions that are lang items arthur.cohen
2025-03-21 12:06 ` [COMMITTED 088/146] gccrs: ast: Add new constructors for PathInExpression arthur.cohen
2025-03-21 12:06 ` [COMMITTED 089/146] gccrs: ast-builder: Add more methods arthur.cohen
2025-03-21 12:06 ` [COMMITTED 090/146] gccrs: Fix NR2.0 compiler ICE caused by Generics in Enums arthur.cohen
2025-03-21 12:06 ` [COMMITTED 091/146] gccrs: nr2.0: Handle "Self" properly in trait definitions arthur.cohen
2025-03-21 12:06 ` [COMMITTED 092/146] gccrs: ast: Add EnumItem::Kind arthur.cohen
2025-03-21 12:06 ` [COMMITTED 093/146] gccrs: Remove Rust::make_unique arthur.cohen
2025-03-21 12:06 ` [COMMITTED 094/146] gccrs: lower: Correctly lower parenthesized types arthur.cohen
2025-03-21 12:06 ` [COMMITTED 095/146] gccrs: tychk: Add more support for additional trait bounds in functions arthur.cohen
2025-03-21 12:06 ` [COMMITTED 096/146] gccrs: nr2.0: Resolve type aliases inside trait definitions arthur.cohen
2025-03-21 12:06 ` [COMMITTED 097/146] gccrs: ast: Add new Kind enums for more precise downcasting arthur.cohen
2025-03-21 12:06 ` [COMMITTED 098/146] gccrs: use StackedContexts for block context arthur.cohen
2025-03-21 12:06 ` [COMMITTED 099/146] gccrs: fix ICE during HIR dump arthur.cohen
2025-03-21 12:06 ` [COMMITTED 100/146] gccrs: nr2.0: Improve default, top-level, and late resolvers arthur.cohen
2025-03-21 12:06 ` [COMMITTED 101/146] gccrs: fix ICE in borrows to invalid expressions arthur.cohen
2025-03-21 12:06 ` [COMMITTED 102/146] gccrs: add support for lang_item eq and PartialEq trait arthur.cohen
2025-03-21 12:06 ` [COMMITTED 103/146] gccrs: fix ICE with hir dump on closure arthur.cohen
2025-03-21 12:06 ` [COMMITTED 104/146] gccrs: nr2.0: Resolve Self inside impl blocks arthur.cohen
2025-03-21 12:06 ` [COMMITTED 105/146] gccrs: cleanup our enum type layout to be closer to rustc arthur.cohen
2025-03-21 12:06 ` [COMMITTED 106/146] gccrs: Allow float type to be casted as integer type arthur.cohen
2025-03-21 12:06 ` [COMMITTED 107/146] gccrs: match arms are a LUB arthur.cohen
2025-03-21 12:06 ` [COMMITTED 108/146] gccrs: rust/intrinsic: add try intrinsic and panic strategy options arthur.cohen
2025-03-21 12:06 ` [COMMITTED 109/146] gccrs: rust/intrinsic: add new "catch_unwind" variant of API arthur.cohen
2025-03-21 12:06 ` [COMMITTED 110/146] gccrs: add two more tests to test try-catch (unwind) code generation arthur.cohen
2025-03-21 12:06 ` [COMMITTED 111/146] gccrs: Visit the trait paths of trait implementations arthur.cohen
2025-03-21 12:06 ` [COMMITTED 112/146] gccrs: improve mutability checks arthur.cohen
2025-03-21 12:06 ` [COMMITTED 113/146] gccrs: gcc/rust/ChangeLog: arthur.cohen
2025-03-21 12:06 ` [COMMITTED 114/146] gccrs: Add ForeverStackStore arthur.cohen
2025-03-21 12:06 ` [COMMITTED 115/146] gccrs: testsuite: Fix missing handling of little endian arthur.cohen
2025-03-21 12:06 ` [COMMITTED 116/146] gccrs: Fix scan-gimple testcases on LE platforms arthur.cohen
2025-03-21 12:06 ` [COMMITTED 117/146] gccrs: Revert "gcc/rust/ChangeLog:" arthur.cohen
2025-03-21 12:06 ` [COMMITTED 118/146] gccrs: Add missing name resolution to static items in blocks arthur.cohen
2025-03-21 12:07 ` [COMMITTED 119/146] gccrs: nr2.0: Early resolve pending eager macro invocations arthur.cohen
2025-03-21 12:07 ` [COMMITTED 120/146] gccrs: Remove dead code related to external functions arthur.cohen
2025-03-21 12:07 ` [COMMITTED 121/146] gccrs: ast: Fix warning about copy elision for moved expr arthur.cohen
2025-03-21 12:07 ` [COMMITTED 122/146] gccrs: attributes: Add #[derive] as a built-in attribute arthur.cohen
2025-03-21 12:07 ` [COMMITTED 123/146] gccrs: collect-lang-items: Display attribute upon error finding it arthur.cohen
2025-03-21 12:07 ` [COMMITTED 124/146] gccrs: ast: Refactor how lang item paths are handled arthur.cohen
2025-03-21 12:07 ` [COMMITTED 125/146] gccrs: tychk: resolve lang item type paths properly arthur.cohen
2025-03-21 12:07 ` [COMMITTED 126/146] gccrs: lower: Properly lower non-generic lang item type path segments arthur.cohen
2025-03-21 12:07 ` [COMMITTED 127/146] gccrs: lang-items: Collect struct lang items arthur.cohen
2025-03-21 12:07 ` [COMMITTED 128/146] gccrs: lang-item: Add LangItem::PrettyString arthur.cohen
2025-03-21 12:07 ` [COMMITTED 129/146] gccrs: mappings: Add get_lang_item_node arthur.cohen
2025-03-21 12:07 ` [COMMITTED 130/146] gccrs: ast-collector: Adapt to lang item type path segments arthur.cohen
2025-03-21 12:07 ` [COMMITTED 131/146] gccrs: ast-collector: Fix tuple struct pattern collection arthur.cohen
2025-03-21 12:07 ` [COMMITTED 132/146] gccrs: lang-items: Mark Clone trait as a lang item in testsuite arthur.cohen
2025-03-21 12:07 ` [COMMITTED 133/146] gccrs: builder: Allow generating struct statements arthur.cohen
2025-03-21 12:07 ` arthur.cohen [this message]
2025-03-21 12:07 ` [COMMITTED 135/146] gccrs: derive(Clone): Mark PhantomData as a lang item arthur.cohen
2025-03-21 12:07 ` [COMMITTED 136/146] gccrs: derive(Copy): Use copy lang item when deriving Copy arthur.cohen
2025-03-21 12:07 ` [COMMITTED 137/146] gccrs: ast-builder: Add new methods around type paths arthur.cohen
2025-03-21 12:07 ` [COMMITTED 138/146] gccrs: derive(Clone): Use lang item for PhantomData in Clone arthur.cohen
2025-03-21 12:07 ` [COMMITTED 139/146] gccrs: derive(Clone): Add note about Clone::clone() arthur.cohen
2025-03-21 12:07 ` [COMMITTED 140/146] gccrs: derive(Clone): Improve existing testcase arthur.cohen
2025-03-21 12:07 ` [COMMITTED 141/146] gccrs: derive(Clone): Add deriving of simple enum variants arthur.cohen
2025-03-21 12:07 ` [COMMITTED 142/146] gccrs: ast-builder: Add new methods for building structs arthur.cohen
2025-03-21 12:07 ` [COMMITTED 143/146] gccrs: derive(Clone): Implement clone for enum tuple variants arthur.cohen
2025-03-21 12:07 ` [COMMITTED 144/146] gccrs: derive(Clone): Implement derive clone for enum struct variants arthur.cohen
2025-03-21 12:07 ` [COMMITTED 145/146] gccrs: derive(Clone): Add lang item typepaths failure testcases to nr2 exclude arthur.cohen
2025-03-21 12:07 ` [COMMITTED 146/146] gccrs: nr2.0: late: Better format PathInExpression resolution arthur.cohen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250321123226.184882-135-arthur.cohen@embecosm.com \
--to=arthur.cohen@embecosm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc-rust@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).