]> git.lizzy.rs Git - rust.git/blob - src/test/rustdoc/intra-doc/prim-methods-local.rs
Rollup merge of #103766 - lukas-code:error-in-core, r=Dylan-DPC
[rust.git] / src / test / rustdoc / intra-doc / prim-methods-local.rs
1 #![deny(rustdoc::broken_intra_doc_links)]
2 #![feature(no_core, lang_items, rustc_attrs, rustdoc_internals)]
3 #![no_core]
4 #![rustc_coherence_is_core]
5 #![crate_type = "rlib"]
6
7 // @has prim_methods_local/index.html
8 // @has - '//*[@id="main-content"]//a[@href="primitive.char.html"]' 'char'
9 // @has - '//*[@id="main-content"]//a[@href="primitive.char.html#method.len_utf8"]' 'char::len_utf8'
10
11 //! A [prim@`char`] and its [`char::len_utf8`].
12
13 #[doc(primitive = "char")]
14 mod char {}
15
16 impl char {
17     pub fn len_utf8(self) -> usize {
18         42
19     }
20 }
21
22 #[lang = "sized"]
23 pub trait Sized {}
24
25 #[lang = "clone"]
26 pub trait Clone: Sized {}
27
28 #[lang = "copy"]
29 pub trait Copy: Clone {}