You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This struct DiagnosticSink is never instantiated, nor is it referenced. The reference to this struct is removed in 7352353 but the definition of it was left there.
let sysroot = str::from_utf8(&out.stdout).unwrap().trim();
let buffer = sync::Arc::new(sync::Mutex::new(Vec::new()));
let config = rustc_interface::Config{
In commit 4383648, the config::Options did seem to expose the diagnostic_output prop, but it was later removed, rendering the above two definitions useless and the example pointless.
The comments on the Markdown page claim that the examples are tested on some date, and this date has been updated in every commit. Yet it does not seem to reflect the truth. The diagnostics have never been intercepted and stored after the removal of diagnostic_output.
Solutions
Solution 1
Remove this example.
Solution 2
Provide the documentation to an alternative interface to removed diagnostic_output.
Remarks
I came across this issue when I tried to suppress the diagnostics produced by rustc_interface::run_compiler and only fetch the compilation result (success or not). It would be better if a simpler approach to this could be provided.
The text was updated successfully, but these errors were encountered:
Description
The code in the latest tutorial
rustc-driver-getting-diagnostics.md
no longer functions starting from as far as commit 7352353.This struct
DiagnosticSink
is never instantiated, nor is it referenced. The reference to this struct is removed in 7352353 but the definition of it was left there.rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs
Lines 21 to 32 in 44b2f27
This variable
buffer
is never written into after the removal ofDiagnosticSink
.rustc-dev-guide/examples/rustc-driver-getting-diagnostics.rs
Lines 40 to 42 in 44b2f27
In commit 4383648, the
config::Options
did seem to expose thediagnostic_output
prop, but it was later removed, rendering the above two definitions useless and the example pointless.The comments on the Markdown page claim that the examples are tested on some date, and this date has been updated in every commit. Yet it does not seem to reflect the truth. The diagnostics have never been intercepted and stored after the removal of
diagnostic_output
.Solutions
Solution 1
Remove this example.
Solution 2
Provide the documentation to an alternative interface to removed
diagnostic_output
.Remarks
I came across this issue when I tried to suppress the diagnostics produced by
rustc_interface::run_compiler
and only fetch the compilation result (success or not). It would be better if a simpler approach to this could be provided.The text was updated successfully, but these errors were encountered: