Skip to content

Mask::<_,_>::splat(false) breaks #![feature(generic_arg_infer)] #91614

Closed
@workingjubilee

Description

@workingjubilee

We added a new feature to the Portable SIMD API!

Simd::break_compiler();

Yes, that's right: we can now break the compiler 4 times faster!

Code

#![feature(portable_simd)]
#![feature(generic_arg_infer)]
use std::simd::{Mask};

fn main() {
    let y = Mask::<_, _>::splat(false);
}

Meta

I first discovered this on rustc 1.58.0-nightly (b416e38 2021-11-13) but it remains an issue currently:
rustc --version --verbose:

rustc 1.59.0-nightly (e2116acae 2021-12-05)
binary: rustc
commit-hash: e2116acae59654bfab2a9729a024f3e2fd6d4b02
commit-date: 2021-12-05
host: x86_64-pc-windows-msvc
release: 1.59.0-nightly
LLVM version: 13.0.0

Error output

PS C:\Users\${name}\project> rustc -O test_mask.rs
thread 'rustc' panicked at 'not yet implemented', compiler\rustc_typeck\src\astconv\mod.rs:462:29
stack backtrace:
<SNIP, see backtrace details>

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: <this very link!>

note: rustc 1.58.0-nightly (b416e3892 2021-11-13) running on x86_64-pc-windows-msvc

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
Backtrace

