-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 {} |