зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1730397 - Apply prost-derive fix for function name collision. r=emilio
This applies edb1464b71
to our copy of prost 0.6.1.
Differential Revision: https://phabricator.services.mozilla.com/D125507
This commit is contained in:
Родитель
7e36533f7a
Коммит
1639e1ee88
|
@ -3889,8 +3889,6 @@ dependencies = [
|
|||
[[package]]
|
||||
name = "prost-derive"
|
||||
version = "0.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.8.2",
|
||||
|
|
|
@ -107,3 +107,6 @@ path = "third_party/rust/autocfg"
|
|||
# There is not going to be new version of mio 0.6, mio now being >= 0.7.11.
|
||||
[patch.crates-io.mio]
|
||||
path = "third_party/rust/mio"
|
||||
|
||||
[patch.crates-io.prost-derive]
|
||||
path = "third_party/rust/prost-derive"
|
||||
|
|
|
@ -104,11 +104,8 @@ fn try_message(input: TokenStream) -> Result<TokenStream, Error> {
|
|||
|
||||
let merge = fields.iter().map(|&(ref field_ident, ref field)| {
|
||||
let merge = field.merge(quote!(value));
|
||||
let tags = field
|
||||
.tags()
|
||||
.into_iter()
|
||||
.map(|tag| quote!(#tag))
|
||||
.intersperse(quote!(|));
|
||||
let tags = field.tags().into_iter().map(|tag| quote!(#tag));
|
||||
let tags = Itertools::intersperse(tags, quote!(|));
|
||||
quote! {
|
||||
#(#tags)* => {
|
||||
let mut value = &mut self.#field_ident;
|
||||
|
|
Загрузка…
Ссылка в новой задаче