gecko-dev/third_party/rust/cssparser-macros/lib.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

191 строка
5.9 KiB
Rust
Исходник Обычный вид История

Bug 1342759 - Revendor dependencies r=manishearth MozReview-Commit-ID: byBQQbHb8J --HG-- rename : third_party/rust/syn/.cargo-checksum.json => third_party/rust/syn-0.10.8/.cargo-checksum.json rename : third_party/rust/syn/Cargo.toml => third_party/rust/syn-0.10.8/Cargo.toml rename : third_party/rust/syn/src/aster/qpath.rs => third_party/rust/syn-0.10.8/src/aster/qpath.rs rename : third_party/rust/syn/src/aster/ty.rs => third_party/rust/syn-0.10.8/src/aster/ty.rs rename : third_party/rust/syn/src/attr.rs => third_party/rust/syn-0.10.8/src/attr.rs rename : third_party/rust/syn/src/escape.rs => third_party/rust/syn-0.10.8/src/escape.rs rename : third_party/rust/syn/src/expr.rs => third_party/rust/syn-0.10.8/src/expr.rs rename : third_party/rust/syn/src/generics.rs => third_party/rust/syn-0.10.8/src/generics.rs rename : third_party/rust/syn/src/helper.rs => third_party/rust/syn-0.10.8/src/helper.rs rename : third_party/rust/syn/src/ident.rs => third_party/rust/syn-0.10.8/src/ident.rs rename : third_party/rust/syn/src/item.rs => third_party/rust/syn-0.10.8/src/item.rs rename : third_party/rust/syn/src/krate.rs => third_party/rust/syn-0.10.8/src/krate.rs rename : third_party/rust/syn/src/lib.rs => third_party/rust/syn-0.10.8/src/lib.rs rename : third_party/rust/syn/src/lit.rs => third_party/rust/syn-0.10.8/src/lit.rs rename : third_party/rust/syn/src/mac.rs => third_party/rust/syn-0.10.8/src/mac.rs rename : third_party/rust/syn/src/macro_input.rs => third_party/rust/syn-0.10.8/src/macro_input.rs rename : third_party/rust/syn/src/nom.rs => third_party/rust/syn-0.10.8/src/nom.rs rename : third_party/rust/syn/src/registry.rs => third_party/rust/syn-0.10.8/src/registry.rs rename : third_party/rust/syn/src/space.rs => third_party/rust/syn-0.10.8/src/space.rs rename : third_party/rust/syn/src/ty.rs => third_party/rust/syn-0.10.8/src/ty.rs rename : third_party/rust/syn/src/visit.rs => third_party/rust/syn-0.10.8/src/visit.rs
2017-02-26 15:10:07 +03:00
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
extern crate proc_macro;
Bug 1600443 - Update cssparser and phf. r=heycam This aligns us with Servo. It pulls a new `rand` crate version, but I'm removing one in https://phabricator.services.mozilla.com/D55351, so hopefully adds up :) Differential Revision: https://phabricator.services.mozilla.com/D55359 --HG-- rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/phf_macros/Cargo.toml rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/proc-macro-hack/Cargo.toml rename : third_party/rust/rand/.cargo-checksum.json => third_party/rust/rand-0.6.5/.cargo-checksum.json rename : third_party/rust/rand/CHANGELOG.md => third_party/rust/rand-0.6.5/CHANGELOG.md rename : third_party/rust/rand/Cargo.toml => third_party/rust/rand-0.6.5/Cargo.toml rename : third_party/rust/rand/README.md => third_party/rust/rand-0.6.5/README.md rename : third_party/rust/rand/benches/distributions.rs => third_party/rust/rand-0.6.5/benches/distributions.rs rename : third_party/rust/rand/benches/generators.rs => third_party/rust/rand-0.6.5/benches/generators.rs rename : third_party/rust/rand/benches/misc.rs => third_party/rust/rand-0.6.5/benches/misc.rs rename : third_party/rust/rand/benches/seq.rs => third_party/rust/rand-0.6.5/benches/seq.rs rename : third_party/rust/rand/build.rs => third_party/rust/rand-0.6.5/build.rs rename : third_party/rust/rand/examples/monte-carlo.rs => third_party/rust/rand-0.6.5/examples/monte-carlo.rs rename : third_party/rust/rand/examples/monty-hall.rs => third_party/rust/rand-0.6.5/examples/monty-hall.rs rename : third_party/rust/rand/src/deprecated.rs => third_party/rust/rand-0.6.5/src/deprecated.rs rename : third_party/rust/rand/src/distributions/bernoulli.rs => third_party/rust/rand-0.6.5/src/distributions/bernoulli.rs rename : third_party/rust/rand/src/distributions/binomial.rs => third_party/rust/rand-0.6.5/src/distributions/binomial.rs rename : third_party/rust/rand/src/distributions/cauchy.rs => third_party/rust/rand-0.6.5/src/distributions/cauchy.rs rename : third_party/rust/rand/src/distributions/dirichlet.rs => third_party/rust/rand-0.6.5/src/distributions/dirichlet.rs rename : third_party/rust/rand/src/distributions/exponential.rs => third_party/rust/rand-0.6.5/src/distributions/exponential.rs rename : third_party/rust/rand/src/distributions/float.rs => third_party/rust/rand-0.6.5/src/distributions/float.rs rename : third_party/rust/rand/src/distributions/gamma.rs => third_party/rust/rand-0.6.5/src/distributions/gamma.rs rename : third_party/rust/rand/src/distributions/integer.rs => third_party/rust/rand-0.6.5/src/distributions/integer.rs rename : third_party/rust/rand/src/distributions/mod.rs => third_party/rust/rand-0.6.5/src/distributions/mod.rs rename : third_party/rust/rand/src/distributions/normal.rs => third_party/rust/rand-0.6.5/src/distributions/normal.rs rename : third_party/rust/rand/src/distributions/other.rs => third_party/rust/rand-0.6.5/src/distributions/other.rs rename : third_party/rust/rand/src/distributions/pareto.rs => third_party/rust/rand-0.6.5/src/distributions/pareto.rs rename : third_party/rust/rand/src/distributions/poisson.rs => third_party/rust/rand-0.6.5/src/distributions/poisson.rs rename : third_party/rust/rand/src/distributions/triangular.rs => third_party/rust/rand-0.6.5/src/distributions/triangular.rs rename : third_party/rust/rand/src/distributions/uniform.rs => third_party/rust/rand-0.6.5/src/distributions/uniform.rs rename : third_party/rust/rand/src/distributions/unit_circle.rs => third_party/rust/rand-0.6.5/src/distributions/unit_circle.rs rename : third_party/rust/rand/src/distributions/unit_sphere.rs => third_party/rust/rand-0.6.5/src/distributions/unit_sphere.rs rename : third_party/rust/rand/src/distributions/utils.rs => third_party/rust/rand-0.6.5/src/distributions/utils.rs rename : third_party/rust/rand/src/distributions/weibull.rs => third_party/rust/rand-0.6.5/src/distributions/weibull.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand-0.6.5/src/distributions/weighted.rs rename : third_party/rust/rand/src/lib.rs => third_party/rust/rand-0.6.5/src/lib.rs rename : third_party/rust/rand/src/prelude.rs => third_party/rust/rand-0.6.5/src/prelude.rs rename : third_party/rust/rand/src/prng/mod.rs => third_party/rust/rand-0.6.5/src/prng/mod.rs rename : third_party/rust/rand/src/rngs/adapter/mod.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/mod.rs rename : third_party/rust/rand/src/rngs/adapter/read.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/read.rs rename : third_party/rust/rand/src/rngs/adapter/reseeding.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/reseeding.rs rename : third_party/rust/rand/src/rngs/entropy.rs => third_party/rust/rand-0.6.5/src/rngs/entropy.rs rename : third_party/rust/rand/src/rngs/mock.rs => third_party/rust/rand-0.6.5/src/rngs/mock.rs rename : third_party/rust/rand/src/rngs/mod.rs => third_party/rust/rand-0.6.5/src/rngs/mod.rs rename : third_party/rust/rand/src/rngs/small.rs => third_party/rust/rand-0.6.5/src/rngs/small.rs rename : third_party/rust/rand/src/rngs/std.rs => third_party/rust/rand-0.6.5/src/rngs/std.rs rename : third_party/rust/rand/src/rngs/thread.rs => third_party/rust/rand-0.6.5/src/rngs/thread.rs rename : third_party/rust/rand/src/seq/index.rs => third_party/rust/rand-0.6.5/src/seq/index.rs rename : third_party/rust/rand/src/seq/mod.rs => third_party/rust/rand-0.6.5/src/seq/mod.rs rename : third_party/rust/rand/tests/uniformity.rs => third_party/rust/rand-0.6.5/tests/uniformity.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand/src/distributions/weighted/mod.rs rename : third_party/rust/rand_chacha/.cargo-checksum.json => third_party/rust/rand_chacha-0.1.1/.cargo-checksum.json rename : third_party/rust/rand_chacha/CHANGELOG.md => third_party/rust/rand_chacha-0.1.1/CHANGELOG.md rename : third_party/rust/rand_chacha/Cargo.toml => third_party/rust/rand_chacha-0.1.1/Cargo.toml rename : third_party/rust/rand_chacha/README.md => third_party/rust/rand_chacha-0.1.1/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_chacha-0.1.1/build.rs rename : third_party/rust/rand_chacha/src/chacha.rs => third_party/rust/rand_chacha-0.1.1/src/chacha.rs rename : third_party/rust/rand_chacha/src/lib.rs => third_party/rust/rand_chacha-0.1.1/src/lib.rs rename : third_party/rust/rand_core/.cargo-checksum.json => third_party/rust/rand_core-0.4.0/.cargo-checksum.json rename : third_party/rust/rand_core/CHANGELOG.md => third_party/rust/rand_core-0.4.0/CHANGELOG.md rename : third_party/rust/rand_core/Cargo.toml => third_party/rust/rand_core-0.4.0/Cargo.toml rename : third_party/rust/rand_core/README.md => third_party/rust/rand_core-0.4.0/README.md rename : third_party/rust/rand_core/src/block.rs => third_party/rust/rand_core-0.4.0/src/block.rs rename : third_party/rust/rand_core/src/error.rs => third_party/rust/rand_core-0.4.0/src/error.rs rename : third_party/rust/rand_core/src/impls.rs => third_party/rust/rand_core-0.4.0/src/impls.rs rename : third_party/rust/rand_core/src/lib.rs => third_party/rust/rand_core-0.4.0/src/lib.rs rename : third_party/rust/rand_hc/.cargo-checksum.json => third_party/rust/rand_hc-0.1.0/.cargo-checksum.json rename : third_party/rust/rand_hc/CHANGELOG.md => third_party/rust/rand_hc-0.1.0/CHANGELOG.md rename : third_party/rust/rand_hc/Cargo.toml => third_party/rust/rand_hc-0.1.0/Cargo.toml rename : third_party/rust/rand_hc/README.md => third_party/rust/rand_hc-0.1.0/README.md rename : third_party/rust/rand_hc/src/hc128.rs => third_party/rust/rand_hc-0.1.0/src/hc128.rs rename : third_party/rust/rand_hc/src/lib.rs => third_party/rust/rand_hc-0.1.0/src/lib.rs rename : third_party/rust/rand_pcg/.cargo-checksum.json => third_party/rust/rand_pcg-0.1.2/.cargo-checksum.json rename : third_party/rust/rand_pcg/CHANGELOG.md => third_party/rust/rand_pcg-0.1.2/CHANGELOG.md rename : third_party/rust/rand_pcg/Cargo.toml => third_party/rust/rand_pcg-0.1.2/Cargo.toml rename : third_party/rust/rand_pcg/README.md => third_party/rust/rand_pcg-0.1.2/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_pcg-0.1.2/build.rs rename : third_party/rust/rand_pcg/src/lib.rs => third_party/rust/rand_pcg-0.1.2/src/lib.rs rename : third_party/rust/rand_pcg/src/pcg128.rs => third_party/rust/rand_pcg-0.1.2/src/pcg128.rs rename : third_party/rust/rand_pcg/src/pcg64.rs => third_party/rust/rand_pcg-0.1.2/src/pcg64.rs rename : third_party/rust/rand_pcg/tests/lcg64xsh32.rs => third_party/rust/rand_pcg-0.1.2/tests/lcg64xsh32.rs rename : third_party/rust/rand_pcg/tests/mcg128xsl64.rs => third_party/rust/rand_pcg-0.1.2/tests/mcg128xsl64.rs extra : moz-landing-system : lando
2019-12-04 22:54:06 +03:00
use proc_macro::TokenStream;
Bug 1342759 - Revendor dependencies r=manishearth MozReview-Commit-ID: byBQQbHb8J --HG-- rename : third_party/rust/syn/.cargo-checksum.json => third_party/rust/syn-0.10.8/.cargo-checksum.json rename : third_party/rust/syn/Cargo.toml => third_party/rust/syn-0.10.8/Cargo.toml rename : third_party/rust/syn/src/aster/qpath.rs => third_party/rust/syn-0.10.8/src/aster/qpath.rs rename : third_party/rust/syn/src/aster/ty.rs => third_party/rust/syn-0.10.8/src/aster/ty.rs rename : third_party/rust/syn/src/attr.rs => third_party/rust/syn-0.10.8/src/attr.rs rename : third_party/rust/syn/src/escape.rs => third_party/rust/syn-0.10.8/src/escape.rs rename : third_party/rust/syn/src/expr.rs => third_party/rust/syn-0.10.8/src/expr.rs rename : third_party/rust/syn/src/generics.rs => third_party/rust/syn-0.10.8/src/generics.rs rename : third_party/rust/syn/src/helper.rs => third_party/rust/syn-0.10.8/src/helper.rs rename : third_party/rust/syn/src/ident.rs => third_party/rust/syn-0.10.8/src/ident.rs rename : third_party/rust/syn/src/item.rs => third_party/rust/syn-0.10.8/src/item.rs rename : third_party/rust/syn/src/krate.rs => third_party/rust/syn-0.10.8/src/krate.rs rename : third_party/rust/syn/src/lib.rs => third_party/rust/syn-0.10.8/src/lib.rs rename : third_party/rust/syn/src/lit.rs => third_party/rust/syn-0.10.8/src/lit.rs rename : third_party/rust/syn/src/mac.rs => third_party/rust/syn-0.10.8/src/mac.rs rename : third_party/rust/syn/src/macro_input.rs => third_party/rust/syn-0.10.8/src/macro_input.rs rename : third_party/rust/syn/src/nom.rs => third_party/rust/syn-0.10.8/src/nom.rs rename : third_party/rust/syn/src/registry.rs => third_party/rust/syn-0.10.8/src/registry.rs rename : third_party/rust/syn/src/space.rs => third_party/rust/syn-0.10.8/src/space.rs rename : third_party/rust/syn/src/ty.rs => third_party/rust/syn-0.10.8/src/ty.rs rename : third_party/rust/syn/src/visit.rs => third_party/rust/syn-0.10.8/src/visit.rs
2017-02-26 15:10:07 +03:00
Bug 1600443 - Update cssparser and phf. r=heycam This aligns us with Servo. It pulls a new `rand` crate version, but I'm removing one in https://phabricator.services.mozilla.com/D55351, so hopefully adds up :) Differential Revision: https://phabricator.services.mozilla.com/D55359 --HG-- rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/phf_macros/Cargo.toml rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/proc-macro-hack/Cargo.toml rename : third_party/rust/rand/.cargo-checksum.json => third_party/rust/rand-0.6.5/.cargo-checksum.json rename : third_party/rust/rand/CHANGELOG.md => third_party/rust/rand-0.6.5/CHANGELOG.md rename : third_party/rust/rand/Cargo.toml => third_party/rust/rand-0.6.5/Cargo.toml rename : third_party/rust/rand/README.md => third_party/rust/rand-0.6.5/README.md rename : third_party/rust/rand/benches/distributions.rs => third_party/rust/rand-0.6.5/benches/distributions.rs rename : third_party/rust/rand/benches/generators.rs => third_party/rust/rand-0.6.5/benches/generators.rs rename : third_party/rust/rand/benches/misc.rs => third_party/rust/rand-0.6.5/benches/misc.rs rename : third_party/rust/rand/benches/seq.rs => third_party/rust/rand-0.6.5/benches/seq.rs rename : third_party/rust/rand/build.rs => third_party/rust/rand-0.6.5/build.rs rename : third_party/rust/rand/examples/monte-carlo.rs => third_party/rust/rand-0.6.5/examples/monte-carlo.rs rename : third_party/rust/rand/examples/monty-hall.rs => third_party/rust/rand-0.6.5/examples/monty-hall.rs rename : third_party/rust/rand/src/deprecated.rs => third_party/rust/rand-0.6.5/src/deprecated.rs rename : third_party/rust/rand/src/distributions/bernoulli.rs => third_party/rust/rand-0.6.5/src/distributions/bernoulli.rs rename : third_party/rust/rand/src/distributions/binomial.rs => third_party/rust/rand-0.6.5/src/distributions/binomial.rs rename : third_party/rust/rand/src/distributions/cauchy.rs => third_party/rust/rand-0.6.5/src/distributions/cauchy.rs rename : third_party/rust/rand/src/distributions/dirichlet.rs => third_party/rust/rand-0.6.5/src/distributions/dirichlet.rs rename : third_party/rust/rand/src/distributions/exponential.rs => third_party/rust/rand-0.6.5/src/distributions/exponential.rs rename : third_party/rust/rand/src/distributions/float.rs => third_party/rust/rand-0.6.5/src/distributions/float.rs rename : third_party/rust/rand/src/distributions/gamma.rs => third_party/rust/rand-0.6.5/src/distributions/gamma.rs rename : third_party/rust/rand/src/distributions/integer.rs => third_party/rust/rand-0.6.5/src/distributions/integer.rs rename : third_party/rust/rand/src/distributions/mod.rs => third_party/rust/rand-0.6.5/src/distributions/mod.rs rename : third_party/rust/rand/src/distributions/normal.rs => third_party/rust/rand-0.6.5/src/distributions/normal.rs rename : third_party/rust/rand/src/distributions/other.rs => third_party/rust/rand-0.6.5/src/distributions/other.rs rename : third_party/rust/rand/src/distributions/pareto.rs => third_party/rust/rand-0.6.5/src/distributions/pareto.rs rename : third_party/rust/rand/src/distributions/poisson.rs => third_party/rust/rand-0.6.5/src/distributions/poisson.rs rename : third_party/rust/rand/src/distributions/triangular.rs => third_party/rust/rand-0.6.5/src/distributions/triangular.rs rename : third_party/rust/rand/src/distributions/uniform.rs => third_party/rust/rand-0.6.5/src/distributions/uniform.rs rename : third_party/rust/rand/src/distributions/unit_circle.rs => third_party/rust/rand-0.6.5/src/distributions/unit_circle.rs rename : third_party/rust/rand/src/distributions/unit_sphere.rs => third_party/rust/rand-0.6.5/src/distributions/unit_sphere.rs rename : third_party/rust/rand/src/distributions/utils.rs => third_party/rust/rand-0.6.5/src/distributions/utils.rs rename : third_party/rust/rand/src/distributions/weibull.rs => third_party/rust/rand-0.6.5/src/distributions/weibull.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand-0.6.5/src/distributions/weighted.rs rename : third_party/rust/rand/src/lib.rs => third_party/rust/rand-0.6.5/src/lib.rs rename : third_party/rust/rand/src/prelude.rs => third_party/rust/rand-0.6.5/src/prelude.rs rename : third_party/rust/rand/src/prng/mod.rs => third_party/rust/rand-0.6.5/src/prng/mod.rs rename : third_party/rust/rand/src/rngs/adapter/mod.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/mod.rs rename : third_party/rust/rand/src/rngs/adapter/read.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/read.rs rename : third_party/rust/rand/src/rngs/adapter/reseeding.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/reseeding.rs rename : third_party/rust/rand/src/rngs/entropy.rs => third_party/rust/rand-0.6.5/src/rngs/entropy.rs rename : third_party/rust/rand/src/rngs/mock.rs => third_party/rust/rand-0.6.5/src/rngs/mock.rs rename : third_party/rust/rand/src/rngs/mod.rs => third_party/rust/rand-0.6.5/src/rngs/mod.rs rename : third_party/rust/rand/src/rngs/small.rs => third_party/rust/rand-0.6.5/src/rngs/small.rs rename : third_party/rust/rand/src/rngs/std.rs => third_party/rust/rand-0.6.5/src/rngs/std.rs rename : third_party/rust/rand/src/rngs/thread.rs => third_party/rust/rand-0.6.5/src/rngs/thread.rs rename : third_party/rust/rand/src/seq/index.rs => third_party/rust/rand-0.6.5/src/seq/index.rs rename : third_party/rust/rand/src/seq/mod.rs => third_party/rust/rand-0.6.5/src/seq/mod.rs rename : third_party/rust/rand/tests/uniformity.rs => third_party/rust/rand-0.6.5/tests/uniformity.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand/src/distributions/weighted/mod.rs rename : third_party/rust/rand_chacha/.cargo-checksum.json => third_party/rust/rand_chacha-0.1.1/.cargo-checksum.json rename : third_party/rust/rand_chacha/CHANGELOG.md => third_party/rust/rand_chacha-0.1.1/CHANGELOG.md rename : third_party/rust/rand_chacha/Cargo.toml => third_party/rust/rand_chacha-0.1.1/Cargo.toml rename : third_party/rust/rand_chacha/README.md => third_party/rust/rand_chacha-0.1.1/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_chacha-0.1.1/build.rs rename : third_party/rust/rand_chacha/src/chacha.rs => third_party/rust/rand_chacha-0.1.1/src/chacha.rs rename : third_party/rust/rand_chacha/src/lib.rs => third_party/rust/rand_chacha-0.1.1/src/lib.rs rename : third_party/rust/rand_core/.cargo-checksum.json => third_party/rust/rand_core-0.4.0/.cargo-checksum.json rename : third_party/rust/rand_core/CHANGELOG.md => third_party/rust/rand_core-0.4.0/CHANGELOG.md rename : third_party/rust/rand_core/Cargo.toml => third_party/rust/rand_core-0.4.0/Cargo.toml rename : third_party/rust/rand_core/README.md => third_party/rust/rand_core-0.4.0/README.md rename : third_party/rust/rand_core/src/block.rs => third_party/rust/rand_core-0.4.0/src/block.rs rename : third_party/rust/rand_core/src/error.rs => third_party/rust/rand_core-0.4.0/src/error.rs rename : third_party/rust/rand_core/src/impls.rs => third_party/rust/rand_core-0.4.0/src/impls.rs rename : third_party/rust/rand_core/src/lib.rs => third_party/rust/rand_core-0.4.0/src/lib.rs rename : third_party/rust/rand_hc/.cargo-checksum.json => third_party/rust/rand_hc-0.1.0/.cargo-checksum.json rename : third_party/rust/rand_hc/CHANGELOG.md => third_party/rust/rand_hc-0.1.0/CHANGELOG.md rename : third_party/rust/rand_hc/Cargo.toml => third_party/rust/rand_hc-0.1.0/Cargo.toml rename : third_party/rust/rand_hc/README.md => third_party/rust/rand_hc-0.1.0/README.md rename : third_party/rust/rand_hc/src/hc128.rs => third_party/rust/rand_hc-0.1.0/src/hc128.rs rename : third_party/rust/rand_hc/src/lib.rs => third_party/rust/rand_hc-0.1.0/src/lib.rs rename : third_party/rust/rand_pcg/.cargo-checksum.json => third_party/rust/rand_pcg-0.1.2/.cargo-checksum.json rename : third_party/rust/rand_pcg/CHANGELOG.md => third_party/rust/rand_pcg-0.1.2/CHANGELOG.md rename : third_party/rust/rand_pcg/Cargo.toml => third_party/rust/rand_pcg-0.1.2/Cargo.toml rename : third_party/rust/rand_pcg/README.md => third_party/rust/rand_pcg-0.1.2/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_pcg-0.1.2/build.rs rename : third_party/rust/rand_pcg/src/lib.rs => third_party/rust/rand_pcg-0.1.2/src/lib.rs rename : third_party/rust/rand_pcg/src/pcg128.rs => third_party/rust/rand_pcg-0.1.2/src/pcg128.rs rename : third_party/rust/rand_pcg/src/pcg64.rs => third_party/rust/rand_pcg-0.1.2/src/pcg64.rs rename : third_party/rust/rand_pcg/tests/lcg64xsh32.rs => third_party/rust/rand_pcg-0.1.2/tests/lcg64xsh32.rs rename : third_party/rust/rand_pcg/tests/mcg128xsl64.rs => third_party/rust/rand_pcg-0.1.2/tests/mcg128xsl64.rs extra : moz-landing-system : lando
2019-12-04 22:54:06 +03:00
#[proc_macro]
pub fn _cssparser_internal_max_len(input: TokenStream) -> TokenStream {
struct Input {
max_length: usize,
Bug 1342759 - Revendor dependencies r=manishearth MozReview-Commit-ID: byBQQbHb8J --HG-- rename : third_party/rust/syn/.cargo-checksum.json => third_party/rust/syn-0.10.8/.cargo-checksum.json rename : third_party/rust/syn/Cargo.toml => third_party/rust/syn-0.10.8/Cargo.toml rename : third_party/rust/syn/src/aster/qpath.rs => third_party/rust/syn-0.10.8/src/aster/qpath.rs rename : third_party/rust/syn/src/aster/ty.rs => third_party/rust/syn-0.10.8/src/aster/ty.rs rename : third_party/rust/syn/src/attr.rs => third_party/rust/syn-0.10.8/src/attr.rs rename : third_party/rust/syn/src/escape.rs => third_party/rust/syn-0.10.8/src/escape.rs rename : third_party/rust/syn/src/expr.rs => third_party/rust/syn-0.10.8/src/expr.rs rename : third_party/rust/syn/src/generics.rs => third_party/rust/syn-0.10.8/src/generics.rs rename : third_party/rust/syn/src/helper.rs => third_party/rust/syn-0.10.8/src/helper.rs rename : third_party/rust/syn/src/ident.rs => third_party/rust/syn-0.10.8/src/ident.rs rename : third_party/rust/syn/src/item.rs => third_party/rust/syn-0.10.8/src/item.rs rename : third_party/rust/syn/src/krate.rs => third_party/rust/syn-0.10.8/src/krate.rs rename : third_party/rust/syn/src/lib.rs => third_party/rust/syn-0.10.8/src/lib.rs rename : third_party/rust/syn/src/lit.rs => third_party/rust/syn-0.10.8/src/lit.rs rename : third_party/rust/syn/src/mac.rs => third_party/rust/syn-0.10.8/src/mac.rs rename : third_party/rust/syn/src/macro_input.rs => third_party/rust/syn-0.10.8/src/macro_input.rs rename : third_party/rust/syn/src/nom.rs => third_party/rust/syn-0.10.8/src/nom.rs rename : third_party/rust/syn/src/registry.rs => third_party/rust/syn-0.10.8/src/registry.rs rename : third_party/rust/syn/src/space.rs => third_party/rust/syn-0.10.8/src/space.rs rename : third_party/rust/syn/src/ty.rs => third_party/rust/syn-0.10.8/src/ty.rs rename : third_party/rust/syn/src/visit.rs => third_party/rust/syn-0.10.8/src/visit.rs
2017-02-26 15:10:07 +03:00
}
Bug 1600443 - Update cssparser and phf. r=heycam This aligns us with Servo. It pulls a new `rand` crate version, but I'm removing one in https://phabricator.services.mozilla.com/D55351, so hopefully adds up :) Differential Revision: https://phabricator.services.mozilla.com/D55359 --HG-- rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/phf_macros/Cargo.toml rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/proc-macro-hack/Cargo.toml rename : third_party/rust/rand/.cargo-checksum.json => third_party/rust/rand-0.6.5/.cargo-checksum.json rename : third_party/rust/rand/CHANGELOG.md => third_party/rust/rand-0.6.5/CHANGELOG.md rename : third_party/rust/rand/Cargo.toml => third_party/rust/rand-0.6.5/Cargo.toml rename : third_party/rust/rand/README.md => third_party/rust/rand-0.6.5/README.md rename : third_party/rust/rand/benches/distributions.rs => third_party/rust/rand-0.6.5/benches/distributions.rs rename : third_party/rust/rand/benches/generators.rs => third_party/rust/rand-0.6.5/benches/generators.rs rename : third_party/rust/rand/benches/misc.rs => third_party/rust/rand-0.6.5/benches/misc.rs rename : third_party/rust/rand/benches/seq.rs => third_party/rust/rand-0.6.5/benches/seq.rs rename : third_party/rust/rand/build.rs => third_party/rust/rand-0.6.5/build.rs rename : third_party/rust/rand/examples/monte-carlo.rs => third_party/rust/rand-0.6.5/examples/monte-carlo.rs rename : third_party/rust/rand/examples/monty-hall.rs => third_party/rust/rand-0.6.5/examples/monty-hall.rs rename : third_party/rust/rand/src/deprecated.rs => third_party/rust/rand-0.6.5/src/deprecated.rs rename : third_party/rust/rand/src/distributions/bernoulli.rs => third_party/rust/rand-0.6.5/src/distributions/bernoulli.rs rename : third_party/rust/rand/src/distributions/binomial.rs => third_party/rust/rand-0.6.5/src/distributions/binomial.rs rename : third_party/rust/rand/src/distributions/cauchy.rs => third_party/rust/rand-0.6.5/src/distributions/cauchy.rs rename : third_party/rust/rand/src/distributions/dirichlet.rs => third_party/rust/rand-0.6.5/src/distributions/dirichlet.rs rename : third_party/rust/rand/src/distributions/exponential.rs => third_party/rust/rand-0.6.5/src/distributions/exponential.rs rename : third_party/rust/rand/src/distributions/float.rs => third_party/rust/rand-0.6.5/src/distributions/float.rs rename : third_party/rust/rand/src/distributions/gamma.rs => third_party/rust/rand-0.6.5/src/distributions/gamma.rs rename : third_party/rust/rand/src/distributions/integer.rs => third_party/rust/rand-0.6.5/src/distributions/integer.rs rename : third_party/rust/rand/src/distributions/mod.rs => third_party/rust/rand-0.6.5/src/distributions/mod.rs rename : third_party/rust/rand/src/distributions/normal.rs => third_party/rust/rand-0.6.5/src/distributions/normal.rs rename : third_party/rust/rand/src/distributions/other.rs => third_party/rust/rand-0.6.5/src/distributions/other.rs rename : third_party/rust/rand/src/distributions/pareto.rs => third_party/rust/rand-0.6.5/src/distributions/pareto.rs rename : third_party/rust/rand/src/distributions/poisson.rs => third_party/rust/rand-0.6.5/src/distributions/poisson.rs rename : third_party/rust/rand/src/distributions/triangular.rs => third_party/rust/rand-0.6.5/src/distributions/triangular.rs rename : third_party/rust/rand/src/distributions/uniform.rs => third_party/rust/rand-0.6.5/src/distributions/uniform.rs rename : third_party/rust/rand/src/distributions/unit_circle.rs => third_party/rust/rand-0.6.5/src/distributions/unit_circle.rs rename : third_party/rust/rand/src/distributions/unit_sphere.rs => third_party/rust/rand-0.6.5/src/distributions/unit_sphere.rs rename : third_party/rust/rand/src/distributions/utils.rs => third_party/rust/rand-0.6.5/src/distributions/utils.rs rename : third_party/rust/rand/src/distributions/weibull.rs => third_party/rust/rand-0.6.5/src/distributions/weibull.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand-0.6.5/src/distributions/weighted.rs rename : third_party/rust/rand/src/lib.rs => third_party/rust/rand-0.6.5/src/lib.rs rename : third_party/rust/rand/src/prelude.rs => third_party/rust/rand-0.6.5/src/prelude.rs rename : third_party/rust/rand/src/prng/mod.rs => third_party/rust/rand-0.6.5/src/prng/mod.rs rename : third_party/rust/rand/src/rngs/adapter/mod.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/mod.rs rename : third_party/rust/rand/src/rngs/adapter/read.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/read.rs rename : third_party/rust/rand/src/rngs/adapter/reseeding.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/reseeding.rs rename : third_party/rust/rand/src/rngs/entropy.rs => third_party/rust/rand-0.6.5/src/rngs/entropy.rs rename : third_party/rust/rand/src/rngs/mock.rs => third_party/rust/rand-0.6.5/src/rngs/mock.rs rename : third_party/rust/rand/src/rngs/mod.rs => third_party/rust/rand-0.6.5/src/rngs/mod.rs rename : third_party/rust/rand/src/rngs/small.rs => third_party/rust/rand-0.6.5/src/rngs/small.rs rename : third_party/rust/rand/src/rngs/std.rs => third_party/rust/rand-0.6.5/src/rngs/std.rs rename : third_party/rust/rand/src/rngs/thread.rs => third_party/rust/rand-0.6.5/src/rngs/thread.rs rename : third_party/rust/rand/src/seq/index.rs => third_party/rust/rand-0.6.5/src/seq/index.rs rename : third_party/rust/rand/src/seq/mod.rs => third_party/rust/rand-0.6.5/src/seq/mod.rs rename : third_party/rust/rand/tests/uniformity.rs => third_party/rust/rand-0.6.5/tests/uniformity.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand/src/distributions/weighted/mod.rs rename : third_party/rust/rand_chacha/.cargo-checksum.json => third_party/rust/rand_chacha-0.1.1/.cargo-checksum.json rename : third_party/rust/rand_chacha/CHANGELOG.md => third_party/rust/rand_chacha-0.1.1/CHANGELOG.md rename : third_party/rust/rand_chacha/Cargo.toml => third_party/rust/rand_chacha-0.1.1/Cargo.toml rename : third_party/rust/rand_chacha/README.md => third_party/rust/rand_chacha-0.1.1/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_chacha-0.1.1/build.rs rename : third_party/rust/rand_chacha/src/chacha.rs => third_party/rust/rand_chacha-0.1.1/src/chacha.rs rename : third_party/rust/rand_chacha/src/lib.rs => third_party/rust/rand_chacha-0.1.1/src/lib.rs rename : third_party/rust/rand_core/.cargo-checksum.json => third_party/rust/rand_core-0.4.0/.cargo-checksum.json rename : third_party/rust/rand_core/CHANGELOG.md => third_party/rust/rand_core-0.4.0/CHANGELOG.md rename : third_party/rust/rand_core/Cargo.toml => third_party/rust/rand_core-0.4.0/Cargo.toml rename : third_party/rust/rand_core/README.md => third_party/rust/rand_core-0.4.0/README.md rename : third_party/rust/rand_core/src/block.rs => third_party/rust/rand_core-0.4.0/src/block.rs rename : third_party/rust/rand_core/src/error.rs => third_party/rust/rand_core-0.4.0/src/error.rs rename : third_party/rust/rand_core/src/impls.rs => third_party/rust/rand_core-0.4.0/src/impls.rs rename : third_party/rust/rand_core/src/lib.rs => third_party/rust/rand_core-0.4.0/src/lib.rs rename : third_party/rust/rand_hc/.cargo-checksum.json => third_party/rust/rand_hc-0.1.0/.cargo-checksum.json rename : third_party/rust/rand_hc/CHANGELOG.md => third_party/rust/rand_hc-0.1.0/CHANGELOG.md rename : third_party/rust/rand_hc/Cargo.toml => third_party/rust/rand_hc-0.1.0/Cargo.toml rename : third_party/rust/rand_hc/README.md => third_party/rust/rand_hc-0.1.0/README.md rename : third_party/rust/rand_hc/src/hc128.rs => third_party/rust/rand_hc-0.1.0/src/hc128.rs rename : third_party/rust/rand_hc/src/lib.rs => third_party/rust/rand_hc-0.1.0/src/lib.rs rename : third_party/rust/rand_pcg/.cargo-checksum.json => third_party/rust/rand_pcg-0.1.2/.cargo-checksum.json rename : third_party/rust/rand_pcg/CHANGELOG.md => third_party/rust/rand_pcg-0.1.2/CHANGELOG.md rename : third_party/rust/rand_pcg/Cargo.toml => third_party/rust/rand_pcg-0.1.2/Cargo.toml rename : third_party/rust/rand_pcg/README.md => third_party/rust/rand_pcg-0.1.2/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_pcg-0.1.2/build.rs rename : third_party/rust/rand_pcg/src/lib.rs => third_party/rust/rand_pcg-0.1.2/src/lib.rs rename : third_party/rust/rand_pcg/src/pcg128.rs => third_party/rust/rand_pcg-0.1.2/src/pcg128.rs rename : third_party/rust/rand_pcg/src/pcg64.rs => third_party/rust/rand_pcg-0.1.2/src/pcg64.rs rename : third_party/rust/rand_pcg/tests/lcg64xsh32.rs => third_party/rust/rand_pcg-0.1.2/tests/lcg64xsh32.rs rename : third_party/rust/rand_pcg/tests/mcg128xsl64.rs => third_party/rust/rand_pcg-0.1.2/tests/mcg128xsl64.rs extra : moz-landing-system : lando
2019-12-04 22:54:06 +03:00
impl syn::parse::Parse for Input {
fn parse(input: syn::parse::ParseStream) -> syn::parse::Result<Self> {
let mut max_length = 0;
while !input.is_empty() {
if input.peek(syn::Token![_]) {
input.parse::<syn::Token![_]>().unwrap();
continue;
}
let lit: syn::LitStr = input.parse()?;
let value = lit.value();
if value.to_ascii_lowercase() != value {
return Err(syn::Error::new(lit.span(), "must be ASCII-lowercase"));
}
max_length = max_length.max(value.len());
}
Ok(Input { max_length })
Bug 1342759 - Revendor dependencies r=manishearth MozReview-Commit-ID: byBQQbHb8J --HG-- rename : third_party/rust/syn/.cargo-checksum.json => third_party/rust/syn-0.10.8/.cargo-checksum.json rename : third_party/rust/syn/Cargo.toml => third_party/rust/syn-0.10.8/Cargo.toml rename : third_party/rust/syn/src/aster/qpath.rs => third_party/rust/syn-0.10.8/src/aster/qpath.rs rename : third_party/rust/syn/src/aster/ty.rs => third_party/rust/syn-0.10.8/src/aster/ty.rs rename : third_party/rust/syn/src/attr.rs => third_party/rust/syn-0.10.8/src/attr.rs rename : third_party/rust/syn/src/escape.rs => third_party/rust/syn-0.10.8/src/escape.rs rename : third_party/rust/syn/src/expr.rs => third_party/rust/syn-0.10.8/src/expr.rs rename : third_party/rust/syn/src/generics.rs => third_party/rust/syn-0.10.8/src/generics.rs rename : third_party/rust/syn/src/helper.rs => third_party/rust/syn-0.10.8/src/helper.rs rename : third_party/rust/syn/src/ident.rs => third_party/rust/syn-0.10.8/src/ident.rs rename : third_party/rust/syn/src/item.rs => third_party/rust/syn-0.10.8/src/item.rs rename : third_party/rust/syn/src/krate.rs => third_party/rust/syn-0.10.8/src/krate.rs rename : third_party/rust/syn/src/lib.rs => third_party/rust/syn-0.10.8/src/lib.rs rename : third_party/rust/syn/src/lit.rs => third_party/rust/syn-0.10.8/src/lit.rs rename : third_party/rust/syn/src/mac.rs => third_party/rust/syn-0.10.8/src/mac.rs rename : third_party/rust/syn/src/macro_input.rs => third_party/rust/syn-0.10.8/src/macro_input.rs rename : third_party/rust/syn/src/nom.rs => third_party/rust/syn-0.10.8/src/nom.rs rename : third_party/rust/syn/src/registry.rs => third_party/rust/syn-0.10.8/src/registry.rs rename : third_party/rust/syn/src/space.rs => third_party/rust/syn-0.10.8/src/space.rs rename : third_party/rust/syn/src/ty.rs => third_party/rust/syn-0.10.8/src/ty.rs rename : third_party/rust/syn/src/visit.rs => third_party/rust/syn-0.10.8/src/visit.rs
2017-02-26 15:10:07 +03:00
}
}
Bug 1342759 - Revendor dependencies r=manishearth MozReview-Commit-ID: byBQQbHb8J --HG-- rename : third_party/rust/syn/.cargo-checksum.json => third_party/rust/syn-0.10.8/.cargo-checksum.json rename : third_party/rust/syn/Cargo.toml => third_party/rust/syn-0.10.8/Cargo.toml rename : third_party/rust/syn/src/aster/qpath.rs => third_party/rust/syn-0.10.8/src/aster/qpath.rs rename : third_party/rust/syn/src/aster/ty.rs => third_party/rust/syn-0.10.8/src/aster/ty.rs rename : third_party/rust/syn/src/attr.rs => third_party/rust/syn-0.10.8/src/attr.rs rename : third_party/rust/syn/src/escape.rs => third_party/rust/syn-0.10.8/src/escape.rs rename : third_party/rust/syn/src/expr.rs => third_party/rust/syn-0.10.8/src/expr.rs rename : third_party/rust/syn/src/generics.rs => third_party/rust/syn-0.10.8/src/generics.rs rename : third_party/rust/syn/src/helper.rs => third_party/rust/syn-0.10.8/src/helper.rs rename : third_party/rust/syn/src/ident.rs => third_party/rust/syn-0.10.8/src/ident.rs rename : third_party/rust/syn/src/item.rs => third_party/rust/syn-0.10.8/src/item.rs rename : third_party/rust/syn/src/krate.rs => third_party/rust/syn-0.10.8/src/krate.rs rename : third_party/rust/syn/src/lib.rs => third_party/rust/syn-0.10.8/src/lib.rs rename : third_party/rust/syn/src/lit.rs => third_party/rust/syn-0.10.8/src/lit.rs rename : third_party/rust/syn/src/mac.rs => third_party/rust/syn-0.10.8/src/mac.rs rename : third_party/rust/syn/src/macro_input.rs => third_party/rust/syn-0.10.8/src/macro_input.rs rename : third_party/rust/syn/src/nom.rs => third_party/rust/syn-0.10.8/src/nom.rs rename : third_party/rust/syn/src/registry.rs => third_party/rust/syn-0.10.8/src/registry.rs rename : third_party/rust/syn/src/space.rs => third_party/rust/syn-0.10.8/src/space.rs rename : third_party/rust/syn/src/ty.rs => third_party/rust/syn-0.10.8/src/ty.rs rename : third_party/rust/syn/src/visit.rs => third_party/rust/syn-0.10.8/src/visit.rs
2017-02-26 15:10:07 +03:00
Bug 1600443 - Update cssparser and phf. r=heycam This aligns us with Servo. It pulls a new `rand` crate version, but I'm removing one in https://phabricator.services.mozilla.com/D55351, so hopefully adds up :) Differential Revision: https://phabricator.services.mozilla.com/D55359 --HG-- rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/phf_macros/Cargo.toml rename : third_party/rust/cssparser-macros/Cargo.toml => third_party/rust/proc-macro-hack/Cargo.toml rename : third_party/rust/rand/.cargo-checksum.json => third_party/rust/rand-0.6.5/.cargo-checksum.json rename : third_party/rust/rand/CHANGELOG.md => third_party/rust/rand-0.6.5/CHANGELOG.md rename : third_party/rust/rand/Cargo.toml => third_party/rust/rand-0.6.5/Cargo.toml rename : third_party/rust/rand/README.md => third_party/rust/rand-0.6.5/README.md rename : third_party/rust/rand/benches/distributions.rs => third_party/rust/rand-0.6.5/benches/distributions.rs rename : third_party/rust/rand/benches/generators.rs => third_party/rust/rand-0.6.5/benches/generators.rs rename : third_party/rust/rand/benches/misc.rs => third_party/rust/rand-0.6.5/benches/misc.rs rename : third_party/rust/rand/benches/seq.rs => third_party/rust/rand-0.6.5/benches/seq.rs rename : third_party/rust/rand/build.rs => third_party/rust/rand-0.6.5/build.rs rename : third_party/rust/rand/examples/monte-carlo.rs => third_party/rust/rand-0.6.5/examples/monte-carlo.rs rename : third_party/rust/rand/examples/monty-hall.rs => third_party/rust/rand-0.6.5/examples/monty-hall.rs rename : third_party/rust/rand/src/deprecated.rs => third_party/rust/rand-0.6.5/src/deprecated.rs rename : third_party/rust/rand/src/distributions/bernoulli.rs => third_party/rust/rand-0.6.5/src/distributions/bernoulli.rs rename : third_party/rust/rand/src/distributions/binomial.rs => third_party/rust/rand-0.6.5/src/distributions/binomial.rs rename : third_party/rust/rand/src/distributions/cauchy.rs => third_party/rust/rand-0.6.5/src/distributions/cauchy.rs rename : third_party/rust/rand/src/distributions/dirichlet.rs => third_party/rust/rand-0.6.5/src/distributions/dirichlet.rs rename : third_party/rust/rand/src/distributions/exponential.rs => third_party/rust/rand-0.6.5/src/distributions/exponential.rs rename : third_party/rust/rand/src/distributions/float.rs => third_party/rust/rand-0.6.5/src/distributions/float.rs rename : third_party/rust/rand/src/distributions/gamma.rs => third_party/rust/rand-0.6.5/src/distributions/gamma.rs rename : third_party/rust/rand/src/distributions/integer.rs => third_party/rust/rand-0.6.5/src/distributions/integer.rs rename : third_party/rust/rand/src/distributions/mod.rs => third_party/rust/rand-0.6.5/src/distributions/mod.rs rename : third_party/rust/rand/src/distributions/normal.rs => third_party/rust/rand-0.6.5/src/distributions/normal.rs rename : third_party/rust/rand/src/distributions/other.rs => third_party/rust/rand-0.6.5/src/distributions/other.rs rename : third_party/rust/rand/src/distributions/pareto.rs => third_party/rust/rand-0.6.5/src/distributions/pareto.rs rename : third_party/rust/rand/src/distributions/poisson.rs => third_party/rust/rand-0.6.5/src/distributions/poisson.rs rename : third_party/rust/rand/src/distributions/triangular.rs => third_party/rust/rand-0.6.5/src/distributions/triangular.rs rename : third_party/rust/rand/src/distributions/uniform.rs => third_party/rust/rand-0.6.5/src/distributions/uniform.rs rename : third_party/rust/rand/src/distributions/unit_circle.rs => third_party/rust/rand-0.6.5/src/distributions/unit_circle.rs rename : third_party/rust/rand/src/distributions/unit_sphere.rs => third_party/rust/rand-0.6.5/src/distributions/unit_sphere.rs rename : third_party/rust/rand/src/distributions/utils.rs => third_party/rust/rand-0.6.5/src/distributions/utils.rs rename : third_party/rust/rand/src/distributions/weibull.rs => third_party/rust/rand-0.6.5/src/distributions/weibull.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand-0.6.5/src/distributions/weighted.rs rename : third_party/rust/rand/src/lib.rs => third_party/rust/rand-0.6.5/src/lib.rs rename : third_party/rust/rand/src/prelude.rs => third_party/rust/rand-0.6.5/src/prelude.rs rename : third_party/rust/rand/src/prng/mod.rs => third_party/rust/rand-0.6.5/src/prng/mod.rs rename : third_party/rust/rand/src/rngs/adapter/mod.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/mod.rs rename : third_party/rust/rand/src/rngs/adapter/read.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/read.rs rename : third_party/rust/rand/src/rngs/adapter/reseeding.rs => third_party/rust/rand-0.6.5/src/rngs/adapter/reseeding.rs rename : third_party/rust/rand/src/rngs/entropy.rs => third_party/rust/rand-0.6.5/src/rngs/entropy.rs rename : third_party/rust/rand/src/rngs/mock.rs => third_party/rust/rand-0.6.5/src/rngs/mock.rs rename : third_party/rust/rand/src/rngs/mod.rs => third_party/rust/rand-0.6.5/src/rngs/mod.rs rename : third_party/rust/rand/src/rngs/small.rs => third_party/rust/rand-0.6.5/src/rngs/small.rs rename : third_party/rust/rand/src/rngs/std.rs => third_party/rust/rand-0.6.5/src/rngs/std.rs rename : third_party/rust/rand/src/rngs/thread.rs => third_party/rust/rand-0.6.5/src/rngs/thread.rs rename : third_party/rust/rand/src/seq/index.rs => third_party/rust/rand-0.6.5/src/seq/index.rs rename : third_party/rust/rand/src/seq/mod.rs => third_party/rust/rand-0.6.5/src/seq/mod.rs rename : third_party/rust/rand/tests/uniformity.rs => third_party/rust/rand-0.6.5/tests/uniformity.rs rename : third_party/rust/rand/src/distributions/weighted.rs => third_party/rust/rand/src/distributions/weighted/mod.rs rename : third_party/rust/rand_chacha/.cargo-checksum.json => third_party/rust/rand_chacha-0.1.1/.cargo-checksum.json rename : third_party/rust/rand_chacha/CHANGELOG.md => third_party/rust/rand_chacha-0.1.1/CHANGELOG.md rename : third_party/rust/rand_chacha/Cargo.toml => third_party/rust/rand_chacha-0.1.1/Cargo.toml rename : third_party/rust/rand_chacha/README.md => third_party/rust/rand_chacha-0.1.1/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_chacha-0.1.1/build.rs rename : third_party/rust/rand_chacha/src/chacha.rs => third_party/rust/rand_chacha-0.1.1/src/chacha.rs rename : third_party/rust/rand_chacha/src/lib.rs => third_party/rust/rand_chacha-0.1.1/src/lib.rs rename : third_party/rust/rand_core/.cargo-checksum.json => third_party/rust/rand_core-0.4.0/.cargo-checksum.json rename : third_party/rust/rand_core/CHANGELOG.md => third_party/rust/rand_core-0.4.0/CHANGELOG.md rename : third_party/rust/rand_core/Cargo.toml => third_party/rust/rand_core-0.4.0/Cargo.toml rename : third_party/rust/rand_core/README.md => third_party/rust/rand_core-0.4.0/README.md rename : third_party/rust/rand_core/src/block.rs => third_party/rust/rand_core-0.4.0/src/block.rs rename : third_party/rust/rand_core/src/error.rs => third_party/rust/rand_core-0.4.0/src/error.rs rename : third_party/rust/rand_core/src/impls.rs => third_party/rust/rand_core-0.4.0/src/impls.rs rename : third_party/rust/rand_core/src/lib.rs => third_party/rust/rand_core-0.4.0/src/lib.rs rename : third_party/rust/rand_hc/.cargo-checksum.json => third_party/rust/rand_hc-0.1.0/.cargo-checksum.json rename : third_party/rust/rand_hc/CHANGELOG.md => third_party/rust/rand_hc-0.1.0/CHANGELOG.md rename : third_party/rust/rand_hc/Cargo.toml => third_party/rust/rand_hc-0.1.0/Cargo.toml rename : third_party/rust/rand_hc/README.md => third_party/rust/rand_hc-0.1.0/README.md rename : third_party/rust/rand_hc/src/hc128.rs => third_party/rust/rand_hc-0.1.0/src/hc128.rs rename : third_party/rust/rand_hc/src/lib.rs => third_party/rust/rand_hc-0.1.0/src/lib.rs rename : third_party/rust/rand_pcg/.cargo-checksum.json => third_party/rust/rand_pcg-0.1.2/.cargo-checksum.json rename : third_party/rust/rand_pcg/CHANGELOG.md => third_party/rust/rand_pcg-0.1.2/CHANGELOG.md rename : third_party/rust/rand_pcg/Cargo.toml => third_party/rust/rand_pcg-0.1.2/Cargo.toml rename : third_party/rust/rand_pcg/README.md => third_party/rust/rand_pcg-0.1.2/README.md rename : third_party/rust/rand_chacha/build.rs => third_party/rust/rand_pcg-0.1.2/build.rs rename : third_party/rust/rand_pcg/src/lib.rs => third_party/rust/rand_pcg-0.1.2/src/lib.rs rename : third_party/rust/rand_pcg/src/pcg128.rs => third_party/rust/rand_pcg-0.1.2/src/pcg128.rs rename : third_party/rust/rand_pcg/src/pcg64.rs => third_party/rust/rand_pcg-0.1.2/src/pcg64.rs rename : third_party/rust/rand_pcg/tests/lcg64xsh32.rs => third_party/rust/rand_pcg-0.1.2/tests/lcg64xsh32.rs rename : third_party/rust/rand_pcg/tests/mcg128xsl64.rs => third_party/rust/rand_pcg-0.1.2/tests/mcg128xsl64.rs extra : moz-landing-system : lando
2019-12-04 22:54:06 +03:00
let Input { max_length } = syn::parse_macro_input!(input);
quote::quote!(
pub(super) const MAX_LENGTH: usize = #max_length;
)
.into()
Bug 1342759 - Revendor dependencies r=manishearth MozReview-Commit-ID: byBQQbHb8J --HG-- rename : third_party/rust/syn/.cargo-checksum.json => third_party/rust/syn-0.10.8/.cargo-checksum.json rename : third_party/rust/syn/Cargo.toml => third_party/rust/syn-0.10.8/Cargo.toml rename : third_party/rust/syn/src/aster/qpath.rs => third_party/rust/syn-0.10.8/src/aster/qpath.rs rename : third_party/rust/syn/src/aster/ty.rs => third_party/rust/syn-0.10.8/src/aster/ty.rs rename : third_party/rust/syn/src/attr.rs => third_party/rust/syn-0.10.8/src/attr.rs rename : third_party/rust/syn/src/escape.rs => third_party/rust/syn-0.10.8/src/escape.rs rename : third_party/rust/syn/src/expr.rs => third_party/rust/syn-0.10.8/src/expr.rs rename : third_party/rust/syn/src/generics.rs => third_party/rust/syn-0.10.8/src/generics.rs rename : third_party/rust/syn/src/helper.rs => third_party/rust/syn-0.10.8/src/helper.rs rename : third_party/rust/syn/src/ident.rs => third_party/rust/syn-0.10.8/src/ident.rs rename : third_party/rust/syn/src/item.rs => third_party/rust/syn-0.10.8/src/item.rs rename : third_party/rust/syn/src/krate.rs => third_party/rust/syn-0.10.8/src/krate.rs rename : third_party/rust/syn/src/lib.rs => third_party/rust/syn-0.10.8/src/lib.rs rename : third_party/rust/syn/src/lit.rs => third_party/rust/syn-0.10.8/src/lit.rs rename : third_party/rust/syn/src/mac.rs => third_party/rust/syn-0.10.8/src/mac.rs rename : third_party/rust/syn/src/macro_input.rs => third_party/rust/syn-0.10.8/src/macro_input.rs rename : third_party/rust/syn/src/nom.rs => third_party/rust/syn-0.10.8/src/nom.rs rename : third_party/rust/syn/src/registry.rs => third_party/rust/syn-0.10.8/src/registry.rs rename : third_party/rust/syn/src/space.rs => third_party/rust/syn-0.10.8/src/space.rs rename : third_party/rust/syn/src/ty.rs => third_party/rust/syn-0.10.8/src/ty.rs rename : third_party/rust/syn/src/visit.rs => third_party/rust/syn-0.10.8/src/visit.rs
2017-02-26 15:10:07 +03:00
}
fn get_byte_from_lit(lit: &syn::Lit) -> u8 {
if let syn::Lit::Byte(ref byte) = *lit {
byte.value()
} else {
panic!("Found a pattern that wasn't a byte")
}
}
fn get_byte_from_expr_lit(expr: &syn::Expr) -> u8 {
match *expr {
syn::Expr::Lit(syn::ExprLit { ref lit, .. }) => {
get_byte_from_lit(lit)
}
_ => unreachable!(),
}
}
/// Parse a pattern and fill the table accordingly
fn parse_pat_to_table<'a>(
pat: &'a syn::Pat,
case_id: u8,
wildcard: &mut Option<&'a syn::Ident>,
table: &mut [u8; 256],
) {
match pat {
&syn::Pat::Lit(syn::PatLit { ref lit, .. }) => {
let value = get_byte_from_lit(lit);
if table[value as usize] == 0 {
table[value as usize] = case_id;
}
}
&syn::Pat::Range(syn::PatRange { ref start, ref end, .. }) => {
let lo = get_byte_from_expr_lit(&start.as_ref().unwrap());
let hi = get_byte_from_expr_lit(&end.as_ref().unwrap());
for value in lo..hi {
if table[value as usize] == 0 {
table[value as usize] = case_id;
}
}
if table[hi as usize] == 0 {
table[hi as usize] = case_id;
}
}
&syn::Pat::Wild(_) => {
for byte in table.iter_mut() {
if *byte == 0 {
*byte = case_id;
}
}
}
&syn::Pat::Ident(syn::PatIdent { ref ident, .. }) => {
assert_eq!(*wildcard, None);
*wildcard = Some(ident);
for byte in table.iter_mut() {
if *byte == 0 {
*byte = case_id;
}
}
}
&syn::Pat::Or(syn::PatOr { ref cases, .. }) => {
for case in cases {
parse_pat_to_table(case, case_id, wildcard, table);
}
}
_ => {
panic!("Unexpected pattern: {:?}. Buggy code ?", pat);
}
}
}
/// Expand a TokenStream corresponding to the `match_byte` macro.
///
/// ## Example
///
/// ```rust
/// match_byte! { tokenizer.next_byte_unchecked(),
/// b'a'..b'z' => { ... }
/// b'0'..b'9' => { ... }
/// b'\n' | b'\\' => { ... }
/// foo => { ... }
/// }
/// ```
///
#[proc_macro]
pub fn match_byte(input: TokenStream) -> TokenStream {
use syn::spanned::Spanned;
struct MatchByte {
expr: syn::Expr,
arms: Vec<syn::Arm>,
}
impl syn::parse::Parse for MatchByte {
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
Ok(MatchByte {
expr: {
let expr = input.parse()?;
input.parse::<syn::Token![,]>()?;
expr
},
arms: {
let mut arms = Vec::new();
while !input.is_empty() {
let arm = input.call(syn::Arm::parse)?;
assert!(arm.guard.is_none(), "match_byte doesn't support guards");
assert!(
arm.attrs.is_empty(),
"match_byte doesn't support attributes"
);
arms.push(arm);
}
arms
},
})
}
}
let MatchByte { expr, arms } = syn::parse_macro_input!(input);
let mut cases = Vec::new();
let mut table = [0u8; 256];
let mut match_body = Vec::new();
let mut wildcard = None;
for (i, ref arm) in arms.iter().enumerate() {
let case_id = i + 1;
let index = case_id as isize;
let name = syn::Ident::new(&format!("Case{}", case_id), arm.span());
let pat = &arm.pat;
parse_pat_to_table(pat, case_id as u8, &mut wildcard, &mut table);
cases.push(quote::quote!(#name = #index));
let body = &arm.body;
match_body.push(quote::quote!(Case::#name => { #body }))
}
let en = quote::quote!(enum Case {
#(#cases),*
});
let mut table_content = Vec::new();
for entry in table.iter() {
let name: syn::Path = syn::parse_str(&format!("Case::Case{}", entry)).unwrap();
table_content.push(name);
}
let table = quote::quote!(static __CASES: [Case; 256] = [#(#table_content),*];);
if let Some(binding) = wildcard {
quote::quote!({ #en #table let #binding = #expr; match __CASES[#binding as usize] { #(#match_body),* }})
} else {
quote::quote!({ #en #table match __CASES[#expr as usize] { #(#match_body),* }})
}.into()
}