Re-export in edition 2018

I used to use quicli crate to create console apps and it works great until recently.

With edition = "2018" in Cargo.toml, I cannot anymore use the StructOpt trait. For example, this piece of code

#[macro_use] extern crate quicli;
use quicli::prelude::*;

#[derive(StructOpt, Debug)]
struct Args {
  ...
}
...

no longer works. The compiler complains:

   |                                                                                                                                                                                                                                          
10 | #[derive(StructOpt, Debug)]                                                                                                                                                                                                              
   |          ^^^^^^^^^ Could not find `structopt` in `{{root}}`                                                                                                                                                                              

It seems that there are some changes with edition 2018, I've tried some, e.g.

use quicli::prelude::structopt::StructOpt;

but it still does not work.

Many thanks for any response.

1 Like

Have asked people who know the updated module system better than I but not yet recieved an answer.

I'll track this in the Github issue as I don't read this forum unless mentioned:

https://github.com/rust-lang/rust/issues/53010

I have posted a solution that worked for me -- it sort of defeated the point of the prelude module, though!