Two new rustdoc tests for intra links

They both produce less-than-desirable output (links going to docs.rust-lang.org), but I haven't figured out yet how to assert about them properly.
This commit is contained in:
Seth Pellegrino 2020-07-06 19:35:07 -07:00
parent ee3a0f867e
commit 33a5d00efb
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#![feature(no_core, lang_items)]
#![no_core]
#[lang = "char"]
impl char {
pub fn len_utf8(self) -> usize {
42
}
}
#[lang = "sized"]
pub trait Sized {}
#[lang = "clone"]
pub trait Clone: Sized {}
#[lang = "copy"]
pub trait Copy: Clone {}

View File

@ -0,0 +1,10 @@
// aux-build:my-core.rs
// ignore-cross-compile
#![deny(intra_doc_link_resolution_failure)]
#![feature(no_core, lang_items)]
#![no_core]
//! A [`char`] and its [`char::len_utf8`].
extern crate my_core;

View File

@ -0,0 +1,21 @@
#![deny(intra_doc_link_resolution_failure)]
#![feature(no_core, lang_items)]
#![no_core]
//! A [`char`] and its [`char::len_utf8`].
#[lang = "char"]
impl char {
pub fn len_utf8(self) -> usize {
42
}
}
#[lang = "sized"]
pub trait Sized {}
#[lang = "clone"]
pub trait Clone: Sized {}
#[lang = "copy"]
pub trait Copy: Clone {}