path_val

Macro path_val 

Source
path_val!() { /* proc-macro */ }
Expand description

Usage:

path_val!(std::sync::Arc);

This expands to:

{
  #[allow(unused_imports)]
  use std::sync::Arc as _;

  crate_paths::Path::new("std::sync::Arc")
}

Which you would later assign to a constant:

const SOME_CONSTANT: crate_paths::Path = path_val!(std::sync::Arc);