File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 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(
473473 // https://github.com/rust-lang/rust-analyzer/issues/12250
474474 if let Definition :: BuiltinType ( ..) = def {
475475 let weblink = Url :: parse ( "https://doc.rust-lang.org/nightly/core/" ) . ok ( ) ;
476- return ( weblink, local_doc_path ) ;
476+ return ( weblink, None ) ;
477477 } ;
478478
479479 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(
119119 } )
120120}
121121
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+
122135#[ test]
123136fn external_docs_doc_url_crate ( ) {
124137 check_external_docs (
You can’t perform that action at this time.
0 commit comments