Skip to content

regression: macro expansion/resolution change of some kind #119875

Closed as not planned
@Mark-Simulacrum

Description

[INFO] [stdout] error[E0424]: expected value, found module `self`
[INFO] [stdout]   --> src/capabilities/weapon.rs:13:23
[INFO] [stdout]    |
[INFO] [stdout] 13 | #[derive(Clone, Copy, CapabilityTrait)]
[INFO] [stdout]    |                       ^^^^^^^^^^^^^^^
[INFO] [stdout]    |                       |
[INFO] [stdout]    |                       `self` value is a keyword only available in methods with a `self` parameter
[INFO] [stdout]    |                       this function doesn't have a `self` parameter
[INFO] [stdout]    |
[INFO] [stdout]    = note: this error originates in the derive macro `CapabilityTrait` (in Nightly builds, run with -Z macro-backtrace for more info)
[INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method
[INFO] [stdout]    |
[INFO] [stdout] 13 | #[derive(Clone, Copy, &self, CapabilityTrait)]
[INFO] [stdout] error: expected one of `->`, `<`, `where`, or `{`, found `%`
[INFO] [stdout]   --> tests/smoke.rs:5:5
[INFO] [stdout]    |
[INFO] [stdout] 5  | /     repeated!(for x in [0;9;3] {
[INFO] [stdout] 6  | |         fn Welcome_%%x%%() {
[INFO] [stdout] 7  | |             repeated!(for y in [1;%%x%%;2] {
[INFO] [stdout] 8  | |                 println!("From within the macro %%x%%:%%y%%!");
[INFO] [stdout] 9  | |             });
[INFO] [stdout] 10 | |         }
[INFO] [stdout] 11 | |     });
[INFO] [stdout]    | |______^ expected one of `->`, `<`, `where`, or `{`
[INFO] [stdout]    |
[INFO] [stdout]    = note: this error originates in the macro `repeated` (in Nightly builds, run with -Z macro-backtrace for more info)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions