mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Bump version of dyn-any to address missues which could lead to ub (#1145)
* Make StaticType trait unsafe * Mark StaticTypeSized and StaticTypeClone as unsafe as well * Update dyn-any dependency * Update manifest links
This commit is contained in:
committed by
Keavon Chambers
parent
9db5ad43bf
commit
1d6c4f13dd
@@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "dyn-any-derive"
|
||||
version = "0.2.1"
|
||||
version = "0.3.0"
|
||||
edition = "2021"
|
||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
|
||||
description = "#[derive(DynAny)]"
|
||||
documentation = "https://docs.rs/dyn-any-derive"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite/tree/master/libraries/dyn-any/derive"
|
||||
license = "MIT OR Apache-2.0"
|
||||
readme = "../README.md"
|
||||
|
||||
@@ -16,7 +16,13 @@ proc-macro = true
|
||||
[dependencies]
|
||||
proc-macro2 = "1"
|
||||
quote = "1"
|
||||
syn = { version = "1", default-features = false, features = ["derive", "parsing", "proc-macro", "printing"] }
|
||||
syn = { version = "1", default-features = false, features = [
|
||||
"derive",
|
||||
"parsing",
|
||||
"proc-macro",
|
||||
"printing",
|
||||
"clone-impls",
|
||||
] }
|
||||
|
||||
[dev-dependencies]
|
||||
dyn-any = { path = "..", features = ["derive"] }
|
||||
|
||||
@@ -46,7 +46,7 @@ pub fn system_desc_derive(input: TokenStream) -> TokenStream {
|
||||
|
||||
let old_params = &generics.params.iter().collect::<Vec<_>>();
|
||||
quote! {
|
||||
impl<'dyn_any, #(#old_params,)*> StaticType for #struct_name <#(#dyn_params,)*> {
|
||||
unsafe impl<'dyn_any, #(#old_params,)*> StaticType for #struct_name <#(#dyn_params,)*> {
|
||||
type Static = #struct_name <#(#static_params,)*>;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user