summaryrefslogtreecommitdiffstats
path: root/vendor/tracing-core
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /vendor/tracing-core
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/tracing-core')
-rw-r--r--vendor/tracing-core/.cargo-checksum.json2
-rw-r--r--vendor/tracing-core/CHANGELOG.md15
-rw-r--r--vendor/tracing-core/Cargo.toml2
-rw-r--r--vendor/tracing-core/src/callsite.rs4
-rw-r--r--vendor/tracing-core/src/dispatcher.rs4
-rw-r--r--vendor/tracing-core/src/field.rs50
-rw-r--r--vendor/tracing-core/src/lib.rs6
7 files changed, 42 insertions, 41 deletions
diff --git a/vendor/tracing-core/.cargo-checksum.json b/vendor/tracing-core/.cargo-checksum.json
index d20a01f63..a44537271 100644
--- a/vendor/tracing-core/.cargo-checksum.json
+++ b/vendor/tracing-core/.cargo-checksum.json
@@ -1 +1 @@
-{"files":{"CHANGELOG.md":"1f044fab25d2edb95969e22142f9426e3749f5fb919689d837b4bd189d4ae96b","Cargo.toml":"9083a9bee87a9b05b524869863e8962b45fd4e4e2a271a24803b649d481c9d04","LICENSE":"898b1ae9821e98daf8964c8d6c7f61641f5f5aa78ad500020771c0939ee0dea1","README.md":"0ace2b660151cc4aa04d954daef0b60151c2f797d695dfb0b78d931f497c82ac","src/callsite.rs":"479f3b3809afff20ac2a4652f11ec1adc8dd59bd90c608e4e248de4a43c5a43c","src/dispatcher.rs":"5f1a4f6aeb67544710e4b2f38826cd6ec3924a5fcacf8a483ffd90726abed2ee","src/event.rs":"f2673bf5d266972e567e521c9cd92fb33f28b0c7e010937e3bc2bf9eb483087f","src/field.rs":"c18f60f4268f601f75b35a549ca7f50aed0a7a8752c22effaea30b6e32235760","src/lazy.rs":"318e3558e4446abf26294287167c0788e343044a28072f9217bd985929809087","src/lib.rs":"92744b1b632f57c99e08e6ccd68aa56dc8074586d5c46b3058e602364f5d047a","src/metadata.rs":"319e8a80804c7e927595e73d2139c027b2c4d58887af4a95ab2bb3411e7ab3d1","src/parent.rs":"5d5ad733343280a64a1feb6a008e186c39305ec554f14279012b8d7915821471","src/span.rs":"dcf2135e4ca158c1be45007f0be25426c375a4081f8f3c5a4d7f7382d8a950a4","src/spin/LICENSE":"58545fed1565e42d687aecec6897d35c6d37ccb71479a137c0deb2203e125c79","src/spin/mod.rs":"c458ce5e875acb7fbfb279f23254f4924d7c6d6fee419b740800d2e8087d1524","src/spin/mutex.rs":"4d30ff2b59b18fd7909f016e1abdf9aa0c04aa11d047a46e98cffe1319e32dad","src/spin/once.rs":"3781fd4eae0db04d80c03a039906c99b1e01d1583b29ac0144e6fbbd5a0fef0b","src/stdlib.rs":"698693062b8109cace3ffea02e9c2372b7d5b5d43c0b11cb4800b0e7b1a69971","src/subscriber.rs":"c7b6d52633e479bcad50fc30e1bf596339e575533761d269498cfc79e99020ef","tests/common/mod.rs":"0bbb217baa17df0f96cc1ff57dfa74ccc5a959e7f66b15bb7d25d5f43358a278","tests/dispatch.rs":"d3f000fab43734a854c82a7783142910c5e79f806cbd3f8ec5eded598c59ddb1","tests/global_dispatch.rs":"cdc05d77e448ee8b50bfb930abafa3f19b4c6f922b7bebc7797fa1dbdaa1d398","tests/local_dispatch_before_init.rs":"338846cd519e9a3a6895f958b11bd3f97e4350d08adb50f95b8552113a593b0d","tests/macros.rs":"b1603d888b349c8d103794deceec3b1ae4538b8d3eba805f3f561899e8ad0dd2"},"package":"0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a"} \ No newline at end of file
+{"files":{"CHANGELOG.md":"5c72ced3c4b609b6121b0ca5f980f8292f8b542d3f11c7b97581f23fd6ab7e1b","Cargo.toml":"7ae6601ad9768415a61eba2be6c82e30c71c6d3c76561f230ce6eafa2e66255f","LICENSE":"898b1ae9821e98daf8964c8d6c7f61641f5f5aa78ad500020771c0939ee0dea1","README.md":"0ace2b660151cc4aa04d954daef0b60151c2f797d695dfb0b78d931f497c82ac","src/callsite.rs":"83789dd16601faa675e2c75e1bbfe1512c2d4b405b880bf99db2a6f6bbb15363","src/dispatcher.rs":"2a751f9256e8418105d1f7134fd80500f39b920c8a17b02eaf3dcd701d1737ad","src/event.rs":"f2673bf5d266972e567e521c9cd92fb33f28b0c7e010937e3bc2bf9eb483087f","src/field.rs":"0f7ec541d932beae7ee67d0fcb09cfeabacdcb4ee6310a7b20f9fb07a75e091f","src/lazy.rs":"318e3558e4446abf26294287167c0788e343044a28072f9217bd985929809087","src/lib.rs":"d0f56d6d890f721e1d769376f500dc3e80b7ac969330c98049c344fda47a107a","src/metadata.rs":"319e8a80804c7e927595e73d2139c027b2c4d58887af4a95ab2bb3411e7ab3d1","src/parent.rs":"5d5ad733343280a64a1feb6a008e186c39305ec554f14279012b8d7915821471","src/span.rs":"dcf2135e4ca158c1be45007f0be25426c375a4081f8f3c5a4d7f7382d8a950a4","src/spin/LICENSE":"58545fed1565e42d687aecec6897d35c6d37ccb71479a137c0deb2203e125c79","src/spin/mod.rs":"c458ce5e875acb7fbfb279f23254f4924d7c6d6fee419b740800d2e8087d1524","src/spin/mutex.rs":"4d30ff2b59b18fd7909f016e1abdf9aa0c04aa11d047a46e98cffe1319e32dad","src/spin/once.rs":"3781fd4eae0db04d80c03a039906c99b1e01d1583b29ac0144e6fbbd5a0fef0b","src/stdlib.rs":"698693062b8109cace3ffea02e9c2372b7d5b5d43c0b11cb4800b0e7b1a69971","src/subscriber.rs":"c7b6d52633e479bcad50fc30e1bf596339e575533761d269498cfc79e99020ef","tests/common/mod.rs":"0bbb217baa17df0f96cc1ff57dfa74ccc5a959e7f66b15bb7d25d5f43358a278","tests/dispatch.rs":"d3f000fab43734a854c82a7783142910c5e79f806cbd3f8ec5eded598c59ddb1","tests/global_dispatch.rs":"cdc05d77e448ee8b50bfb930abafa3f19b4c6f922b7bebc7797fa1dbdaa1d398","tests/local_dispatch_before_init.rs":"338846cd519e9a3a6895f958b11bd3f97e4350d08adb50f95b8552113a593b0d","tests/macros.rs":"b1603d888b349c8d103794deceec3b1ae4538b8d3eba805f3f561899e8ad0dd2"},"package":"c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"} \ No newline at end of file
diff --git a/vendor/tracing-core/CHANGELOG.md b/vendor/tracing-core/CHANGELOG.md
index 706b410f3..2e92f74fb 100644
--- a/vendor/tracing-core/CHANGELOG.md
+++ b/vendor/tracing-core/CHANGELOG.md
@@ -1,3 +1,18 @@
+# 0.1.32 (October 13, 2023)
+
+### Documented
+
+- Fix typo in `field` docs ([#2611])
+- Remove duplicate wording ([#2674])
+
+### Changed
+
+- Allow `ValueSet`s of any length ([#2508])
+
+[#2611]: https://github.com/tokio-rs/tracing/pull/2611
+[#2674]: https://github.com/tokio-rs/tracing/pull/2674
+[#2508]: https://github.com/tokio-rs/tracing/pull/2508
+
# 0.1.31 (May 11, 2023)
This release of `tracing-core` fixes a bug that caused threads which call
diff --git a/vendor/tracing-core/Cargo.toml b/vendor/tracing-core/Cargo.toml
index 72adbca4f..961b391de 100644
--- a/vendor/tracing-core/Cargo.toml
+++ b/vendor/tracing-core/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.56.0"
name = "tracing-core"
-version = "0.1.31"
+version = "0.1.32"
authors = ["Tokio Contributors <team@tokio.rs>"]
description = """
Core primitives for application-level tracing.
diff --git a/vendor/tracing-core/src/callsite.rs b/vendor/tracing-core/src/callsite.rs
index f88713236..62fa8c4af 100644
--- a/vendor/tracing-core/src/callsite.rs
+++ b/vendor/tracing-core/src/callsite.rs
@@ -9,9 +9,7 @@
//! * Storing the span or event's [`Metadata`],
//! * Uniquely [identifying](Identifier) the span or event definition,
//! * Caching the subscriber's [`Interest`][^1] in that span or event, to avoid
-//! re-evaluating filters,
-//! * Storing a [`Registration`] that allows the callsite to be part of a global
-//! list of all callsites in the program.
+//! re-evaluating filters.
//!
//! # Registering Callsites
//!
diff --git a/vendor/tracing-core/src/dispatcher.rs b/vendor/tracing-core/src/dispatcher.rs
index 32632abdc..de02afb79 100644
--- a/vendor/tracing-core/src/dispatcher.rs
+++ b/vendor/tracing-core/src/dispatcher.rs
@@ -518,8 +518,8 @@ impl Dispatch {
}
}
- /// Registers a new callsite with this collector, returning whether or not
- /// the collector is interested in being notified about the callsite.
+ /// Registers a new callsite with this subscriber, returning whether or not
+ /// the subscriber is interested in being notified about the callsite.
///
/// This calls the [`register_callsite`] function on the [`Subscriber`]
/// that this `Dispatch` forwards to.
diff --git a/vendor/tracing-core/src/field.rs b/vendor/tracing-core/src/field.rs
index 04b8e1b29..90c4eaa85 100644
--- a/vendor/tracing-core/src/field.rs
+++ b/vendor/tracing-core/src/field.rs
@@ -1,13 +1,13 @@
//! `Span` and `Event` key-value data.
//!
-//! Spans and events may be annotated with key-value data, referred to as known
-//! as _fields_. These fields consist of a mapping from a key (corresponding to
-//! a `&str` but represented internally as an array index) to a [`Value`].
+//! Spans and events may be annotated with key-value data, known as _fields_.
+//! These fields consist of a mapping from a key (corresponding to a `&str` but
+//! represented internally as an array index) to a [`Value`].
//!
//! # `Value`s and `Subscriber`s
//!
//! `Subscriber`s consume `Value`s as fields attached to [span]s or [`Event`]s.
-//! The set of field keys on a given span or is defined on its [`Metadata`].
+//! The set of field keys on a given span or event is defined on its [`Metadata`].
//! When a span is created, it provides [`Attributes`] to the `Subscriber`'s
//! [`new_span`] method, containing any fields whose values were provided when
//! the span was created; and may call the `Subscriber`'s [`record`] method
@@ -470,6 +470,10 @@ macro_rules! impl_one_value {
impl $crate::sealed::Sealed for $value_ty {}
impl $crate::field::Value for $value_ty {
fn record(&self, key: &$crate::field::Field, visitor: &mut dyn $crate::field::Visit) {
+ // `op` is always a function; the closure is used because
+ // sometimes there isn't a real function corresponding to that
+ // operation. the clippy warning is not that useful here.
+ #[allow(clippy::redundant_closure_call)]
visitor.$record(key, $op(*self))
}
}
@@ -485,6 +489,10 @@ macro_rules! impl_one_value {
impl $crate::sealed::Sealed for ty_to_nonzero!($value_ty) {}
impl $crate::field::Value for ty_to_nonzero!($value_ty) {
fn record(&self, key: &$crate::field::Field, visitor: &mut dyn $crate::field::Visit) {
+ // `op` is always a function; the closure is used because
+ // sometimes there isn't a real function corresponding to that
+ // operation. the clippy warning is not that useful here.
+ #[allow(clippy::redundant_closure_call)]
visitor.$record(key, $op(self.get()))
}
}
@@ -871,9 +879,6 @@ impl FieldSet {
}
/// Returns a new `ValueSet` with entries for this `FieldSet`'s values.
- ///
- /// Note that a `ValueSet` may not be constructed with arrays of over 32
- /// elements.
#[doc(hidden)]
pub fn value_set<'v, V>(&'v self, values: &'v V) -> ValueSet<'v>
where
@@ -1072,28 +1077,10 @@ impl<'a> fmt::Display for ValueSet<'a> {
mod private {
use super::*;
- /// Marker trait implemented by arrays which are of valid length to
- /// construct a `ValueSet`.
- ///
- /// `ValueSet`s may only be constructed from arrays containing 32 or fewer
- /// elements, to ensure the array is small enough to always be allocated on the
- /// stack. This trait is only implemented by arrays of an appropriate length,
- /// ensuring that the correct size arrays are used at compile-time.
+ /// Restrictions on `ValueSet` lengths were removed in #2508 but this type remains for backwards compatibility.
pub trait ValidLen<'a>: Borrow<[(&'a Field, Option<&'a (dyn Value + 'a)>)]> {}
-}
-
-macro_rules! impl_valid_len {
- ( $( $len:tt ),+ ) => {
- $(
- impl<'a> private::ValidLen<'a> for
- [(&'a Field, Option<&'a (dyn Value + 'a)>); $len] {}
- )+
- }
-}
-impl_valid_len! {
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
- 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32
+ impl<'a, const N: usize> ValidLen<'a> for [(&'a Field, Option<&'a (dyn Value + 'a)>); N] {}
}
#[cfg(test)]
@@ -1102,8 +1089,9 @@ mod test {
use crate::metadata::{Kind, Level, Metadata};
use crate::stdlib::{borrow::ToOwned, string::String};
- struct TestCallsite1;
- static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1;
+ // Make sure TEST_CALLSITE_* have non-zero size, so they can't be located at the same address.
+ struct TestCallsite1(u8);
+ static TEST_CALLSITE_1: TestCallsite1 = TestCallsite1(0);
static TEST_META_1: Metadata<'static> = metadata! {
name: "field_test1",
target: module_path!(),
@@ -1123,8 +1111,8 @@ mod test {
}
}
- struct TestCallsite2;
- static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2;
+ struct TestCallsite2(u8);
+ static TEST_CALLSITE_2: TestCallsite2 = TestCallsite2(0);
static TEST_META_2: Metadata<'static> = metadata! {
name: "field_test2",
target: module_path!(),
diff --git a/vendor/tracing-core/src/lib.rs b/vendor/tracing-core/src/lib.rs
index f5de4eeba..d43a6b8b0 100644
--- a/vendor/tracing-core/src/lib.rs
+++ b/vendor/tracing-core/src/lib.rs
@@ -243,9 +243,9 @@ macro_rules! metadata {
$name,
$target,
$level,
- Some(file!()),
- Some(line!()),
- Some(module_path!()),
+ ::core::option::Option::Some(file!()),
+ ::core::option::Option::Some(line!()),
+ ::core::option::Option::Some(module_path!()),
$crate::field::FieldSet::new($fields, $crate::identify_callsite!($callsite)),
$kind,
)