@@ -1178,6 +1178,10 @@ enum PathKind {
1178
1178
Type ,
1179
1179
}
1180
1180
1181
+ fn resolution_failure ( cx : & DocContext , path_str : & str ) {
1182
+ cx. sess ( ) . warn ( & format ! ( "[{}] cannot be resolved, ignoring it..." , path_str) ) ;
1183
+ }
1184
+
1181
1185
impl Clean < Attributes > for [ ast:: Attribute ] {
1182
1186
fn clean ( & self , cx : & DocContext ) -> Attributes {
1183
1187
let mut attrs = Attributes :: from_ast ( cx. sess ( ) . diagnostic ( ) , self ) ;
@@ -1228,6 +1232,7 @@ impl Clean<Attributes> for [ast::Attribute] {
1228
1232
if let Ok ( def) = resolve ( cx, path_str, true ) {
1229
1233
def
1230
1234
} else {
1235
+ resolution_failure ( cx, path_str) ;
1231
1236
// this could just be a normal link or a broken link
1232
1237
// we could potentially check if something is
1233
1238
// "intra-doc-link-like" and warn in that case
@@ -1238,6 +1243,7 @@ impl Clean<Attributes> for [ast::Attribute] {
1238
1243
if let Ok ( def) = resolve ( cx, path_str, false ) {
1239
1244
def
1240
1245
} else {
1246
+ resolution_failure ( cx, path_str) ;
1241
1247
// this could just be a normal link
1242
1248
continue ;
1243
1249
}
@@ -1282,6 +1288,7 @@ impl Clean<Attributes> for [ast::Attribute] {
1282
1288
} else if let Ok ( value_def) = resolve ( cx, path_str, true ) {
1283
1289
value_def
1284
1290
} else {
1291
+ resolution_failure ( cx, path_str) ;
1285
1292
// this could just be a normal link
1286
1293
continue ;
1287
1294
}
@@ -1290,6 +1297,7 @@ impl Clean<Attributes> for [ast::Attribute] {
1290
1297
if let Some ( def) = macro_resolve ( cx, path_str) {
1291
1298
( def, None )
1292
1299
} else {
1300
+ resolution_failure ( cx, path_str) ;
1293
1301
continue
1294
1302
}
1295
1303
}
0 commit comments