-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Closed
Copy link
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Description
Testcase:
inc.rs:
afddafadsfasdfdasfaf
fn never_parsed() -> i32 { 42 }main.rs:
include!("inc.rs");
fn main() { never_parsed(); }Output:
csguest@itl:~/Downloads$ rustc main.rs
main.rs:4:2: 4:14 error: unresolved name `never_parsed`
main.rs:4 never_parsed();
^~~~~~~~~~~~
error: aborting due to previous error
Should output, instead, the parse errors from include!. Probably misplacing the diagnostic emitter somehow, when creating the nested parser for the included source, and doesn't have an abort_if_errors.
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.