From 928622812c8f885d8d802ccee36bbe538a47e801 Mon Sep 17 00:00:00 2001 From: Nixon Enraght-Moony Date: Tue, 29 Nov 2022 18:27:16 +0000 Subject: [PATCH] Don't assume that core::fmt::Debug will always have one item. --- src/test/rustdoc-json/traits/uses_extern_trait.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/test/rustdoc-json/traits/uses_extern_trait.rs b/src/test/rustdoc-json/traits/uses_extern_trait.rs index 430dd1543f561..a4add43c6a174 100644 --- a/src/test/rustdoc-json/traits/uses_extern_trait.rs +++ b/src/test/rustdoc-json/traits/uses_extern_trait.rs @@ -3,5 +3,10 @@ pub fn drop_default(_x: T) {} // FIXME(adotinthevoid): Theses shouldn't be here // @has "$.index[*][?(@.name=='Debug')]" -// @set Debug_fmt = "$.index[*][?(@.name=='Debug')].inner.items[*]" + +// Debug may have several items. All we depend on here the that `fmt` is first. See +// https://github.com/rust-lang/rust/pull/104525#issuecomment-1331087852 for why we +// can't use [*]. + +// @set Debug_fmt = "$.index[*][?(@.name=='Debug')].inner.items[0]" // @has "$.index[*][?(@.name=='fmt')].id" $Debug_fmt