Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes needed for rust and clang updates #160

Merged
merged 2 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions rpm/0103-Bug-1716518-Upgrade-rental-to-v0.5.6.-r-emilio.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mike Hommey <[email protected]>
Date: Tue, 15 Jun 2021 20:39:42 +0000
Subject: [PATCH] Bug 1716518 - Upgrade rental to v0.5.6. r=emilio

Differential Revision: https://phabricator.services.mozilla.com/D117748
---
Cargo.lock | 4 ++--
third_party/rust/rental/.cargo-checksum.json | 2 +-
third_party/rust/rental/Cargo.toml | 2 +-
third_party/rust/rental/README.md | 5 ++++-
third_party/rust/rental/src/lib.rs | 10 +++++-----
5 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 990d6a4a582b1d24e4e377084f1efb6838e573f6..ecd1e025b8dd5e42982af3c9b4c7a61534461056 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3993,9 +3993,9 @@ dependencies = [

[[package]]
name = "rental"
-version = "0.5.5"
+version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f"
+checksum = "cc89fe2acac36d212474d138aaf939c04a82df5b61d07011571ebce5aef81f2e"
dependencies = [
"rental-impl",
"stable_deref_trait",
diff --git a/third_party/rust/rental/.cargo-checksum.json b/third_party/rust/rental/.cargo-checksum.json
index 24a34677109d076edbbf86b60322a78ea5309a35..020e203d55288252aa9aec6c609f067488f024b6 100644
--- a/third_party/rust/rental/.cargo-checksum.json
+++ b/third_party/rust/rental/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"Cargo.toml":"99e1c578dbb4b110ee59a7ba54e0812067bda50b2e39954a86c95db0cbcbc460","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0caa93d2b69a83cfb0c2d4db6b782a5dba5ecc4f9fa1f54b04b268af739bf868","README.md":"f45eef4d1177d0b66657e49fbda9dfc963b2a0110e5825e9c9b19d9d9a26dd3d","src/lib.rs":"2cfcf8833642107e34dab2a4457a9c9be144b21dd6d37090444f055067fd551b","tests/clone.rs":"0bf3267771ef8b3bf3c0d0ab98b7e99597c808f50596e0b6c12dfd5598eaf820","tests/complex.rs":"7c7f685e7ae7435698e34f8c29bd5bd8b89143ea43c3381a4627d366902b1285","tests/complex_mut.rs":"374d4a0782b00a5679b55d73b112c424977c0dba525072fadf0fc96ed00f632a","tests/covariant.rs":"fc5697208f44b96047e6423f8b9621a379e29cc5709dcf91f860f1424ef2a0d1","tests/debug.rs":"38e345ca450effc80898a267a1214a72d615441fa31697410ed1465638b85813","tests/drop_order.rs":"8c98fef9f0ea4eac8cebbd384be8c8e8db6d5aaffe42b83a6390e74d91dfd1ac","tests/generic.rs":"2f9d7aa9cc3dd3887b7270835cad8d914150b9809fb41430dc317b14788d3fa5","tests/lt_params.rs":"4f3e9252a35836c4a3a76a68b4fe4eeedb002169b278a0cbc82705716b2a3e6a","tests/map.rs":"314c5cd5163e6bef174fd7a4e37d9b8b9248d4e71f3387f5d6aa29ee784332b7","tests/simple_mut.rs":"beaabd34ed1c06c2f60d05c19c103c32588f52621e7a953e1bf3e2a0759cb09d","tests/simple_ref.rs":"aa64fa94f08926957293129cd26c128c6be21934f026bd052aa9b49a2e8987c7","tests/string.rs":"4e12df6b4e67991c8d912422935f75f2b0016dfa2d26a3305532fc98facc7c67","tests/subrental.rs":"dad1f751c9c8ef3b76e1be6513ae7419ddd16032e5fd71d8baa445d3d3f9e044","tests/target_ty_hack.rs":"d13301dbfb36646eb461928edbb088fe4ed5b01934c12fa1c2b3cd486f7bfb8d","tests/trait.rs":"b3697d80b7b61238401d133f53d058d2e3ad17e6925cc45ed8b8718bcf755e1a","tests/unused.rs":"e420e6d13bcd8b8e3def4a77e8de6502fdf5fd55d44ccad611f16e57c2d67704","tests/vec_slice.rs":"bd2826caeba5ae64268c0e2aed870afacc6d8ba3da850a309b19c7f0b17428eb"},"package":"8545debe98b2b139fb04cad8618b530e9b07c152d99a5de83c860b877d67847f"}
\ No newline at end of file
+{"files":{"Cargo.toml":"84a87592ab606b0ec7cf484472679111fc1513ab6f493f496a876d432e1f77ab","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"0caa93d2b69a83cfb0c2d4db6b782a5dba5ecc4f9fa1f54b04b268af739bf868","README.md":"d0abd379ad7ad547be83a98d6dabecfe6ea2ec53b811c50ddc2d4bb09a9448a0","src/lib.rs":"da0e1cbfcaa47662e74216231ddc1cd10a450d79132decbe99d05832649301e1","tests/clone.rs":"0bf3267771ef8b3bf3c0d0ab98b7e99597c808f50596e0b6c12dfd5598eaf820","tests/complex.rs":"7c7f685e7ae7435698e34f8c29bd5bd8b89143ea43c3381a4627d366902b1285","tests/complex_mut.rs":"374d4a0782b00a5679b55d73b112c424977c0dba525072fadf0fc96ed00f632a","tests/covariant.rs":"fc5697208f44b96047e6423f8b9621a379e29cc5709dcf91f860f1424ef2a0d1","tests/debug.rs":"38e345ca450effc80898a267a1214a72d615441fa31697410ed1465638b85813","tests/drop_order.rs":"8c98fef9f0ea4eac8cebbd384be8c8e8db6d5aaffe42b83a6390e74d91dfd1ac","tests/generic.rs":"2f9d7aa9cc3dd3887b7270835cad8d914150b9809fb41430dc317b14788d3fa5","tests/lt_params.rs":"4f3e9252a35836c4a3a76a68b4fe4eeedb002169b278a0cbc82705716b2a3e6a","tests/map.rs":"314c5cd5163e6bef174fd7a4e37d9b8b9248d4e71f3387f5d6aa29ee784332b7","tests/simple_mut.rs":"beaabd34ed1c06c2f60d05c19c103c32588f52621e7a953e1bf3e2a0759cb09d","tests/simple_ref.rs":"aa64fa94f08926957293129cd26c128c6be21934f026bd052aa9b49a2e8987c7","tests/string.rs":"4e12df6b4e67991c8d912422935f75f2b0016dfa2d26a3305532fc98facc7c67","tests/subrental.rs":"dad1f751c9c8ef3b76e1be6513ae7419ddd16032e5fd71d8baa445d3d3f9e044","tests/target_ty_hack.rs":"d13301dbfb36646eb461928edbb088fe4ed5b01934c12fa1c2b3cd486f7bfb8d","tests/trait.rs":"b3697d80b7b61238401d133f53d058d2e3ad17e6925cc45ed8b8718bcf755e1a","tests/unused.rs":"e420e6d13bcd8b8e3def4a77e8de6502fdf5fd55d44ccad611f16e57c2d67704","tests/vec_slice.rs":"bd2826caeba5ae64268c0e2aed870afacc6d8ba3da850a309b19c7f0b17428eb"},"package":"cc89fe2acac36d212474d138aaf939c04a82df5b61d07011571ebce5aef81f2e"}
\ No newline at end of file
diff --git a/third_party/rust/rental/Cargo.toml b/third_party/rust/rental/Cargo.toml
index 2634b4881dc3873b5d121a061a3e00ce75a1162c..ef2e79c313b005567e194071cfba2df96781a989 100644
--- a/third_party/rust/rental/Cargo.toml
+++ b/third_party/rust/rental/Cargo.toml
@@ -12,7 +12,7 @@

[package]
name = "rental"
-version = "0.5.5"
+version = "0.5.6"
authors = ["Jameson Ernst <[email protected]>"]
description = "A macro to generate safe self-referential structs, plus premade types for common use cases."
documentation = "https://docs.rs/rental"
diff --git a/third_party/rust/rental/README.md b/third_party/rust/rental/README.md
index 4124f178cf65ef8674ae468178cb04092d7e458e..c8624275ed97ad8386fbbf16845cd2fa3b27e0e4 100644
--- a/third_party/rust/rental/README.md
+++ b/third_party/rust/rental/README.md
@@ -1,10 +1,13 @@
+# WARNING: This crate is NO LONGER MAINTAINED OR SUPPORTED
+I'm not going to yank the crate because it's still fit for its intended purpose, but as time goes on it will become increasingly out of step with Rust's evolution, so users are encouraged to explore other solutions. I will also not merge any pull requests, as the code is sufficiently complicated that I'm no longer confident in my ability to effectively review them. Rental can be considered "frozen" in its current state, and any further development will need to take place under a fork for whoever wishes to do so.
+
# Rental - A macro to generate safe self-referential structs, plus premade types for common use cases.

[Documentation](http://docs.rs/rental)

# Overview
It can sometimes occur in the course of designing an API that it would be convenient, or even necessary, to allow fields within a struct to hold references to other fields within that same struct. Rust's concept of ownership and borrowing is powerful, but can't express such a scenario yet.
-//!
+
Creating such a struct manually would require unsafe code to erase lifetime parameters from the field types. Accessing the fields directly would be completely unsafe as a result. This library addresses that issue by allowing access to the internal fields only under carefully controlled circumstances, through closures that are bounded by generic lifetimes to prevent infiltration or exfiltration of any data with an incorrect lifetime. In short, while the struct internally uses unsafe code to store the fields, the interface exposed to the consumer of the struct is completely safe. The implementation of this interface is subtle and verbose, hence the macro to automate the process.

The API of this crate consists of the `rental` macro that generates safe self-referential structs, a few example instantiations to demonstrate the API provided by such structs (see `examples`), and a module of premade instantiations to cover common use cases (see `common`).
diff --git a/third_party/rust/rental/src/lib.rs b/third_party/rust/rental/src/lib.rs
index d7c9f8aaaf0b8fe20aad5c793da231ef5493287a..c3907d150359f7551f513530fe0212851d5a985f 100644
--- a/third_party/rust/rental/src/lib.rs
+++ b/third_party/rust/rental/src/lib.rs
@@ -1,4 +1,4 @@
-//! A macro to generate safe self-referntial structs, plus premade types for common use cases.
+//! A macro to generate safe self-referential structs, plus premade types for common use cases.
//!
//! # Overview
//! It can sometimes occur in the course of designing an API that it would be convenient, or even necessary, to allow fields within a struct to hold references to other fields within that same struct. Rust's concept of ownership and borrowing is powerful, but can't express such a scenario yet.
@@ -92,7 +92,7 @@ macro_rules! define_rental_traits {
#[allow(unused)]
#[derive(__rental_traits)]
enum ProceduralMasqueradeDummyType {
- Input = (0, stringify!($max_arity)).0
+ Input = (0, stringify!($max_arity)).0,
}
};
}
@@ -238,7 +238,7 @@ macro_rules! rental {
#[allow(unused)]
#[derive(__rental_structs_and_impls)]
enum ProceduralMasqueradeDummyType {
- Input = (0, stringify!($($body)*)).0
+ Input = (0, stringify!($($body)*)).0,
}
}
};
@@ -256,7 +256,7 @@ macro_rules! rental {
#[allow(unused)]
#[derive(__rental_structs_and_impls)]
enum ProceduralMasqueradeDummyType {
- Input = (0, stringify!($($body)*)).0
+ Input = (0, stringify!($($body)*)).0,
}
}
};
@@ -274,7 +274,7 @@ macro_rules! rental {
#[allow(unused)]
#[derive(__rental_structs_and_impls)]
enum ProceduralMasqueradeDummyType {
- Input = (0, stringify!($($body)*)).0
+ Input = (0, stringify!($($body)*)).0,
}
}
};
Loading