mirror of
https://github.com/rust-lang/rust.git
synced 2026-07-15 20:45:20 -04:00
16 lines
588 B
Rust
16 lines
588 B
Rust
//@ compile-flags: --document-private-items
|
|
#![crate_name = "c"]
|
|
#![feature(impl_restriction)]
|
|
|
|
//@ matches c/trait.Foo.html '//*[@class="impl-restriction"]' \
|
|
// 'This trait cannot be implemented outside c.$'
|
|
//@ has c/trait.Foo.html '//*[@class="impl-restriction"]//code' 'c'
|
|
pub impl(crate) trait Foo {}
|
|
|
|
pub mod inner {
|
|
//@ matches c/inner/trait.Bar.html '//*[@class="impl-restriction"]' \
|
|
// 'This trait cannot be implemented outside c::inner.$'
|
|
//@ has c/inner/trait.Bar.html '//*[@class="impl-restriction"]//code' 'c::inner'
|
|
pub impl(self) trait Bar {}
|
|
}
|