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 {
439
439
440
440
fn check ( ra_fixture : & str , expect : Expect ) {
441
441
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" ) ;
443
443
444
444
expect. assert_eq ( & url)
445
445
}
@@ -517,4 +517,29 @@ pub struct Foo {
517
517
expect ! [ [ r##"https://docs.rs/test/*/test/struct.Foo.html#structfield.field"## ] ] ,
518
518
) ;
519
519
}
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
+ }
520
545
}
You can’t perform that action at this time.
0 commit comments