@@ -52,27 +52,19 @@ Note that pretty printing for the Rust nightly toolchain (which Kani uses) is no
5252For example, a vector may be displayed as ` vec![{...}, {...}] ` on nightly Rust, when it would be displayed as ` vec![Some(0), None] ` on stable Rust.
5353Hopefully, this will be fixed soon.
5454
55- ### RustRover / CLion
55+ ### CLion / IntelliJ
5656This is not a great solution, but it works for now (see < https://github.com/intellij-rust/intellij-rust/issues/1618 >
5757for more details).
58-
59- Open the ` Cargo.toml ` of your crate (e.g.: ` kani-compiler ` ), and do the following:
60-
61- 1 . Add optional dependencies on the ` rustc ` crates you are using.
62- 2 . Add a feature that enable those dependencies.
63- 3 . Toggle that feature using the IDE GUI.
64-
65- Here is an example:
58+ Edit the ` Cargo.toml ` of the package that you're working on and add artificial dependencies on the ` rustc ` packages that you would like to explore.
6659
6760``` toml
68- # ** At the bottom of the dependencies section: **
61+ # This configuration doesn't exist so it shouldn't affect your build.
62+ [target .'cfg(KANI_DEV)' .dependencies ]
6963# Adjust the path here to point to a local copy of the rust compiler.
70- # E.g.: ~/.rustup/toolchains/<toolchain>/lib/rustlib/rustc-src/rust/compiler
71- rustc_smir = { path = " <path_to_rustc>/rustc_smir" , optional = true }
72- stable_mir = { path = " <path_to_rustc>/stable_mir" , optional = true }
73-
74- [features ]
75- clion = [' rustc_smir' , ' stable_mir' ]
64+ # The best way is to use the rustup path. Replace <toolchain> with the
65+ # proper name to your toolchain.
66+ rustc_driver = { path = " ~/.rustup/toolchains/<toolchain>/lib/rustlib/rustc-src/rust/compiler/rustc_driver" }
67+ rustc_interface = { path = " ~/.rustup/toolchains/<toolchain>/lib/rustlib/rustc-src/rust/compiler/rustc_interface" }
7668```
7769
7870** Don't forget to rollback the changes before you create your PR.**
0 commit comments