diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /tests/rustdoc/intra-doc/prim-self.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc/intra-doc/prim-self.rs')
-rw-r--r-- | tests/rustdoc/intra-doc/prim-self.rs | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/rustdoc/intra-doc/prim-self.rs b/tests/rustdoc/intra-doc/prim-self.rs new file mode 100644 index 000000000..c7ce71b15 --- /dev/null +++ b/tests/rustdoc/intra-doc/prim-self.rs @@ -0,0 +1,41 @@ +#![deny(rustdoc::broken_intra_doc_links)] +#![rustc_coherence_is_core] +#![allow(incomplete_features)] // inherent_associated_types +#![feature(rustc_attrs)] +#![feature(no_core)] +#![feature(rustdoc_internals)] +#![feature(inherent_associated_types)] +#![feature(lang_items)] +#![no_core] + +/// [Self::f] +/// [Self::MAX] +// @has prim_self/primitive.usize.html +// @has - '//a[@href="primitive.usize.html#method.f"]' 'Self::f' +// @has - '//a[@href="primitive.usize.html#associatedconstant.MAX"]' 'Self::MAX' +impl usize { + /// Some docs + pub fn f() {} + + /// 10 and 2^32 are basically the same. + pub const MAX: usize = 10; + + // @has - '//a[@href="primitive.usize.html#associatedtype.ME"]' 'Self::ME' + /// [Self::ME] + pub type ME = usize; +} + +#[doc(primitive = "usize")] +/// This has some docs. +mod usize {} + +/// [S::f] +/// [Self::f] +pub struct S; + +impl S { + pub fn f() {} +} + +#[lang = "sized"] +pub trait Sized {} |