File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -926,8 +926,14 @@ impl Clean<Attributes> for [ast::Attribute] {
926
926
// for structs, etc, and the link won't work.
927
927
if let Ok ( path) = resolve ( false ) {
928
928
path. def
929
- } else if let Ok ( path) = resolve ( true ) {
930
- path. def
929
+ } else if let Ok ( _path) = resolve ( true ) {
930
+ let sp = attrs. doc_strings . first ( ) . map_or ( DUMMY_SP , |a| a. span ( ) ) ;
931
+ cx. sess ( ) . struct_span_err ( sp, & format ! ( "could not resolve `{}`" ,
932
+ path_str) )
933
+ . help ( & format ! ( "try `{0}()`, `static@{0}`, or `const@{0}`" ,
934
+ path_str) )
935
+ . emit ( ) ;
936
+ continue ;
931
937
} else {
932
938
// this could just be a normal link
933
939
continue ;
Original file line number Diff line number Diff line change 27
27
//! * [`ThisTrait`](ThisTrait)
28
28
//! * [`ThisAlias`](ThisAlias)
29
29
//! * [`ThisUnion`](ThisUnion)
30
- //! * [`this_function`](this_function)
31
- //! * [`THIS_CONST`](THIS_CONST)
32
- //! * [`THIS_STATIC`](THIS_STATIC)
30
+ //! * [`this_function`](this_function() )
31
+ //! * [`THIS_CONST`](const@ THIS_CONST)
32
+ //! * [`THIS_STATIC`](static@ THIS_STATIC)
33
33
//! * [`this_macro`](this_macro!)
34
34
//!
35
35
//! In addition, there's some specifics we want to look at. There's [a trait called
You can’t perform that action at this time.
0 commit comments