From 673fd23dff47bf72953d1408b1cfbd45f6ef859b Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Fri, 7 Feb 2025 17:50:14 +0100 Subject: Update rustdoc tests --- tests/rustdoc/check-source-code-urls-to-def.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/rustdoc') diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/check-source-code-urls-to-def.rs index 8703287abc5..d701b88bf9f 100644 --- a/tests/rustdoc/check-source-code-urls-to-def.rs +++ b/tests/rustdoc/check-source-code-urls-to-def.rs @@ -31,7 +31,8 @@ fn babar() {} //@ has - '//pre[@class="rust"]//a/@href' '/struct.String.html' //@ has - '//pre[@class="rust"]//a/@href' '/primitive.u32.html' //@ has - '//pre[@class="rust"]//a/@href' '/primitive.str.html' -//@ count - '//pre[@class="rust"]//a[@href="#23"]' 5 +// The 5 links to line 23 and the line 23 itself. +//@ count - '//pre[@class="rust"]//a[@href="#23"]' 6 //@ has - '//pre[@class="rust"]//a[@href="../../source_code/struct.SourceCode.html"]' \ // 'source_code::SourceCode' pub fn foo(a: u32, b: &str, c: String, d: Foo, e: bar::Bar, f: source_code::SourceCode) { @@ -50,8 +51,8 @@ pub fn foo2(t: &T, v: &V, b: bool) {} pub trait AnotherTrait {} pub trait WhyNot {} -//@ has - '//pre[@class="rust"]//a[@href="#50"]' 'AnotherTrait' -//@ has - '//pre[@class="rust"]//a[@href="#51"]' 'WhyNot' +//@ has - '//pre[@class="rust"]//a[@href="#51"]' 'AnotherTrait' +//@ has - '//pre[@class="rust"]//a[@href="#52"]' 'WhyNot' pub fn foo3(t: &T, v: &V) where T: AnotherTrait, @@ -60,7 +61,7 @@ where pub trait AnotherTrait2 {} -//@ has - '//pre[@class="rust"]//a[@href="#61"]' 'AnotherTrait2' +//@ has - '//pre[@class="rust"]//a[@href="#62"]' 'AnotherTrait2' pub fn foo4() { let x: Vec<&dyn AnotherTrait2> = Vec::new(); } -- cgit 1.4.1-3-g733a5