File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ fn get_doc_base_urls(
473
473
// https://github.com/rust-lang/rust-analyzer/issues/12250
474
474
if let Definition :: BuiltinType ( ..) = def {
475
475
let weblink = Url :: parse ( "https://doc.rust-lang.org/nightly/core/" ) . ok ( ) ;
476
- return ( weblink, local_doc_path ) ;
476
+ return ( weblink, None ) ;
477
477
} ;
478
478
479
479
let Some ( krate) = def. krate ( db) else { return Default :: default ( ) } ;
Original file line number Diff line number Diff line change @@ -119,6 +119,19 @@ fn node_to_def(
119
119
} )
120
120
}
121
121
122
+ #[ test]
123
+ fn external_docs_doc_builtin_type ( ) {
124
+ check_external_docs (
125
+ r#"
126
+ //- /main.rs crate:foo
127
+ let x: u3$02 = 0;
128
+ "# ,
129
+ Some ( & OsStr :: new ( "/home/user/project" ) ) ,
130
+ Some ( expect ! [ [ r#"https://doc.rust-lang.org/nightly/core/primitive.u32.html"# ] ] ) ,
131
+ None ,
132
+ ) ;
133
+ }
134
+
122
135
#[ test]
123
136
fn external_docs_doc_url_crate ( ) {
124
137
check_external_docs (
You can’t perform that action at this time.
0 commit comments