-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensionsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
With the following test code:
enum T {
A(int),
B(float)
}
macro_rules! test(
($e:expr) => (
fn foo(t:T) -> int {
match t {
A(y) => $e,
B(y) => $e
}
}
)
)
test!(10 + (y as int))
fn main() {
foo(A(20));
}
You get an ICE:
x.rs:10:6: 10:7 warning: unused variable: `y` [-W unused-variable (default)]
x.rs:10 A(y) => $e,
^
error: internal compiler error: trans_local_var: no llval for local/arg 62 found
Metadata
Metadata
Assignees
Labels
A-syntaxextArea: Syntax extensionsArea: Syntax extensionsE-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️