| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
| |
We're going to want to do more complex things here.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Use the standard multiplicity technique rather than the ad-hoc impl on
Option. This allows us to support an ad-hoc parsing function for a
field that's `Option`.
Disentangle the `label` field attribute, which did both setting the
label, and expecting a different parsing approach: replace it with
`with`.
|
| |
|
|
|
| |
This mistake escaped because this wasn't actually checked by the code,
but it's going to be checked in a moment.
|
| |
|
|
|
| |
The previous code didn't compile at all, and this went unnoticed
because it wasn't used by the poc.
|
| |
|
|
| |
Without this, parsing of Option and Vec argument fields doesn't work.
|
| |
|
|
|
| |
This macro has some problems which I'm going to fix. Add a test case
for the parts that are currently working.
|
| | |
|
| |
|
|
| |
`problem` is the `#[source]`.
|
| |
|
|
| |
`#[from]` is not `#[source]`. We need to print the inner error.
|
| |
|
|
| |
Worsify formatting as demanded by rustdoc.
|
| | |
|
| |
|
|
| |
Otherwise it's easy to get confuseed by ---- dividers for Objects.
|
| |
|
|
| |
For reasons, TestResult doesn't print error sources.
|
| | |
|
| |
|
|
|
| |
This is needed when using these macros in a namespace with a local
redefinition of `Result`.
|
| |
|
|
| |
I triggered this error and it didn't work right.
|
| |
|
|
| |
Closes #2107
|
| |
|
|
| |
Worsify formatting as demanded by rustfmt.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, this diff
> --- a/crates/tor-netdoc/src/parse2/poc/netstatus.rs
> +++ b/crates/tor-netdoc/src/parse2/poc/netstatus.rs
> @@ -24,5 +24,4 @@ pub enum NdaNetworkStatusVersion {
> /// `params` value
> #[derive(Clone, Debug, Default, Deftly)]
> -#[derive_deftly(ItemValueParseable)]
> #[non_exhaustive]
> pub struct NdiParams {
gives the errors below. So the first reported error points to the
errant field, albeit with the slightly mendacious phrasing "this
call".
Previously there was only the 2nd message. Disagnosing that requires
hunting through the document struct looking for fields of the right
type, which can be seriously awkward when there are type aliases
involved as there often are in tor-netdoc.
> error[E0277]: the trait bound `parse2::poc::netstatus::NdiParams: parse2::traits::ItemValueParseable` is not satisfied
> --> crates/tor-netdoc/src/parse2/poc/netstatus/flavoured.rs:27:10
> |
> 27 | #[derive(Deftly, Clone, Debug)]
> | ^^^^^^ the trait `parse2::traits::ItemValueParseable` is not implemented for `parse2::poc::netstatus::NdiParams`
> ...
> 55 | pub params: NdiParams,
> | ------ required by a bound introduced by this call
> |
> = help: the following other types implement trait `parse2::traits::ItemValueParseable`:
> ()
> (T0, T1)
> (T0, T1, T2)
> (T0, T1, T2, T3)
> (T0, T1, T2, T3, T4)
> (T0, T1, T2, T3, T4, T5)
> (T0, T1, T2, T3, T4, T5, T6)
> (T0, T1, T2, T3, T4, T5, T6, T7)
> and 16 others
> note: required by a bound in `parse2::multiplicity::ItemSetMethods::check_item_value_parseable`
> --> crates/tor-netdoc/src/parse2/multiplicity.rs:109:59
> |
> 109 | fn check_item_value_parseable(self) where Self::Each: ItemValueParseable {}
> | ^^^^^^^^^^^^^^^^^^ required by this bound in `ItemSetMethods::check_item_value_parseable`
>
> error[E0277]: the trait bound `parse2::poc::netstatus::NdiParams: parse2::traits::ItemValueParseable` is not satisfied
> --> crates/tor-netdoc/src/parse2/derive.rs:438:34
> |
> 438 | let item = ItemValueParseable::from_unparsed(item)?;
> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `parse2::traits::ItemValueParseable` is not implemented for `parse2::poc::netstatus::NdiParams`
> |
> ::: crates/tor-netdoc/src/parse2/poc/netstatus/flavoured.rs:27:10
> |
> 27 | #[derive(Deftly, Clone, Debug)]
> | ------ in this derive macro expansion
> |
> = help: the following other types implement trait `parse2::traits::ItemValueParseable`:
> ()
> (T0, T1)
> (T0, T1, T2)
> (T0, T1, T2, T3)
> (T0, T1, T2, T3, T4)
> (T0, T1, T2, T3, T4, T5)
> (T0, T1, T2, T3, T4, T5, T6)
> (T0, T1, T2, T3, T4, T5, T6, T7)
> and 16 others
> = note: this error originates in the macro `derive_deftly_template_NetdocParseable` which comes from the expansion of the derive macro `Deftly` (in Nightly builds, run with -Z macro-backtrace for more info)
|
| |
|
|
| |
We're going to reuse this.
|
| | |
|
| |
|
|
| |
As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/3186#note_3249820
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
We're going to use this to check that we can accept a sub-document
before we parse it. That will make the error come out in the right
place.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Change from two loops over fields and two ${when}, to one loop with
${select1}. There will be another arm in a moment.
|
| |
|
|
| |
None of these things support enums or unions.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
Per policy, we bump the minor version of every tor-*, arti-* crate
on each release.
We have updated our MSRV, so we're treating this as a breaking
change for our non-(arti/tor)-prefixed crates too.
|
| | |
|
| |\
| |
| |
| |
| | |
Upgrade various dependencies in preparation for next release
See merge request tpo/core/arti!3188
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
We're going to want to reuse this.
|
| | |
| |
| |
| | |
We're going to make this depend on $ftype differently.
|
| | |
| |
| |
| | |
This corrects the error message.
|
| | | |
|
| | |
| |
| |
| |
| | |
The netstatus doc poc does test most of the functionality, but I want
some tests of edge cases that that misses.
|
| |/
|
|
| |
Actually report the intro item, as the docs state.
|