-
Notifications
You must be signed in to change notification settings - Fork 13.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ICE -Zpolymorphize=on "collection encountered polymorphic constant: Unevaluated(UnevaluatedConst" #105249
Labels
-Zpolymorphize
Unstable option: Polymorphization.
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
@rustbot claim |
Another example fn pass_to_ptr_call<T>(f: fn(T), x: T) {
f(x);
}
trait TrackedTrait {
fn trait_tracked_unit_default(_: ()) {
let location = std::panic::Location::caller();
assert_eq!(location.file(), file!());
}
}
impl TrackedTrait for () {}
fn main() {
pass_to_ptr_call(<() as TrackedTrait>::trait_tracked_unit_default, ());
} |
Similar case but additional Codepub struct S();
pub trait X {
fn unused3(var: i32) {
println!("{}", var);
}
}
impl X for S {}
fn main() {} Command
Meta
OutputOutput
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Zpolymorphize
Unstable option: Polymorphization.
C-bug
Category: This is a bug.
glacier
ICE tracked in rust-lang/glacier.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
S-bug-has-test
Status: This bug is tracked inside the repo by a `known-bug` test.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Code
src/test/ui/issues/issue-39292.rs
Meta
rustc --version --verbose
:Error output
rustc src/test/ui/issues/issue-39292.rs -Zpolymorphize=on
Backtrace
The text was updated successfully, but these errors were encountered: