File tree Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Expand file tree Collapse file tree 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ mod tests {
439439
440440 fn check ( ra_fixture : & str , expect : Expect ) {
441441 let ( analysis, position) = analysis_and_position ( ra_fixture) ;
442- let url = analysis. external_docs ( position) . unwrap ( ) . unwrap ( ) ;
442+ let url = analysis. external_docs ( position) . unwrap ( ) . expect ( "could not find url for symbol" ) ;
443443
444444 expect. assert_eq ( & url)
445445 }
@@ -517,4 +517,29 @@ pub struct Foo {
517517 expect ! [ [ r##"https://docs.rs/test/*/test/struct.Foo.html#structfield.field"## ] ] ,
518518 ) ;
519519 }
520+
521+ // FIXME: ImportMap will return re-export paths instead of public module
522+ // paths. The correct path to documentation will never be a re-export.
523+ // This problem stops us from resolving stdlib items included in the prelude
524+ // such as `Option::Some` correctly.
525+ #[ ignore = "ImportMap may return re-exports" ]
526+ #[ test]
527+ fn test_reexport_order ( ) {
528+ check (
529+ r#"
530+ pub mod wrapper {
531+ pub use module::Item;
532+
533+ pub mod module {
534+ pub struct Item;
535+ }
536+ }
537+
538+ fn foo() {
539+ let bar: wrapper::It<|>em;
540+ }
541+ "# ,
542+ expect ! [ [ r#"https://docs.rs/test/*/test/wrapper/module/struct.Item.html"# ] ] ,
543+ )
544+ }
520545}
You can’t perform that action at this time.
0 commit comments