From 2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:50 +0200 Subject: Merging upstream version 1.69.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc/const-generics/add-impl.rs | 2 +- .../const-generics/const-generic-defaults.rs | 2 +- .../rustdoc/const-generics/const-generic-slice.rs | 2 +- .../rustdoc/const-generics/const-generics-docs.rs | 44 +++++++++++----------- tests/rustdoc/const-generics/const-impl.rs | 12 +++--- .../rustdoc/const-generics/generic_const_exprs.rs | 2 +- tests/rustdoc/const-generics/type-alias.rs | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) (limited to 'tests/rustdoc/const-generics') diff --git a/tests/rustdoc/const-generics/add-impl.rs b/tests/rustdoc/const-generics/add-impl.rs index b5226ad3f..195e47bc8 100644 --- a/tests/rustdoc/const-generics/add-impl.rs +++ b/tests/rustdoc/const-generics/add-impl.rs @@ -2,7 +2,7 @@ use std::ops::Add; -// @has foo/struct.Simd.html '//div[@class="item-decl"]/pre[@class="rust"]' 'pub struct Simd' +// @has foo/struct.Simd.html '//pre[@class="rust item-decl"]' 'pub struct Simd' pub struct Simd { inner: T, } diff --git a/tests/rustdoc/const-generics/const-generic-defaults.rs b/tests/rustdoc/const-generics/const-generic-defaults.rs index acc3b853e..f781c6a62 100644 --- a/tests/rustdoc/const-generics/const-generic-defaults.rs +++ b/tests/rustdoc/const-generics/const-generic-defaults.rs @@ -1,5 +1,5 @@ #![crate_name = "foo"] -// @has foo/struct.Foo.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/struct.Foo.html '//pre[@class="rust item-decl"]' \ // 'pub struct Foo(_);' pub struct Foo(T); diff --git a/tests/rustdoc/const-generics/const-generic-slice.rs b/tests/rustdoc/const-generics/const-generic-slice.rs index 4279de91f..80a9ab3f1 100644 --- a/tests/rustdoc/const-generics/const-generic-slice.rs +++ b/tests/rustdoc/const-generics/const-generic-slice.rs @@ -5,7 +5,7 @@ pub trait Array { } // @has foo/trait.Array.html -// @has - '//*[@class="impl has-srclink"]' 'impl Array for [T; N]' +// @has - '//*[@class="impl"]' 'impl Array for [T; N]' impl Array for [T; N] { type Item = T; } diff --git a/tests/rustdoc/const-generics/const-generics-docs.rs b/tests/rustdoc/const-generics/const-generics-docs.rs index 543332d2c..828486a41 100644 --- a/tests/rustdoc/const-generics/const-generics-docs.rs +++ b/tests/rustdoc/const-generics/const-generics-docs.rs @@ -3,26 +3,26 @@ #![crate_name = "foo"] extern crate extern_crate; -// @has foo/fn.extern_fn.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/fn.extern_fn.html '//pre[@class="rust item-decl"]' \ // 'pub fn extern_fn() -> impl Iterator' pub use extern_crate::extern_fn; -// @has foo/struct.ExternTy.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/struct.ExternTy.html '//pre[@class="rust item-decl"]' \ // 'pub struct ExternTy {' pub use extern_crate::ExternTy; -// @has foo/type.TyAlias.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/type.TyAlias.html '//pre[@class="rust item-decl"]' \ // 'type TyAlias = ExternTy;' pub use extern_crate::TyAlias; -// @has foo/trait.WTrait.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/trait.WTrait.html '//pre[@class="rust item-decl"]' \ // 'pub trait WTrait' -// @has - '//div[@class="item-decl"]/pre[@class="rust"]' 'fn hey() -> usize' +// @has - '//pre[@class="rust item-decl"]' 'fn hey() -> usize' pub use extern_crate::WTrait; -// @has foo/trait.Trait.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/trait.Trait.html '//pre[@class="rust item-decl"]' \ // 'pub trait Trait' // @has - '//*[@id="impl-Trait%3C1%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<1> for u8' // @has - '//*[@id="impl-Trait%3C2%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<2> for u8' -// @has - '//*[@id="impl-Trait%3C{1%20+%202}%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<{1 + 2}> for u8' -// @has - '//*[@id="impl-Trait%3CN%3E-for-%5Bu8%3B%20N%5D"]//h3[@class="code-header"]' \ +// @has - '//*[@id="impl-Trait%3C%7B1+%2B+2%7D%3E-for-u8"]//h3[@class="code-header"]' 'impl Trait<{1 + 2}> for u8' +// @has - '//*[@id="impl-Trait%3CN%3E-for-%5Bu8;+N%5D"]//h3[@class="code-header"]' \ // 'impl Trait for [u8; N]' pub trait Trait {} impl Trait<1> for u8 {} @@ -30,10 +30,10 @@ impl Trait<2> for u8 {} impl Trait<{1 + 2}> for u8 {} impl Trait for [u8; N] {} -// @has foo/struct.Foo.html '//div[@class="item-decl"]/pre[@class="rust"]' \ -// 'pub struct Foowhere u8: Trait' +// @has foo/struct.Foo.html '//pre[@class="rust item-decl"]' \ +// 'pub struct Foo where u8: Trait' pub struct Foo where u8: Trait; -// @has foo/struct.Bar.html '//div[@class="item-decl"]/pre[@class="rust"]' 'pub struct Bar(_)' +// @has foo/struct.Bar.html '//pre[@class="rust item-decl"]' 'pub struct Bar(_)' pub struct Bar([T; N]); // @has foo/struct.Foo.html '//*[@id="impl-Foo%3CM%3E"]/h3[@class="code-header"]' 'impl Foowhere u8: Trait' @@ -47,7 +47,7 @@ impl Foo where u8: Trait { } } -// @has foo/struct.Bar.html '//*[@id="impl-Bar%3Cu8%2C%20M%3E"]/h3[@class="code-header"]' 'impl Bar' +// @has foo/struct.Bar.html '//*[@id="impl-Bar%3Cu8,+M%3E"]/h3[@class="code-header"]' 'impl Bar' impl Bar { // @has - '//*[@id="method.hey"]' \ // 'pub fn hey(&self) -> Foowhere u8: Trait' @@ -56,32 +56,32 @@ impl Bar { } } -// @has foo/fn.test.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/fn.test.html '//pre[@class="rust item-decl"]' \ // 'pub fn test() -> impl Traitwhere u8: Trait' pub fn test() -> impl Trait where u8: Trait { 2u8 } -// @has foo/fn.a_sink.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/fn.a_sink.html '//pre[@class="rust item-decl"]' \ // 'pub async fn a_sink(v: [u8; N]) -> impl Trait' pub async fn a_sink(v: [u8; N]) -> impl Trait { v } -// @has foo/fn.b_sink.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/fn.b_sink.html '//pre[@class="rust item-decl"]' \ // 'pub async fn b_sink(_: impl Trait)' pub async fn b_sink(_: impl Trait) {} -// @has foo/fn.concrete.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/fn.concrete.html '//pre[@class="rust item-decl"]' \ // 'pub fn concrete() -> [u8; 22]' pub fn concrete() -> [u8; 3 + std::mem::size_of::() << 1] { Default::default() } -// @has foo/type.Faz.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/type.Faz.html '//pre[@class="rust item-decl"]' \ // 'type Faz = [u8; N];' pub type Faz = [u8; N]; -// @has foo/type.Fiz.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/type.Fiz.html '//pre[@class="rust item-decl"]' \ // 'type Fiz = [[u8; N]; 48];' pub type Fiz = [[u8; N]; 3 << 4]; @@ -91,7 +91,7 @@ macro_rules! define_me { } } -// @has foo/struct.Foz.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/struct.Foz.html '//pre[@class="rust item-decl"]' \ // 'pub struct Foz(_);' define_me!(Foz); @@ -103,13 +103,13 @@ impl Q for [u8; N] { const ASSOC: usize = N; } -// @has foo/fn.q_user.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/fn.q_user.html '//pre[@class="rust item-decl"]' \ // 'pub fn q_user() -> [u8; 13]' pub fn q_user() -> [u8; <[u8; 13] as Q>::ASSOC] { [0; <[u8; 13] as Q>::ASSOC] } -// @has foo/union.Union.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/union.Union.html '//pre[@class="rust item-decl"]' \ // 'pub union Union' pub union Union { // @has - //pre "pub arr: [u8; N]" @@ -118,7 +118,7 @@ pub union Union { pub another_arr: [(); N], } -// @has foo/enum.Enum.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/enum.Enum.html '//pre[@class="rust item-decl"]' \ // 'pub enum Enum' pub enum Enum { // @has - //pre "Variant([u8; N])" diff --git a/tests/rustdoc/const-generics/const-impl.rs b/tests/rustdoc/const-generics/const-impl.rs index 726fb8f0c..152b643bf 100644 --- a/tests/rustdoc/const-generics/const-impl.rs +++ b/tests/rustdoc/const-generics/const-impl.rs @@ -8,21 +8,21 @@ pub enum Order { Unsorted, } -// @has foo/struct.VSet.html '//div[@class="item-decl"]/pre[@class="rust"]' 'pub struct VSet' -// @has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header"]' 'impl Send for VSet' -// @has foo/struct.VSet.html '//*[@id="impl-Sync-for-VSet%3CT%2C%20ORDER%3E"]/h3[@class="code-header"]' 'impl Sync for VSet' +// @has foo/struct.VSet.html '//pre[@class="rust item-decl"]' 'pub struct VSet' +// @has foo/struct.VSet.html '//*[@id="impl-Send-for-VSet%3CT,+ORDER%3E"]/h3[@class="code-header"]' 'impl Send for VSet' +// @has foo/struct.VSet.html '//*[@id="impl-Sync-for-VSet%3CT,+ORDER%3E"]/h3[@class="code-header"]' 'impl Sync for VSet' pub struct VSet { inner: Vec, } -// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3ASorted%20}%3E"]/h3[@class="code-header"]' 'impl VSet' +// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Sorted+%7D%3E"]/h3[@class="code-header"]' 'impl VSet' impl VSet { pub fn new() -> Self { Self { inner: Vec::new() } } } -// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT%2C%20{%20Order%3A%3AUnsorted%20}%3E"]/h3[@class="code-header"]' 'impl VSet' +// @has foo/struct.VSet.html '//*[@id="impl-VSet%3CT,+%7B+Order::Unsorted+%7D%3E"]/h3[@class="code-header"]' 'impl VSet' impl VSet { pub fn new() -> Self { Self { inner: Vec::new() } @@ -31,7 +31,7 @@ impl VSet { pub struct Escape; -// @has foo/struct.Escape.html '//*[@id="impl-Escape%3Cr#%22%3Cscript%3Ealert(%22Escape%22)%3B%3C/script%3E%22#%3E"]/h3[@class="code-header"]' 'impl Escapealert("Escape");"#>' +// @has foo/struct.Escape.html '//*[@id="impl-Escape%3Cr%23%22%3Cscript%3Ealert(%22Escape%22);%3C/script%3E%22%23%3E"]/h3[@class="code-header"]' 'impl Escapealert("Escape");"#>' impl Escapealert("Escape");"#> { pub fn f() {} } diff --git a/tests/rustdoc/const-generics/generic_const_exprs.rs b/tests/rustdoc/const-generics/generic_const_exprs.rs index c53cf6dcd..e23b3006d 100644 --- a/tests/rustdoc/const-generics/generic_const_exprs.rs +++ b/tests/rustdoc/const-generics/generic_const_exprs.rs @@ -2,6 +2,6 @@ #![feature(generic_const_exprs)] #![allow(incomplete_features)] // make sure that `ConstEvaluatable` predicates dont cause rustdoc to ICE #77647 -// @has foo/struct.Ice.html '//div[@class="item-decl"]/pre[@class="rust"]' \ +// @has foo/struct.Ice.html '//pre[@class="rust item-decl"]' \ // 'pub struct Ice;' pub struct Ice where [(); N + 1]:; diff --git a/tests/rustdoc/const-generics/type-alias.rs b/tests/rustdoc/const-generics/type-alias.rs index 72473a112..4b93e72d2 100644 --- a/tests/rustdoc/const-generics/type-alias.rs +++ b/tests/rustdoc/const-generics/type-alias.rs @@ -1,4 +1,4 @@ #![crate_name = "foo"] -// @has foo/type.CellIndex.html '//div[@class="item-decl"]/pre[@class="rust"]' 'type CellIndex = [i64; D];' +// @has foo/type.CellIndex.html '//pre[@class="rust item-decl"]' 'type CellIndex = [i64; D];' pub type CellIndex = [i64; D]; -- cgit v1.2.3