Skip to content

Commit 88ba260

Browse files
committed
Prepare for a breaking change in the Rust compiler.
The soundness fix in rust-lang/rust#115008 will cause `discord` to break, even though it is not unsound. The missing bound is very hard to abuse, but still a soundness hole in our type system. It will likely take 12 weeks before a stable compiler with the soundness fix is shipped.
1 parent c1574f0 commit 88ba260

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

discord/partial_id/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub fn derive_partial(input: proc_macro::TokenStream) -> proc_macro::TokenStream
117117
*self = ::core::convert::Into::into(full);
118118
crate::request::Result::Ok(())
119119
}
120-
#vis async fn get_field<T>(&mut self, client: &crate::request::Bot, f: fn(&Self) -> &::core::option::Option<T>) -> crate::request::Result<&T> {
120+
#vis async fn get_field<'a, T: 'a>(&'a mut self, client: &crate::request::Bot, f: fn(&Self) -> &::core::option::Option<T>) -> crate::request::Result<&'a T> {
121121
crate::request::Result::Ok(match f(self) {
122122
::core::option::Option::Some(_) => {
123123
f(self).as_ref().unwrap()

0 commit comments

Comments
 (0)