1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
11 // we need to make sure that intra-doc links on trait impls get resolved in the right scope
13 #![deny(intra_doc_link_resolution_failure)]
16 pub struct SomethingOutOfScope;
20 use inner::SomethingOutOfScope;
23 pub struct OtherStruct;
25 /// Let's link to [SomethingOutOfScope] while we're at it.
26 impl SomeTrait for OtherStruct {}
29 pub trait SomeTrait {}
31 pub struct SomeStruct;
33 fn __implementation_details() {
34 use inner::SomethingOutOfScope;
36 // FIXME: intra-links resolve in their nearest module scope, not their actual scope in cases
38 // Let's link to [SomethingOutOfScope] while we're at it.
39 impl SomeTrait for SomeStruct {}