Skip to content

fix(macros): macro_expanded_macro_exports_accessed_by_absolute_paths#2206

Merged
mkroening merged 3 commits intomainfrom
macro_expanded_macro_exports_accessed_by_absolute_paths
Feb 2, 2026
Merged

fix(macros): macro_expanded_macro_exports_accessed_by_absolute_paths#2206
mkroening merged 3 commits intomainfrom
macro_expanded_macro_exports_accessed_by_absolute_paths

Conversation

@mkroening
Copy link
Copy Markdown
Member

Currently, println!() results in

error: macro-expanded `macro_export` macros from the current crate cannot be referred to by absolute paths
   --> src/macros.rs:25:9
    |
 25 |         $crate::print!("\n")
    |         ^^^^^^^^^^^^^
    |
   ::: src/lib.rs:196:2
    |
196 |     println!();
    |     ---------- in this macro invocation
    |
    = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
    = note: for more information, see issue #52234 <https://github.com/rust-lang/rust/issues/52234>
note: the macro is defined here
   --> src/macros.rs:9:1
    |
  9 | / macro_rules! print {
 10 | |     ($($arg:tt)*) => {{
 11 | |         $crate::console::_print(::core::format_args!($($arg)*));
 12 | |     }};
 13 | | }
    | |_^
    = note: `#[deny(macro_expanded_macro_exports_accessed_by_absolute_paths)]` (part of `#[deny(future_incompatible)]`) on by default
    = note: this error originates in the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: could not compile `hermit-kernel` (lib) due to 2 previous errors

We did not notice earlier because we don't use macros that reference other Hermit macros in CI.

See rust-lang/rust#52234 (comment).

@mkroening mkroening self-assigned this Feb 2, 2026
@mkroening mkroening force-pushed the macro_expanded_macro_exports_accessed_by_absolute_paths branch from 6ca1169 to 61ec6a1 Compare February 2, 2026 10:25
Copy link
Copy Markdown

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark Results

Details
Benchmark Current: 3082bd4 Previous: 4a5e9e7 Performance Ratio
startup_benchmark Build Time 98.25 s 100.26 s 0.98
startup_benchmark File Size 0.86 MB 0.86 MB 1.00
Startup Time - 1 core 0.93 s (±0.03 s) 0.95 s (±0.03 s) 0.98
Startup Time - 2 cores 0.94 s (±0.03 s) 0.95 s (±0.02 s) 0.98
Startup Time - 4 cores 0.96 s (±0.03 s) 0.97 s (±0.02 s) 0.99
multithreaded_benchmark Build Time 100.17 s 101.56 s 0.99
multithreaded_benchmark File Size 0.96 MB 0.96 MB 1
Multithreaded Pi Efficiency - 2 Threads 88.70 % (±8.47 %) 87.99 % (±7.61 %) 1.01
Multithreaded Pi Efficiency - 4 Threads 44.35 % (±3.74 %) 44.77 % (±3.03 %) 0.99
Multithreaded Pi Efficiency - 8 Threads 25.87 % (±1.71 %) 26.15 % (±1.57 %) 0.99
micro_benchmarks Build Time 98.00 s 101.77 s 0.96
micro_benchmarks File Size 0.97 MB 0.97 MB 1.00
Scheduling time - 1 thread 67.85 ticks (±3.46 ticks) 68.88 ticks (±3.63 ticks) 0.99
Scheduling time - 2 threads 39.42 ticks (±5.42 ticks) 39.43 ticks (±6.01 ticks) 1.00
Micro - Time for syscall (getpid) 3.17 ticks (±0.40 ticks) 3.30 ticks (±0.45 ticks) 0.96
Memcpy speed - (built_in) block size 4096 66053.71 MByte/s (±46643.77 MByte/s) 64938.43 MByte/s (±46232.19 MByte/s) 1.02
Memcpy speed - (built_in) block size 1048576 29677.31 MByte/s (±24354.33 MByte/s) 29659.56 MByte/s (±24272.64 MByte/s) 1.00
Memcpy speed - (built_in) block size 16777216 22332.73 MByte/s (±18602.05 MByte/s) 25298.31 MByte/s (±21287.32 MByte/s) 0.88
Memset speed - (built_in) block size 4096 66779.82 MByte/s (±47187.66 MByte/s) 65824.51 MByte/s (±46863.86 MByte/s) 1.01
Memset speed - (built_in) block size 1048576 30420.47 MByte/s (±24785.20 MByte/s) 30372.76 MByte/s (±24699.87 MByte/s) 1.00
Memset speed - (built_in) block size 16777216 23106.31 MByte/s (±19164.34 MByte/s) 26078.20 MByte/s (±21784.38 MByte/s) 0.89
Memcpy speed - (rust) block size 4096 59983.91 MByte/s (±44093.91 MByte/s) 58681.90 MByte/s (±43075.19 MByte/s) 1.02
Memcpy speed - (rust) block size 1048576 29397.61 MByte/s (±24176.55 MByte/s) 29384.34 MByte/s (±24164.57 MByte/s) 1.00
Memcpy speed - (rust) block size 16777216 22686.51 MByte/s (±19045.72 MByte/s) 26165.69 MByte/s (±21921.81 MByte/s) 0.87
Memset speed - (rust) block size 4096 61060.84 MByte/s (±44827.14 MByte/s) 59725.89 MByte/s (±43797.12 MByte/s) 1.02
Memset speed - (rust) block size 1048576 30119.07 MByte/s (±24599.10 MByte/s) 30129.11 MByte/s (±24597.31 MByte/s) 1.00
Memset speed - (rust) block size 16777216 23445.00 MByte/s (±19583.62 MByte/s) 26946.51 MByte/s (±22406.24 MByte/s) 0.87
alloc_benchmarks Build Time 95.44 s 93.18 s 1.02
alloc_benchmarks File Size 0.94 MB 0.94 MB 1.00
Allocations - Allocation success 100.00 % 100.00 % 1
Allocations - Deallocation success 100.00 % 100.00 % 1
Allocations - Pre-fail Allocations 100.00 % 100.00 % 1
Allocations - Average Allocation time 7755.46 Ticks (±99.39 Ticks) 7631.79 Ticks (±105.13 Ticks) 1.02
Allocations - Average Allocation time (no fail) 7755.46 Ticks (±99.39 Ticks) 7631.79 Ticks (±105.13 Ticks) 1.02
Allocations - Average Deallocation time 1087.38 Ticks (±404.51 Ticks) 1083.47 Ticks (±369.67 Ticks) 1.00
mutex_benchmark Build Time 92.42 s 93.62 s 0.99
mutex_benchmark File Size 0.97 MB 0.97 MB 1.00
Mutex Stress Test Average Time per Iteration - 1 Threads 12.68 ns (±0.58 ns) 12.96 ns (±0.85 ns) 0.98
Mutex Stress Test Average Time per Iteration - 2 Threads 13.80 ns (±1.00 ns) 13.36 ns (±0.74 ns) 1.03

This comment was automatically generated by workflow using github-action-benchmark.

@mkroening mkroening enabled auto-merge February 2, 2026 11:05
@mkroening mkroening added this pull request to the merge queue Feb 2, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 2, 2026
@mkroening mkroening added this pull request to the merge queue Feb 2, 2026
Merged via the queue into main with commit 626dfd5 Feb 2, 2026
19 checks passed
@mkroening mkroening deleted the macro_expanded_macro_exports_accessed_by_absolute_paths branch February 10, 2026 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant