rust/tests/rustdoc-ui/intra-doc/issue-108653-associated-items-4.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
429 B
Rust
Raw Normal View History

2023-03-03 13:54:56 +00:00
// This is ensuring that the UI output for associated items works when it's being documented
// from another item.
#![deny(rustdoc::broken_intra_doc_links)]
#![allow(nonstandard_style)]
pub trait Trait {
type Trait;
}
/// [`Struct::Trait`]
//~^ ERROR both an associated constant and an associated type
pub struct Struct;
impl Trait for Struct {
type Trait = Struct;
}
impl Struct {
pub const Trait: usize = 0;
}