Closed
Description
Code
//@ run-pass
#![allow(unused)]
#![feature(f128)]
#![feature(f16)]
// Same as the feature gate tests but ensure we can use the types
mod check_f128 {
const A: f128 = 10.0;
pub fn foo() {
let a: f128 = 100.0;
let b = 0.0f128;
bar(1.23);
}
fn bar(a: f128) {}
struct Bar {
a: f128,
}
}
mod check_f16 {
const A: f16 = 10.0;
pub fn foo() {
let a: f16 = 100.0;
let b = 0.0f16;
bar(1.23);
}
fn bar(a: f16) {}
struct Bar {
a: f16,
}
}
fn main() {
check_f128::foo();
check_f16::foo();
}
Meta
rustc --version --verbose
:
rustc 1.78.0-nightly (c563f2ee7 2024-03-16)
binary: rustc
commit-hash: c563f2ee799b285067124b516ce99f26063f8351
commit-date: 2024-03-16
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0
probably from #121926
Error output
clippy-driver ./tests/ui/resolve/primitive-usage.rs
<output>
Backtrace
not implemented: f16_f128
stack backtrace:
0: 0x7f006f963912 - std::backtrace_rs::backtrace::libunwind::trace::hfb67e397a2d79bf6
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/../../backtrace/src/backtrace/libunwind.rs:105:5
1: 0x7f006f963912 - std::backtrace_rs::backtrace::trace_unsynchronized::hb900027543c0664d
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7f006f963912 - std::sys_common::backtrace::_print_fmt::hd3a7bd10b2dbb7a2
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:68:5
3: 0x7f006f963912 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he85321ead13b54e2
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7f006f9b4c8c - core::fmt::rt::Argument::fmt::h0bc0fca72ec6160d
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/core/src/fmt/rt.rs:142:9
5: 0x7f006f9b4c8c - core::fmt::write::ha791bec9376ee18e
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/core/src/fmt/mod.rs:1153:17
6: 0x7f006f95880f - std::io::Write::write_fmt::h042ac5ef2add44b5
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/io/mod.rs:1843:15
7: 0x7f006f9636e4 - std::sys_common::backtrace::_print::h398ade190e58a268
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:47:5
8: 0x7f006f9636e4 - std::sys_common::backtrace::print::h4965889839a0e456
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:34:9
9: 0x7f006f9663eb - std::panicking::default_hook::{{closure}}::h03c5a9b57e29c8bd
10: 0x7f006f966143 - std::panicking::default_hook::haa39de978c4d4cb4
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:292:9
11: 0x7f006c5b39ee - std[4af49b999d7e887a]::panicking::update_hook::<alloc[f09f849a16bdc2b1]::boxed::Box<rustc_driver_impl[38d4561b07f32730]::install_ice_hook::{closure#0}>>::{closure#0}
12: 0x7f006f966b50 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h3cb59727ca48257b
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/alloc/src/boxed.rs:2034:9
13: 0x7f006f966b50 - std::panicking::rust_panic_with_hook::h06a630682bf4c8f9
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:783:13
14: 0x7f006f966859 - std::panicking::begin_panic_handler::{{closure}}::hd7f55e85f3df5a5e
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:649:13
15: 0x7f006f963de6 - std::sys_common::backtrace::__rust_end_short_backtrace::h4b313dbb2e47ec89
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys_common/backtrace.rs:171:18
16: 0x7f006f9665c4 - rust_begin_unwind
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/panicking.rs:645:5
17: 0x7f006f9b11a5 - core::panicking::panic_fmt::hbd38fdaf62d88af9
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/core/src/panicking.rs:72:14
18: 0x563ce62b0dec - <clippy_lints[87cb8f7c960e2af8]::float_literal::FloatLiteral as rustc_lint[8ec0a3d643a79773]::passes::LateLintPass>::check_expr
19: 0x7f006c944f82 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_expr::{closure#0}
20: 0x7f006c944e18 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_expr
21: 0x7f006c944d18 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_nested_body
22: 0x7f006c934392 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_nested_item
23: 0x7f006c933352 - <rustc_lint[8ec0a3d643a79773]::late::LateContextAndPass<rustc_lint[8ec0a3d643a79773]::late::RuntimeCombinedLateLintPass> as rustc_hir[8460a15472185f08]::intravisit::Visitor>::visit_nested_item
24: 0x7f006e1cc372 - rustc_lint[8ec0a3d643a79773]::late::check_crate::{closure#0}
25: 0x7f006e1cc5b3 - rustc_lint[8ec0a3d643a79773]::late::check_crate
26: 0x7f006e1af1f5 - rustc_interface[baa36353ef4d859f]::passes::analysis
27: 0x7f006e1ae7e5 - rustc_query_impl[1d92c28ac94b67d9]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[1d92c28ac94b67d9]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[1d722b26b5c826bf]::query::erase::Erased<[u8; 1usize]>>
28: 0x7f006e6006e5 - rustc_query_system[19a76085ae3c9fe1]::query::plumbing::try_execute_query::<rustc_query_impl[1d92c28ac94b67d9]::DynamicConfig<rustc_query_system[19a76085ae3c9fe1]::query::caches::SingleCache<rustc_middle[1d722b26b5c826bf]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[1d92c28ac94b67d9]::plumbing::QueryCtxt, false>
29: 0x7f006e600449 - rustc_query_impl[1d92c28ac94b67d9]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
30: 0x7f006e367084 - rustc_interface[baa36353ef4d859f]::interface::run_compiler::<core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>, rustc_driver_impl[38d4561b07f32730]::run_compiler::{closure#0}>::{closure#0}
31: 0x7f006e8538c5 - std[4af49b999d7e887a]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[baa36353ef4d859f]::util::run_in_thread_with_globals<rustc_interface[baa36353ef4d859f]::util::run_in_thread_pool_with_globals<rustc_interface[baa36353ef4d859f]::interface::run_compiler<core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>, rustc_driver_impl[38d4561b07f32730]::run_compiler::{closure#0}>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>
32: 0x7f006e8536f2 - <<std[4af49b999d7e887a]::thread::Builder>::spawn_unchecked_<rustc_interface[baa36353ef4d859f]::util::run_in_thread_with_globals<rustc_interface[baa36353ef4d859f]::util::run_in_thread_pool_with_globals<rustc_interface[baa36353ef4d859f]::interface::run_compiler<core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>, rustc_driver_impl[38d4561b07f32730]::run_compiler::{closure#0}>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[7265e5c29e97a4f9]::result::Result<(), rustc_span[98fd467b3f5fb84]::ErrorGuaranteed>>::{closure#1} as core[7265e5c29e97a4f9]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
33: 0x7f006f9701e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1dc87ff82f4c2d61
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/alloc/src/boxed.rs:2020:9
34: 0x7f006f9701e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h10dfae22642aac72
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/alloc/src/boxed.rs:2020:9
35: 0x7f006f9701e5 - std::sys::pal::unix::thread::Thread::new::thread_start::hfe0706a963f1853a
at /rustc/c563f2ee799b285067124b516ce99f26063f8351/library/std/src/sys/pal/unix/thread.rs:108:17
36: 0x7f0069294ac3 - start_thread
at ./nptl/pthread_create.c:442:8
37: 0x7f0069326850 - __GI___clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
38: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust-clippy/issues/new?template=ice.yml
note: please attach the file at `/home/gh-matthiaskrgr/vcs/github/rust_icemaker/rustc-ice-2024-03-16T09_08_43-265551.txt` to your bug report
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
note: Clippy version: clippy 0.1.78 (c563f2e 2024-03-16)
Metadata
Metadata
Assignees
Labels
Category: This is a bug.`#![feature(f16)]`, `#![feature(f128)]`Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Low priorityStatus: This bug is tracked inside the repo by a `known-bug` test.Status: A Minimal Complete and Verifiable Example has been found for this issueRelevant to the compiler team, which will review and decide on the PR/issue.Performance or correctness regression from stable to beta.This issue requires the use of incomplete features.