Skip to content
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: cannot convert ReLateParam to a region vid #119085

Closed
matthiaskrgr opened this issue Dec 18, 2023 · 2 comments
Closed

ice: cannot convert ReLateParam to a region vid #119085

matthiaskrgr opened this issue Dec 18, 2023 · 2 comments
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

auto-reduced (treereduce-rust):

struct Test9;

impl Clone for Y {
    fn clone_from(&mut self, other: _) {
        *self = Test9;
    }
}

struct Struct;
trait Trait<T> {}

type Y = impl Trait<_>;

trait Qux {
    type A;

    const D: _ = 42;
}
impl Qux for Struct {}

fn map<T>() -> Qux<T> {
    None
}

const _: Option<_> = map(value);
original code

original:

// Needed for `type Y = impl Trait<_>` and `type B = _;`
#![feature(associated_type_defaults)]
#![feature(type_alias_impl_trait)]
// This test checks that it is not possible to enable global type
// inference by using the `_` type placeholder.

fn test() -> _ { 5 }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

fn test2() -> (_, _) { (5, 5) }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

static TEST3: _ = "test";
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables

static TEST4: _ = 145;
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables

static TEST5: (_, _) = (1, 2);
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables

fn test6(_: _) { }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

fn test6_b<T>(_: _, _: T) { }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

fn test6_c<T, K, L, A, B>(_: _, _: (T, K, L, A, B)) { }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

fn test7(x: _) { let _x: usize = x; }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

fn test8(_f: fn() -> _) { }
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
//~^^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

struct Test9;

impl Test9 {
    fn test9(&self) -> _ { () }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

    fn test10(&self, _x : _) { }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
}

fn test11(x: &usize) -> &_ {
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
    &x
}

unsafe fn test12(x: *const usize) -> *const *const _ {
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
    &x
}

impl Clone for Y {
    fn clone(&self) -> _ { Test9 }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

    fn clone_from(&mut self, other: _) { *self = Test9; }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
}

struct Test10 {
    a: _,
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
    b: (_, _),
}

