diff options
author | David Tolnay <dtolnay@chromium.org> | 2019-04-12 11:27:37 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-15 02:06:04 -0700 |
commit | a70a2193ad10a6e0f2e28c45a2e75fff6a102f22 (patch) | |
tree | 6e001f53cfdeed7bdd0f10b15ce2ef56d9226360 /devices/src/usb | |
parent | 1b7f3ed23505b83343b376c8d8777366457402d0 (diff) | |
download | crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.tar crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.tar.gz crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.tar.bz2 crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.tar.lz crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.tar.xz crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.tar.zst crosvm-a70a2193ad10a6e0f2e28c45a2e75fff6a102f22.zip |
sys_util: Enable macros imported individually
The syslog and ioctl macros in sys_util were originally written to be imported through `#[macro_use] extern crate sys_util` which is essentially a glob import of all macros from the crate. In 2018 edition, extern crate is deprecated and macros are imported the same as any other item. As these sys_util macros are currently written, importing an individual macro requires the caller to also import any other sys_util macros that the invocation internally expands to. Example: use sys_util::{error, log}; fn main() { error!("..."); } This CL adjusts all sys_util macros to invoke helper macros through a `$crate::` prefix so that the caller is not required to have the helper macros in scope themselves. use sys_util::error; fn main() { error!("..."); } TEST=kokoro Change-Id: I2d9f16dca8e7a4a4c0e63d9f10ead9f7413d9c3c Reviewed-on: https://chromium-review.googlesource.com/1565544 Commit-Ready: David Tolnay <dtolnay@chromium.org> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Diffstat (limited to 'devices/src/usb')
0 files changed, 0 insertions, 0 deletions