Skip to content

ReSkolemized can leak into error messages #13998

Closed
@jmmk

Description

@jmmk
examples/examples.rs:46:26: 46:34 error: lifetime of function argument does not outlive the function call
examples/examples.rs:46     let f = SlotAny::new(two_args);
                                                 ^~~~~~~~
note: the function argument is only valid for lifetime ReInfer(ReSkolemized(0u, BrAnon(0u)))
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'assertion failed: !ty::type_needs_infer(ty)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/librustc/middle/typeck/mod.rs:251
stack backtrace:
   1:        0x10c3c9a64 - rt::backtrace::imp::write::habc56a229da3d9445Ea::v0.11.pre
   2:        0x10c31e00e - rt::unwind::begin_unwind_inner::he30d2051ed995551bfa::v0.11.pre
   3:        0x10c31d4c7 - rt::unwind::begin_unwind_fmt::h6e44c556d6cd8deelea::v0.11.pre
   4:        0x109914c56 - middle::typeck::write_ty_to_tcx::h2b827da2c5dd52b30fu::v0.11.pre
   5:        0x10991135e - middle::typeck::check::writeback::resolve_type_vars_for_node::h56adc403301d71a1TS1::v0.11.pre
   6:        0x10991583a - middle::typeck::check::writeback::visit_expr::hf20f6553222bc96ft51::v0.11.pre
   7:        0x109915b3d - middle::typeck::check::writeback::visit_expr::hf20f6553222bc96ft51::v0.11.pre
   8:        0x109917a6e - middle::typeck::check::writeback::visit_local::h60d5d5890d438f00Ja2::v0.11.pre
   9:        0x109915570 - middle::typeck::check::writeback::visit_stmt::h57274c9f7367d7c8T41::v0.11.pre
   10:        0x109917023 - visit::walk_block::h4813911114547969337::v0.11.pre
  11:        0x10991a312 - middle::typeck::check::writeback::resolve_type_vars_in_fn::h648841adac5a5f12yn2::v0.11.pre
  12:        0x10996ae17 - middle::typeck::check::check_bare_fn::h727d76d1a8c0577cx36::v0.11.pre
  13:        0x109962d4e - middle::typeck::check::check_item::hb3e06af45cad1763Uz7::v0.11.pre
  14:        0x10996ab2d - middle::typeck::check::check_item_types::h4794d86cd018c594P26::v0.11.pre
  15:        0x109aad54f - util::common::time::h13076619411820452536::v0.11.pre
  16:        0x109aac47d - middle::typeck::check_crate::h979c5052f97482abIzu::v0.11.pre
  17:        0x109eb5b21 - driver::driver::phase_3_run_analysis_passes::ha118c3d47f9c07e1Ssf::v0.11.pre
  18:        0x109ebb572 - driver::driver::compile_input::h09b012d109a97ff53Rf::v0.11.pre
  19:        0x109ee1ba7 - run_compiler::h1896b068d115fa30akn::v0.11.pre
  20:        0x109ef9afd - main_args::closure.91270
  21:        0x109ef7e92 - monitor::closure.91145
  22:        0x109ef2a7b - task::TaskBuilder::try::closure.90911
  23:        0x109665d6c - task::spawn_opts::closure.7135
  24:        0x10c3bfa68 - rt::task::Task::run::closure.40347
  25:        0x10c3cec4c - rust_try
  26:        0x10c3bf8e7 - rt::task::Task::run::ha1efa04543646d12L57::v0.11.pre
  27:        0x109665bef - task::spawn_opts::closure.7107
  28:        0x10c3c8436 - rt::thread::thread_start::h2d864941e9d800a8YK8::v0.11.pre
  29:     0x7fff8ce75899 - _pthread_body
  30:     0x7fff8ce7572a - _pthread_struct_init

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.D-papercutDiagnostics: An error or lint that needs small tweaks.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions