Skip to content

Example RPN code fails to run #595

@memco

Description

@memco

Hi, totally new to Rust and I clicked the playground link from the Rust homepage then clicked the run button and I see this:

Compiling playground v0.0.1 (/playground)
error: Could not apply operator `*` to the current stack: [2 + 3]
  --> src/main.rs:7:9
   |
7  |         compile_error!(concat!("Could not apply operator `", stringify!($op), "` to the current stack: ", stringify!($stack)))
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
44 |     println!("{}", rpn!(2 3 + *));
   |                    ------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

error: could not compile `playground`.

To learn more, run the command again with --verbose.

Is it supposed to be broken? If so, what should I be looking for in order to see it run?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions