-
Notifications
You must be signed in to change notification settings - Fork 244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiler prints entire macro output to terminal if any warnings are emitted when parsing it. #7208
Comments
I agree, as long as its just a warning we shouldn't actually fail to parse the token stream either. |
I can't reproduce this. I checked out noir-bignum, ran |
I think we've since removed the |
I get warnings like this:
but I don't get the full macro code printed. I also tried with this program: fn main() {
comptime {
let _ = quote { { loop {}; 2 } }.as_expr();
}
} The output is just this:
I also tried this code: fn main() {
comptime {
let _ = quote { { loop {}; 2 } }.as_expr();
}
}
#[foo]
pub comptime fn foo(_: FunctionDefinition) -> Quoted {
quote { pub unconstrained fn bar() { loop { break; } } }
} This is the output:
|
In #6969 we made the compiler tolerate compiler warnings thrown by macro generated code. However this still prints the whole macro output into the terminal.
e.g.
We shouldn't need to print the whole macro output for warnings as this just results in unreadable output. I think that we should be able to remove the
= The resulting token stream was: (stream starts on next line)
line and everything below it.The text was updated successfully, but these errors were encountered: