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: Unmarked public member in std::cmp::Reverse #43027

Closed
mzji opened this issue Jul 3, 2017 · 1 comment
Closed

ICE: Unmarked public member in std::cmp::Reverse #43027

mzji opened this issue Jul 3, 2017 · 1 comment

Comments

@mzji
Copy link

mzji commented Jul 3, 2017

Stack trace:

error: internal compiler error: src\librustc\middle\stability.rs:583: encountered unmarked API
  --> timer.rs:45:36
   |
45 |                 let (until, do_) = later.0;
   |                                    ^^^^^^^

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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.20.0-nightly (067971139 2017-07-02) running on x86_64-pc-windows-msvc

note: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'Box<Any>', src\librustc_errors\lib.rs:426:8
stack backtrace:
   0: std::net::tcp::TcpListener::incoming
   1: std::panicking::Location::column
   2: std::panicking::Location::column
   3: std::panicking::rust_panic_with_hook
   4: <unknown>
   5: <unknown>
   6: rustc::session::bug_fmt
   7: rustc::session::bug_fmt
   8: rustc::session::bug_fmt
   9: rustc::middle::stability::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::check_stability
  10: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  11: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  12: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  13: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  14: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  15: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  16: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  17: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  18: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  19: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  20: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  21: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  22: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  23: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  24: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  25: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  26: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  27: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  28: <rustc_typeck::check::GatherLocalsVisitor<'a, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_pat
  29: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_impl_item
  30: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  31: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  32: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  33: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_impl_item
  34: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  35: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  36: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  37: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor<'a, 'tcx> as rustc::hir::intravisit::Visitor<'v>>::visit_impl_item
  38: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  39: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  40: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  41: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  42: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  43: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  44: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::set_tainted_by_errors
  45: <rustc_typeck::check::GatherLocalsVisitor<'a, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_pat
  46: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
  47: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
  48: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  49: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  50: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  51: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
  52: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_tables_of<'tcx>>::try_get
  53: rustc::ty::maps::TyCtxtAt::typeck_tables_of
  54: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_tables_of
  55: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
  56: rustc::ty::maps::<impl rustc::ty::maps::queries::typeck_item_bodies<'tcx>>::try_get
  57: rustc::ty::maps::TyCtxtAt::typeck_item_bodies
  58: rustc::ty::maps::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::typeck_item_bodies
  59: rustc_typeck::check_crate
  60: rustc_driver::driver::count_nodes
  61: rustc_driver::driver::count_nodes
  62: rustc_driver::driver::compile_input
  63: rustc_driver::run_compiler
  64: <unknown>
  65: _rust_maybe_catch_panic
  66: <rustc_driver::derive_registrar::Finder as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_impl_item
  67: std::sys::imp::thread::Thread::new
  68: BaseThreadInitThunk

error: Could not compile `proxyhub`.

To learn more, run the command again with --verbose.

The later here is a Reverse<Later>, and Later is :

struct Later {
    until: std::time::Duration,
    do_: fn(Box<Send>),
    thingie: Box<Send>,
}

.

@kennytm
Copy link
Member

kennytm commented Jul 3, 2017

Reduced.

#![feature(reverse_cmp_key)]

use std::cmp::Reverse;

fn main() {
    let later = Reverse(0u32);
    let _ = later.0;
}

It is just that the field of Reverse has no stability marker (compare with the source code of std::num::Wrapping). cc #40893 #42745.

sfackler added a commit to sfackler/rust that referenced this issue Jul 3, 2017
@mzji mzji changed the title std::cmp::Reverse: compiler ICE ICE: Unmarked public member of std::cmp::Reverse Jul 4, 2017
@mzji mzji changed the title ICE: Unmarked public member of std::cmp::Reverse ICE: Unmarked public member in std::cmp::Reverse Jul 4, 2017
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jul 4, 2017
…Simulacrum

Add a stability marker for core::cmp::Reverse.0

Closes rust-lang#43027
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this issue Jul 4, 2017
…Simulacrum

Add a stability marker for core::cmp::Reverse.0

Closes rust-lang#43027
brson pushed a commit to brson/rust that referenced this issue Jul 13, 2017
alexcrichton pushed a commit to brson/rust that referenced this issue Jul 13, 2017
bors added a commit that referenced this issue Jul 20, 2017
Fix checking for missing stability annotations

This was a regression from #37676 causing "unmarked API" ICEs like #43027.

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants