auto-import 0.1.0

Please do not use this.
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 5.6 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 247.64 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • m-ou-se/auto-import
    128 3 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • m-ou-se

auto-import

The auto_import::magic!{} macro expands to whatever use statements you need to make the rest of the code compile.

https://twitter.com/m_ou_se/status/1527209443309633536

Please do not use this.

Example

auto_import::magic!();

fn main() {
    let _ = BTreeMap::<File, PathBuf>::new();
    let _ = i32::from_str("123");
    std::io::stdout().write_all(b"!\n").unwrap();
}
$ cargo run
   Compiling auto-import v0.1.0
   Compiling example v0.1.0
   Injecting use std::collections::BTreeMap;
   Injecting use std::fs::File;
   Injecting use std::path::PathBuf;
   Injecting use std::str::FromStr;
   Injecting use std::io::Write;
    Finished dev [unoptimized + debuginfo] target(s) in 0.60s
     Running `target/debug/example`
!