pub fn main() {
    static A = 42;
    //~^ ERROR missing type for `static` item
    static B: _ = 42;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
    static C: Option<_> = Some(42);
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables
    fn fn_test() -> _ { 5 }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

    fn fn_test2() -> (_, _) { (5, 5) }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

    static FN_TEST3: _ = "test";
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables

    static FN_TEST4: _ = 145;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables

    static FN_TEST5: (_, _) = (1, 2);
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for static variables

    fn fn_test6(_: _) { }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

    fn fn_test7(x: _) { let _x: usize = x; }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

    fn fn_test8(_f: fn() -> _) { }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    //~^^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

    struct FnTest9;

    impl FnTest9 {
        fn fn_test9(&self) -> _ { () }
        //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

        fn fn_test10(&self, _x : _) { }
        //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    }

    impl Clone for FnTest9 {
        fn clone(&self) -> _ { FnTest9 }
        //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions

        fn clone_from(&mut self, other: _) { *self = FnTest9; }
        //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    }

    struct FnTest10 {
        a: _,
        //~^ ERROR the placeholder `_` is not allowed within types on item signatures for structs
        b: (_, _),
    }

    fn D(_: _) -> (_, _) { panic!() }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
    //~| ERROR type annotations needed

    fn fn_test12(x: i32) -> (_, _) { (x, x) }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types

    fn fn_test13(x: _) -> (i32, _) { (x, x) }
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
}

trait T {
    fn method_test1(&self, x: _);
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    fn method_test2(&self, x: _) -> _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    fn method_test3(&self) -> _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    fn assoc_fn_test1(x: _);
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    fn assoc_fn_test2(x: _) -> _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
    fn assoc_fn_test3() -> _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for functions
}

struct BadStruct<_>(_);
//~^ ERROR expected identifier, found reserved identifier `_`
//~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
trait BadTrait<_> {}
//~^ ERROR expected identifier, found reserved identifier `_`
impl BadTrait<_> for BadStruct<_> {}
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for implementations

fn impl_trait() -> impl BadTrait<_> {
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
    unimplemented!()
}

struct BadStruct1<_, _>(_);
//~^ ERROR expected identifier, found reserved identifier `_`
//~| ERROR expected identifier, found reserved identifier `_`
//~| ERROR the name `_` is already used
//~| ERROR the placeholder `_` is not allowed within types on item signatures for structs
struct BadStruct2<_, T>(_, T);
//~^ ERROR expected identifier, found reserved identifier `_`
//~| ERROR the placeholder `_` is not allowed within types on item signatures for structs

type X = Box<_>;
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for type aliases

struct Struct;
trait Trait<T> {}
impl Trait<usize> for Struct {}
type Y = impl Trait<_>;
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for opaque types
fn foo() -> Y {
    Struct
}

trait Qux {
    type A;
    type B = _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
    const C: _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
    const D: _ = 42;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
    // type E: _; // FIXME: make the parser propagate the existence of `B`
    type F: std::ops::Fn(_);
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
}
impl Qux for Struct {
    type A = _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
    type B = _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated types
    const C: _;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
    //~| ERROR associated constant in `impl` without body
    const D: _ = 42;
    //~^ ERROR the placeholder `_` is not allowed within types on item signatures for associated constants
}

fn map<T>(_: fn() -> Option<&'static T>) -> Qux<T> {
    None
}

fn value() -> Option<&'static _> {
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
    Option::<&'static u8>::None
}

const _: Option<_> = map(value);
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for constants

fn evens_squared(n: usize) -> _ {
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for return types
    (1..n).filter(|x| x % 2 == 0).map(|x| x * x)
}

const _: _ = (1..10).filter(|x| x % 2 == 0).map(|x| x * x);
//~^ ERROR the placeholder

Version information

rustc 1.76.0-nightly (e004adb55 2023-12-18)
binary: rustc
commit-hash: e004adb5561b724ac18f5b24584648ca4e42b6ad
commit-date: 2023-12-18
host: x86_64-unknown-linux-gnu
release: 1.76.0-nightly
LLVM version: 17.0.6

Command:
/home/matthias/.rustup/toolchains/master/bin/rustc

Program output

error[E0425]: cannot find value `value` in this scope
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:25:26
   |
25 | const _: Option<_> = map(value);
   |                          ^^^^^ not found in this scope

error[E0658]: `impl Trait` in type aliases is unstable
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:12:10
   |
12 | type Y = impl Trait<_>;
   |          ^^^^^^^^^^^^^
   |
   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable

error[E0601]: `main` function not found in crate `mvce`
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:25:33
   |
25 | const _: Option<_> = map(value);
   |                                 ^ consider adding a `main` function to `/tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs`

error[E0121]: the placeholder `_` is not allowed within types on item signatures for opaque types
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:12:21
   |
12 | type Y = impl Trait<_>;
   |                     ^ not allowed in type signatures

warning: trait objects without an explicit `dyn` are deprecated
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:21:16
   |
21 | fn map<T>() -> Qux<T> {
   |                ^^^^^^
   |
   = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
   = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
   = note: `#[warn(bare_trait_objects)]` on by default
help: use `dyn`
   |
21 | fn map<T>() -> dyn Qux<T> {
   |                +++

error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:21:16
   |
21 | fn map<T>() -> Qux<T> {
   |                ^^^ expected 0 generic arguments
   |
note: trait defined here, with 0 generic parameters
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:14:7
   |
14 | trait Qux {
   |       ^^^
help: replace the generic bound with the associated type
   |
21 | fn map<T>() -> Qux<A = T> {
   |                    +++

error[E0191]: the value of the associated type `A` in `Qux` must be specified
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:21:16
   |
15 |     type A;
   |     ------ `A` defined here
...
21 | fn map<T>() -> Qux<T> {
   |                ^^^^^^ associated type `A` must be specified

error[E0061]: this function takes 0 arguments but 1 argument was supplied
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:25:22
   |
25 | const _: Option<_> = map(value);
   |                      ^^^ -----
   |                          |
   |                          unexpected argument
   |                          help: remove the extra argument
   |
note: function defined here
  --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:21:4
   |
21 | fn map<T>() -> Qux<T> {
   |    ^^^

error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
 --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:4:37
  |
4 |     fn clone_from(&mut self, other: _) {
  |                                     ^ not allowed in type signatures
  |
help: try replacing `_` with the type in the corresponding trait method signature
  |
4 |     fn clone_from(&mut self, other: &Y) {
  |                                     ~~

warning: unused variable: `other`
 --> /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:4:30
  |
4 |     fn clone_from(&mut self, other: _) {
  |                              ^^^^^ help: if this is intentional, prefix it with an underscore: `_other`
  |
  = note: `#[warn(unused_variables)]` on by default

error: internal compiler error: compiler/rustc_borrowck/src/universal_regions.rs:823:36: cannot convert `ReLateParam(DefId(0:6 ~ mvce[6f81]::{impl#0}::clone_from), BrNamed(DefId(2:54203 ~ core[1a1d]::clone::Clone::clone_from::'_#1), '_))` to a region vid

thread 'rustc' panicked at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/compiler/rustc_errors/src/lib.rs:1119:75:
Box<dyn Any>
stack backtrace:
   0:     0x7fc78658aedc - std::backtrace_rs::backtrace::libunwind::trace::hf8d1e06f2dbfd1f2
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/../../backtrace/src/backtrace/libunwind.rs:104:5
   1:     0x7fc78658aedc - std::backtrace_rs::backtrace::trace_unsynchronized::h944a853e00e0958c
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fc78658aedc - std::sys_common::backtrace::_print_fmt::h7873b3c31b9b61e3
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/sys_common/backtrace.rs:68:5
   3:     0x7fc78658aedc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h944f887c48f27d50
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7fc7865de040 - core::fmt::rt::Argument::fmt::h5846db7d079aab6c
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/core/src/fmt/rt.rs:142:9
   5:     0x7fc7865de040 - core::fmt::write::h0fd1694961f0820b
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/core/src/fmt/mod.rs:1120:17
   6:     0x7fc78657edef - std::io::Write::write_fmt::h2e32eec898b113ea
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/io/mod.rs:1810:15
   7:     0x7fc78658acc4 - std::sys_common::backtrace::_print::h0f2767a50ffad96b
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7fc78658acc4 - std::sys_common::backtrace::print::hc25db4529883a26a
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7fc78658d987 - std::panicking::default_hook::{{closure}}::hd0792fb8614ae3f6
  10:     0x7fc78658d6ef - std::panicking::default_hook::h3663fb8da827b919
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/panicking.rs:292:9
  11:     0x7fc789356650 - std[c5ba72f1f49ccbe8]::panicking::update_hook::<alloc[1f2919d2069b2ca0]::boxed::Box<rustc_driver_impl[1444d3f693ba8f9f]::install_ice_hook::{closure#0}>>::{closure#0}
  12:     0x7fc78658e0a6 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h52be504c6602c2c4
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/alloc/src/boxed.rs:2029:9
  13:     0x7fc78658e0a6 - std::panicking::rust_panic_with_hook::h0f9b53de175fb9c2
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/panicking.rs:783:13
  14:     0x7fc78938e374 - std[c5ba72f1f49ccbe8]::panicking::begin_panic::<rustc_errors[85bb5189461774fc]::ExplicitBug>::{closure#0}
  15:     0x7fc78938ac06 - std[c5ba72f1f49ccbe8]::sys_common::backtrace::__rust_end_short_backtrace::<std[c5ba72f1f49ccbe8]::panicking::begin_panic<rustc_errors[85bb5189461774fc]::ExplicitBug>::{closure#0}, !>
  16:     0x7fc78938a876 - std[c5ba72f1f49ccbe8]::panicking::begin_panic::<rustc_errors[85bb5189461774fc]::ExplicitBug>
  17:     0x7fc7893995f8 - <rustc_errors[85bb5189461774fc]::diagnostic_builder::Bug as rustc_errors[85bb5189461774fc]::diagnostic_builder::EmissionGuarantee>::diagnostic_builder_emit_producing_guarantee
  18:     0x7fc78977a8f5 - <rustc_errors[85bb5189461774fc]::DiagCtxt>::bug::<alloc[1f2919d2069b2ca0]::string::String>
  19:     0x7fc7898147db - rustc_middle[8fed8700d526b8a]::util::bug::opt_span_bug_fmt::<rustc_span[8207f921591536bc]::span_encoding::Span>::{closure#0}
  20:     0x7fc7897fe56a - rustc_middle[8fed8700d526b8a]::ty::context::tls::with_opt::<rustc_middle[8fed8700d526b8a]::util::bug::opt_span_bug_fmt<rustc_span[8207f921591536bc]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7fc7897fe408 - rustc_middle[8fed8700d526b8a]::ty::context::tls::with_context_opt::<rustc_middle[8fed8700d526b8a]::ty::context::tls::with_opt<rustc_middle[8fed8700d526b8a]::util::bug::opt_span_bug_fmt<rustc_span[8207f921591536bc]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7fc7876f73c0 - rustc_middle[8fed8700d526b8a]::util::bug::bug_fmt
  23:     0x7fc78b8888ad - <rustc_borrowck[9e744fb7478f1ce7]::universal_regions::UniversalRegionIndices>::fold_to_region_vids::<rustc_middle[8fed8700d526b8a]::ty::sty::Binder<rustc_middle[8fed8700d526b8a]::ty::sty::FnSig>>::{closure#0}.cold.0
  24:     0x7fc78a62a964 - <rustc_middle[8fed8700d526b8a]::ty::Ty as rustc_type_ir[2aac9198a7a08770]::fold::TypeSuperFoldable<rustc_middle[8fed8700d526b8a]::ty::context::TyCtxt>>::try_super_fold_with::<rustc_middle[8fed8700d526b8a]::ty::fold::RegionFolder>
  25:     0x7fc78a629aad - <&rustc_middle[8fed8700d526b8a]::ty::list::List<rustc_middle[8fed8700d526b8a]::ty::Ty> as rustc_type_ir[2aac9198a7a08770]::fold::TypeFoldable<rustc_middle[8fed8700d526b8a]::ty::context::TyCtxt>>::try_fold_with::<rustc_middle[8fed8700d526b8a]::ty::fold::RegionFolder>
  26:     0x7fc78b478bb1 - rustc_borrowck[9e744fb7478f1ce7]::do_mir_borrowck
  27:     0x7fc78b477319 - rustc_borrowck[9e744fb7478f1ce7]::mir_borrowck
  28:     0x7fc78b476db9 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::mir_borrowck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>
  29:     0x7fc78a83ccc3 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::VecCache<rustc_span[8207f921591536bc]::def_id::LocalDefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  30:     0x7fc78a83c890 - rustc_query_impl[d8b4c006c93aa769]::query_impl::mir_borrowck::get_query_non_incr::__rust_end_short_backtrace
  31:     0x7fc78ba0b7bc - rustc_middle[8fed8700d526b8a]::query::plumbing::query_get_at::<rustc_query_system[17d0b5ace26db19a]::query::caches::VecCache<rustc_span[8207f921591536bc]::def_id::LocalDefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>>.llvm.13961986166402614303.cold.0
  32:     0x7fc7894a4b15 - <rustc_hir_analysis[48336eb585649c0a]::collect::type_of::opaque::TaitConstraintLocator>::check
  33:     0x7fc78948a6f5 - <rustc_hir_analysis[48336eb585649c0a]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[fc8afc23bda2c8cc]::intravisit::Visitor>::visit_impl_item
  34:     0x7fc78948a641 - <rustc_hir_analysis[48336eb585649c0a]::collect::type_of::opaque::TaitConstraintLocator as rustc_hir[fc8afc23bda2c8cc]::intravisit::Visitor>::visit_item
  35:     0x7fc78b5cf31b - rustc_hir_analysis[48336eb585649c0a]::collect::type_of::type_of_opaque
  36:     0x7fc78b5ceaf9 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::type_of_opaque::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>
  37:     0x7fc78a6849d4 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::DefaultCache<rustc_span[8207f921591536bc]::def_id::DefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  38:     0x7fc78b645d1e - rustc_query_impl[d8b4c006c93aa769]::query_impl::type_of_opaque::get_query_non_incr::__rust_end_short_backtrace
  39:     0x7fc78a7e64c4 - rustc_middle[8fed8700d526b8a]::query::plumbing::query_get_at::<rustc_query_system[17d0b5ace26db19a]::query::caches::DefaultCache<rustc_span[8207f921591536bc]::def_id::DefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>>
  40:     0x7fc788a08b7b - rustc_hir_analysis[48336eb585649c0a]::collect::type_of::type_of
  41:     0x7fc78a685ae6 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>
  42:     0x7fc78a6849d4 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::DefaultCache<rustc_span[8207f921591536bc]::def_id::DefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  43:     0x7fc78a68459d - rustc_query_impl[d8b4c006c93aa769]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  44:     0x7fc78aa70ac9 - rustc_middle[8fed8700d526b8a]::query::plumbing::query_get_at::<rustc_query_system[17d0b5ace26db19a]::query::caches::DefaultCache<rustc_span[8207f921591536bc]::def_id::DefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>>
  45:     0x7fc78aa6cad9 - <rustc_privacy[db1ef3ffe8dcc2c1]::EmbargoVisitor as rustc_hir[fc8afc23bda2c8cc]::intravisit::Visitor>::visit_item
  46:     0x7fc78aa68b8a - <rustc_middle[8fed8700d526b8a]::hir::map::Map>::visit_all_item_likes_in_crate::<rustc_privacy[db1ef3ffe8dcc2c1]::EmbargoVisitor>
  47:     0x7fc78a642b50 - rustc_privacy[db1ef3ffe8dcc2c1]::effective_visibilities
  48:     0x7fc78a6429b5 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::effective_visibilities::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>
  49:     0x7fc78b2bb0f2 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::SingleCache<rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  50:     0x7fc78b2bba06 - rustc_query_impl[d8b4c006c93aa769]::query_impl::effective_visibilities::get_query_non_incr::__rust_end_short_backtrace
  51:     0x7fc7896424e9 - rustc_infer[2ae1df4046e74a8]::traits::error_reporting::report_object_safety_error
  52:     0x7fc789e945d1 - <rustc_infer[2ae1df4046e74a8]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[21155bdcdc3017e2]::traits::error_reporting::type_err_ctxt_ext::TypeErrCtxtExt>::report_selection_error
  53:     0x7fc789ebd221 - <rustc_infer[2ae1df4046e74a8]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[21155bdcdc3017e2]::traits::error_reporting::type_err_ctxt_ext::InferCtxtPrivExt>::report_fulfillment_error
  54:     0x7fc789e918d7 - <rustc_infer[2ae1df4046e74a8]::infer::error_reporting::TypeErrCtxt as rustc_trait_selection[21155bdcdc3017e2]::traits::error_reporting::type_err_ctxt_ext::TypeErrCtxtExt>::report_fulfillment_errors
  55:     0x7fc78b049b05 - <rustc_hir_typeck[efc20ad080163a56]::fn_ctxt::FnCtxt>::type_inference_fallback
  56:     0x7fc7895763f5 - rustc_hir_typeck[efc20ad080163a56]::diagnostic_only_typeck
  57:     0x7fc789bab127 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::diagnostic_only_typeck::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>
  58:     0x7fc78a83ccc3 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::VecCache<rustc_span[8207f921591536bc]::def_id::LocalDefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  59:     0x7fc789bb7080 - rustc_query_impl[d8b4c006c93aa769]::query_impl::diagnostic_only_typeck::get_query_non_incr::__rust_end_short_backtrace
  60:     0x7fc78ba0b7bc - rustc_middle[8fed8700d526b8a]::query::plumbing::query_get_at::<rustc_query_system[17d0b5ace26db19a]::query::caches::VecCache<rustc_span[8207f921591536bc]::def_id::LocalDefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>>.llvm.13961986166402614303.cold.0
  61:     0x7fc78948a9dc - rustc_hir_analysis[48336eb585649c0a]::collect::type_of::infer_placeholder_type
  62:     0x7fc788a090df - rustc_hir_analysis[48336eb585649c0a]::collect::type_of::type_of
  63:     0x7fc78a685ae6 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::type_of::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>
  64:     0x7fc78a6849d4 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::DefaultCache<rustc_span[8207f921591536bc]::def_id::DefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 8usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  65:     0x7fc78a68459d - rustc_query_impl[d8b4c006c93aa769]::query_impl::type_of::get_query_non_incr::__rust_end_short_backtrace
  66:     0x7fc78a8f7fa2 - <rustc_hir_analysis[48336eb585649c0a]::collect::CollectItemTypesVisitor as rustc_hir[fc8afc23bda2c8cc]::intravisit::Visitor>::visit_item
  67:     0x7fc78a8f7329 - rustc_hir_analysis[48336eb585649c0a]::collect::collect_mod_item_types
  68:     0x7fc78a8f72b7 - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::collect_mod_item_types::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 0usize]>>
  69:     0x7fc78b1af07b - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::DefaultCache<rustc_span[8207f921591536bc]::def_id::LocalModDefId, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 0usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  70:     0x7fc78b1aeb97 - rustc_query_impl[d8b4c006c93aa769]::query_impl::collect_mod_item_types::get_query_non_incr::__rust_end_short_backtrace
  71:     0x7fc78ae312df - rustc_hir_analysis[48336eb585649c0a]::check_crate
  72:     0x7fc78af6cb17 - rustc_interface[b6a357093a72c36b]::passes::analysis
  73:     0x7fc78af6c75d - rustc_query_impl[d8b4c006c93aa769]::plumbing::__rust_begin_short_backtrace::<rustc_query_impl[d8b4c006c93aa769]::query_impl::analysis::dynamic_query::{closure#2}::{closure#0}, rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 1usize]>>
  74:     0x7fc78b5a8db2 - rustc_query_system[17d0b5ace26db19a]::query::plumbing::try_execute_query::<rustc_query_impl[d8b4c006c93aa769]::DynamicConfig<rustc_query_system[17d0b5ace26db19a]::query::caches::SingleCache<rustc_middle[8fed8700d526b8a]::query::erase::Erased<[u8; 1usize]>>, false, false, false>, rustc_query_impl[d8b4c006c93aa769]::plumbing::QueryCtxt, false>
  75:     0x7fc78b5a8bb9 - rustc_query_impl[d8b4c006c93aa769]::query_impl::analysis::get_query_non_incr::__rust_end_short_backtrace
  76:     0x7fc78b63ddf1 - rustc_interface[b6a357093a72c36b]::interface::run_compiler::<core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>, rustc_driver_impl[1444d3f693ba8f9f]::run_compiler::{closure#0}>::{closure#0}
  77:     0x7fc78b5b5020 - std[c5ba72f1f49ccbe8]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[b6a357093a72c36b]::util::run_in_thread_with_globals<rustc_interface[b6a357093a72c36b]::util::run_in_thread_pool_with_globals<rustc_interface[b6a357093a72c36b]::interface::run_compiler<core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>, rustc_driver_impl[1444d3f693ba8f9f]::run_compiler::{closure#0}>::{closure#0}, core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>>::{closure#0}, core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>>
  78:     0x7fc78b5b4e4f - <<std[c5ba72f1f49ccbe8]::thread::Builder>::spawn_unchecked_<rustc_interface[b6a357093a72c36b]::util::run_in_thread_with_globals<rustc_interface[b6a357093a72c36b]::util::run_in_thread_pool_with_globals<rustc_interface[b6a357093a72c36b]::interface::run_compiler<core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>, rustc_driver_impl[1444d3f693ba8f9f]::run_compiler::{closure#0}>::{closure#0}, core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>>::{closure#0}, core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[1a1dce668ca699c0]::result::Result<(), rustc_span[8207f921591536bc]::ErrorGuaranteed>>::{closure#1} as core[1a1dce668ca699c0]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  79:     0x7fc786597ef5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h605802586f69a65d
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/alloc/src/boxed.rs:2015:9
  80:     0x7fc786597ef5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hde1bcd609c096275
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/alloc/src/boxed.rs:2015:9
  81:     0x7fc786597ef5 - std::sys::unix::thread::Thread::new::thread_start::h972b401527bc30fd
                               at /rustc/e004adb5561b724ac18f5b24584648ca4e42b6ad/library/std/src/sys/unix/thread.rs:108:17
  82:     0x7fc7863849eb - <unknown>
  83:     0x7fc7864087cc - <unknown>
  84:                0x0 - <unknown>

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.76.0-nightly (e004adb55 2023-12-18) running on x86_64-unknown-linux-gnu

query stack during panic:
#0 [mir_borrowck] borrow-checking `<impl at /tmp/icemaker_global_tempdir.fSNNtQJdclF8/rustc_testrunner_tmpdir_reporting.O3o2lOsZKdS6/mvce.rs:3:1: 3:17>::clone_from`
#1 [type_of_opaque] computing type of opaque `Y::{opaque#0}`
#2 [type_of] computing type of `Y::{opaque#0}`
#3 [effective_visibilities] checking effective visibilities
#4 [diagnostic_only_typeck] type-checking `_`
#5 [type_of] computing type of `_`
#6 [collect_mod_item_types] collecting item types in top-level module
#7 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to 9 previous errors; 2 warnings emitted

Some errors have detailed explanations: E0061, E0107, E0121, E0191, E0425, E0601, E0658.
For more information about an error, try `rustc --explain E0061`.

@matthiaskrgr matthiaskrgr added I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Dec 18, 2023
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 18, 2023
@matthiaskrgr
Copy link
Member Author

Regression in nightly-2023-10-31
Regression in 236ac91
Regression in rust-lang-ci@33ef793
=> #117132 ping @estebank

@saethlin saethlin removed the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Dec 19, 2023
@estebank
Copy link
Contributor

estebank commented Feb 1, 2024

I can no longer reproduce. @matthiaskrgr feel free to reopen if I'm missing something.

@estebank estebank closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants