Skip to content

fail to compile the examples #1556

Closed
@gftea

Description

@gftea

I tried to compile the examples below

rustup +nightly component add rust-src rustc-dev llvm-tools-preview
rustc +nightly rustc-driver-interacting-with-the-ast.rs 

I got below errors

error[E0433]: failed to resolve: could not find `DiagnosticOutput` in `rustc_session`
  --> rustc-driver-interacting-with-the-ast.rs:46:43
   |
46 |         diagnostic_output: rustc_session::DiagnosticOutput::Default,
   |                                           ^^^^^^^^^^^^^^^^ could not find `DiagnosticOutput` in `rustc_session`

error[E0560]: struct `rustc_interface::Config` has no field named `diagnostic_output`
  --> rustc-driver-interacting-with-the-ast.rs:46:9
   |
46 |         diagnostic_output: rustc_session::DiagnosticOutput::Default,
   |         ^^^^^^^^^^^^^^^^^ `rustc_interface::Config` does not have this field
   |
   = note: available fields are: `opts`, `crate_cfg`, `crate_check_cfg`, `input`, `input_path` ... and 9 others

error: aborting due to 2 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions