-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.
Milestone
Description
The following program with paste = "0.1.12"
compiles on stable (rustc 1.46.0 (04488afe3 2020-08-24)
), but doesn't on Nightly (rustc 1.48.0-nightly (0e2c1281e 2020-09-07)
).
This is minimized from Firefox source code, which doesn't build anymore with Rust Nightly.
To be fair, I'm surprised it built in the first place...
#[macro_use] extern crate paste;
#[derive(Clone, Copy)]
struct Bar {
member: i32,
}
impl Bar {
fn get_member(&self, _: i32, _: i32) -> i32 {
self.member
}
}
macro_rules! foo {
($fn_name:ident $(, $arg:ident)*) => {
paste::expr! {
Bar::[<get_ $fn_name>](&self.bar $(, $arg)* ,callback)
}
};
}
struct Foo {
bar: Bar,
}
impl Foo {
fn member(&self, n: i32, callback: i32) -> i32 {
foo!(member, n)
}
}
fn main() {}
Metadata
Metadata
Assignees
Labels
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.Performance or correctness regression from one stable version to another.