Movatterモバイル変換


[0]ホーム

URL:


module_path

std

Macromodule_path 

1.38.0 ·Source
macro_rules! module_path {    () => { ... };}
Expand description

Expands to a string that represents the current module path.

The current module path can be thought of as the hierarchy of modulesleading back up to the crate root. The first component of the pathreturned is the name of the crate currently being compiled.

§Examples

modtest {pub fnfoo() {assert!(module_path!().ends_with("test"));    }}test::foo();

[8]ページ先頭

©2009-2026 Movatter.jp