PS C:\Users\${name}\project> rustc -O test_mask.rs
thread 'rustc' panicked at 'not yet implemented', compiler\rustc_typeck\src\astconv\mod.rs:462:29
stack backtrace:
   0:     0x7ff9a3ec8c6f - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hda2ead71f9ecd977
   1:     0x7ff9a3ef29ca - core::fmt::write::h8a2c40ddb66ccc71
   2:     0x7ff9a3ebb3a8 - <std::io::IoSliceMut as core::fmt::Debug>::fmt::hdbb03a4cecc24b5e
   3:     0x7ff9a3ecc1b6 - std::panicking::take_hook::ha134472c0530875e
   4:     0x7ff9a3ecbc9c - std::panicking::take_hook::ha134472c0530875e
   5:     0x7ff99683b47e - <rustc_lint[fc42b54c9644860b]::BuiltinCombinedPreExpansionLintPass as rustc_lint[fc42b54c9644860b]::passes::EarlyLintPass>::check_expr
   6:     0x7ff9a3eccac9 - std::panicking::rust_panic_with_hook::h1142463f499f4e70
   7:     0x7ff9a3ecc53f - rust_begin_unwind
   8:     0x7ff9a3ec9597 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hda2ead71f9ecd977
   9:     0x7ff9a3ecc4c9 - rust_begin_unwind
  10:     0x7ff9a3f270a0 - core::panicking::panic_fmt::hc1b1ca620e7a2c9f
  11:     0x7ff9a3f26fec - core::panicking::panic::hfef5cee9afdef02a
  12:     0x7ff999314fc7 - <<dyn rustc_typeck[42ffb4b1f83c37eb]::astconv::AstConv>::create_substs_for_ast_path::SubstsForAstPathCtxt as rustc_typeck[42ffb4b1f83c37eb]::astconv::CreateSubstsForGenericArgsCtxt>::provided_kind
  13:     0x7ff99931231d - <rustc_typeck[42ffb4b1f83c37eb]::astconv::ConvertedBindingKind as core[3b5640218fb446b]::fmt::Debug>::fmt
  14:     0x7ff9992f195c - <rustc_typeck[42ffb4b1f83c37eb]::check::writeback::Resolver as rustc_middle[25ed325aece9029c]::ty::fold::TypeFolder>::fold_const
  15:     0x7ff9992f8c4b - <rustc_typeck[42ffb4b1f83c37eb]::check::writeback::Resolver as rustc_middle[25ed325aece9029c]::ty::fold::TypeFolder>::fold_const
  16:     0x7ff999306f94 - <rustc_typeck[42ffb4b1f83c37eb]::check::writeback::Resolver as rustc_middle[25ed325aece9029c]::ty::fold::TypeFolder>::fold_const
  17:     0x7ff999316a6c - <<dyn rustc_typeck[42ffb4b1f83c37eb]::astconv::AstConv>::create_substs_for_ast_path::SubstsForAstPathCtxt as rustc_typeck[42ffb4b1f83c37eb]::astconv::CreateSubstsForGenericArgsCtxt>::inferred_kind
  18:     0x7ff999160df6 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::resolve_ty_and_res_fully_qualified_call
  19:     0x7ff999150a64 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_for_cast
  20:     0x7ff999150512 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_for_cast
  21:     0x7ff9991380fe - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_call
  22:     0x7ff99919d6ec - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  23:     0x7ff9991505a9 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_for_cast
  24:     0x7ff9991500d6 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_for_cast
  25:     0x7ff9991674d8 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_decl_local
  26:     0x7ff999167731 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_stmt
  27:     0x7ff99916804d - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_block_no_value
  28:     0x7ff9991505a9 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_for_cast
  29:     0x7ff999151508 - <rustc_typeck[42ffb4b1f83c37eb]::check::fn_ctxt::FnCtxt>::check_for_cast
  30:     0x7ff999381bf0 - <rustc_typeck[42ffb4b1f83c37eb]::variance::constraints::ConstraintContext as rustc_hir[ae23d96f99620364]::itemlikevisit::ItemLikeVisitor>::visit_foreign_item
  31:     0x7ff999299879 - <rustc_typeck[42ffb4b1f83c37eb]::check::regionck::RegionCtxt as rustc_hir[ae23d96f99620364]::intravisit::Visitor>::visit_expr
  32:     0x7ff99925778c - rustc_typeck[42ffb4b1f83c37eb]::check::provide
  33:     0x7ff999dae4d1 - <rustc_mir_dataflow[21def95b390535c9]::impls::init_locals::MaybeInitializedLocals as rustc_mir_dataflow[21def95b390535c9]::framework::AnalysisDomain>::initialize_start_block
  34:     0x7ff999f00255 - <rustc_mir_dataflow[21def95b390535c9]::impls::init_locals::MaybeInitializedLocals as rustc_mir_dataflow[21def95b390535c9]::framework::AnalysisDomain>::initialize_start_block
  35:     0x7ff99928c44b - <rustc_typeck[42ffb4b1f83c37eb]::check::regionck::RegionCtxt as rustc_hir[ae23d96f99620364]::intravisit::Visitor>::visit_expr
  36:     0x7ff99925dbb3 - <rustc_typeck[42ffb4b1f83c37eb]::check::CheckItemTypesVisitor as rustc_hir[ae23d96f99620364]::itemlikevisit::ItemLikeVisitor>::visit_item
  37:     0x7ff999e49415 - <rustc_mir_dataflow[21def95b390535c9]::impls::init_locals::MaybeInitializedLocals as rustc_mir_dataflow[21def95b390535c9]::framework::AnalysisDomain>::initialize_start_block
  38:     0x7ff999ed4d95 - <rustc_mir_dataflow[21def95b390535c9]::impls::init_locals::MaybeInitializedLocals as rustc_mir_dataflow[21def95b390535c9]::framework::AnalysisDomain>::initialize_start_block
  39:     0x7ff999240e6d - <rustc_typeck[42ffb4b1f83c37eb]::outlives::explicit::ExplicitPredicatesMap as core[3b5640218fb446b]::fmt::Debug>::fmt
  40:     0x7ff99923f7f5 - rustc_typeck[42ffb4b1f83c37eb]::check_crate
  41:     0x7ff9969b66cf - rustc_interface[ede8d86ad4d1922a]::passes::analysis
  42:     0x7ff999e33dc1 - <rustc_mir_dataflow[21def95b390535c9]::impls::init_locals::MaybeInitializedLocals as rustc_mir_dataflow[21def95b390535c9]::framework::AnalysisDomain>::initialize_start_block
  43:     0x7ff999f006a2 - <rustc_mir_dataflow[21def95b390535c9]::impls::init_locals::MaybeInitializedLocals as rustc_mir_dataflow[21def95b390535c9]::framework::AnalysisDomain>::initialize_start_block
  44:     0x7ff99689b090 - <rustc_middle[25ed325aece9029c]::ty::SymbolName as core[3b5640218fb446b]::fmt::Display>::fmt
  45:     0x7ff99689bb54 - <rustc_middle[25ed325aece9029c]::ty::SymbolName as core[3b5640218fb446b]::fmt::Display>::fmt
  46:     0x7ff996856a85 - rustc_driver[c696c68206e0209d]::pretty::print_after_hir_lowering
  47:     0x7ff9968b8e13 - <rustc_middle[25ed325aece9029c]::ty::SymbolName as core[3b5640218fb446b]::fmt::Display>::fmt
  48:     0x7ff99685f223 - rustc_driver[c696c68206e0209d]::pretty::print_after_hir_lowering
  49:     0x7ff9968d6948 - <rustc_driver[c696c68206e0209d]::args::Error as core[3b5640218fb446b]::fmt::Debug>::fmt
  50:     0x7ff9a3ed934c - std::sys::windows::thread::Thread::new::h0fc50b675267fa21
  51:     0x7ffa296c7034 - BaseThreadInitThunk
  52:     0x7ffa2a4c2651 - RtlUserThreadStart

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.58.0-nightly (b416e3892 2021-11-13) running on x86_64-pc-windows-msvc

query stack during panic:
#0 [typeck] type-checking `main`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack

Metadata

Metadata

Assignees

Labels

A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions