File tree 2 files changed +8
-2
lines changed
ide-diagnostics/src/handlers
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ pub(crate) fn unresolved_proc_macro(
32
32
let severity = if config_enabled { Severity :: Error } else { Severity :: WeakWarning } ;
33
33
let def_map = ctx. sema . db . crate_def_map ( d. krate ) ;
34
34
let message = if config_enabled {
35
- def_map. proc_macro_loading_error ( ) . unwrap_or ( "proc macro not found in the built dylib " )
35
+ def_map. proc_macro_loading_error ( ) . unwrap_or ( "internal error " )
36
36
} else {
37
37
match d. kind {
38
38
hir:: MacroKind :: Attr if proc_macros_enabled => "attribute macro expansion is disabled" ,
Original file line number Diff line number Diff line change @@ -528,10 +528,16 @@ impl GlobalState {
528
528
( crate_graph, proc_macros, crate_graph_file_dependencies)
529
529
} ;
530
530
531
+ let mut change = Change :: new ( ) ;
531
532
if self . config . expand_proc_macros ( ) {
533
+ change. set_proc_macros (
534
+ crate_graph
535
+ . iter ( )
536
+ . map ( |id| ( id, Err ( "Proc-macros have not been built yet" . to_owned ( ) ) ) )
537
+ . collect ( ) ,
538
+ ) ;
532
539
self . fetch_proc_macros_queue . request_op ( cause, proc_macro_paths) ;
533
540
}
534
- let mut change = Change :: new ( ) ;
535
541
change. set_crate_graph ( crate_graph) ;
536
542
self . analysis_host . apply_change ( change) ;
537
543
self . crate_graph_file_dependencies = crate_graph_file_dependencies;
You can’t perform that action at this time.
0 commit comments