test(rustdoc): move tests into jump-to-def

This commit is contained in:
midsterx 2025-11-07 00:54:16 -08:00
parent c90bcb9571
commit ee8c913bdf
11 changed files with 23 additions and 23 deletions

View file

@ -4,7 +4,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-assoc-items.rs.html'
//@ has 'src/foo/assoc-items.rs.html'
pub trait Trait {
type T;

View file

@ -5,7 +5,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-ice-assoc-types.rs.html'
//@ has 'src/foo/assoc-types.rs.html'
pub trait Trait {
type Node;

View file

@ -2,7 +2,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-doc-links-calls.rs.html'
//@ has 'src/foo/doc-links-calls.rs.html'
//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
pub struct Bar;

View file

@ -2,7 +2,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-doc-links.rs.html'
//@ has 'src/foo/doc-links.rs.html'
//@ has - '//a[@href="../../foo/struct.Bar.html"]' 'Bar'
//@ has - '//a[@href="../../foo/struct.Foo.html"]' 'Foo'

View file

@ -1,15 +0,0 @@
//@ aux-build:jump-to-def-macro.rs
//@ build-aux-docs
//@ compile-flags: -Zunstable-options --generate-link-to-definition
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-macro.rs.html'
#[macro_use]
extern crate jump_to_def_macro;
//@ has - '//a[@href="../../jump_to_def_macro/macro.symbols.html"]' 'symbols!'
symbols! {
A = 12
}

View file

@ -0,0 +1,15 @@
//@ aux-build:symbols.rs
//@ build-aux-docs
//@ compile-flags: -Zunstable-options --generate-link-to-definition
#![crate_name = "foo"]
//@ has 'src/foo/macro.rs.html'
#[macro_use]
extern crate symbols;
//@ has - '//a[@href="../../symbols/macro.symbols.html"]' 'symbols!'
symbols! {
A = 12
}

View file

@ -5,7 +5,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-ice.rs.html'
//@ has 'src/foo/no-body-items.rs.html'
pub trait A {
type T;

View file

@ -2,7 +2,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-non-local-method.rs.html'
//@ has 'src/foo/non-local-method.rs.html'
//@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html"]' 'std::sync::atomic::AtomicIsize'
use std::sync::atomic::AtomicIsize;

View file

@ -4,7 +4,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-pats.rs.html'
//@ has 'src/foo/patterns.rs.html'
use std::fmt;

View file

@ -4,7 +4,7 @@
#![crate_name = "foo"]
//@ has 'src/foo/jump-to-def-prelude-types.rs.html'
//@ has 'src/foo/prelude-types.rs.html'
// FIXME: would be nice to be able to check both the class and the href at the same time so
// we could check the text as well...
//@ has - '//a[@class="prelude-ty"]/@href' '{{channel}}/core/result/enum.Result.html'