Crash on current examples
The minivec
example no longer works.
Here a minimal working example:
#![feature(register_tool)]
#![register_tool(rr)]
#![feature(custom_inner_attributes)]
fn main() {}
pub struct Foo {}
impl Foo {
#[rr::returns("")]
pub fn a(&mut self) {
assert!(true, "");
}
#[rr::returns("")]
pub fn b(&mut self) {
assert!(true, "");
}
}
Here the (interesting part of the) stack trace:
thread 'rustc' panicked at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/compiler/rustc_errors/src/lib.rs:1651:9:
Box<dyn Any>
stack backtrace:
[...]
16: 0x7ffff7115156 - std[843b1ee06368cddb]::panicking::begin_panic::<rustc_errors[e553a123e183cff8]::ExplicitBug>
17: 0x7ffff715f6e4 - <rustc_errors[e553a123e183cff8]::HandlerInner>::bug::<alloc[606cb6f3851bb62a]::string::String>
18: 0x7ffff715f5a6 - <rustc_errors[e553a123e183cff8]::Handler>::bug::<alloc[606cb6f3851bb62a]::string::String>
19: 0x7ffff708104c - rustc_middle[ad90ed66b4303932]::util::bug::opt_span_bug_fmt::<rustc_span[82af0e0afe7e8690]::span_encoding::Span>::{closure#0}
20: 0x7ffff7080f8a - rustc_middle[ad90ed66b4303932]::ty::context::tls::with_opt::<rustc_middle[ad90ed66b4303932]::util::bug::opt_span_bug_fmt<rustc_span[82af0e0afe7e8690]::span_encoding::Span>::{closure#0}, !>::{closure#0}
21: 0x7ffff7080f58 - rustc_middle[ad90ed66b4303932]::ty::context::tls::with_context_opt::<rustc_middle[ad90ed66b4303932]::ty::context::tls::with_opt<rustc_middle[ad90ed66b4303932]::util::bug::opt_span_bug_fmt<rustc_span[82af0e0afe7e8690]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
22: 0x7ffff56e3040 - rustc_middle[ad90ed66b4303932]::util::bug::bug_fmt
23: 0x7ffff53cee90 - <rustc_middle[ad90ed66b4303932]::ty::generic_args::GenericArg>::expect_ty
24: 0x5555556706fb - translation::type_translator::TypeTranslator::generate_struct_use::h13e5dd48f6c6742a
25: 0x55555566f890 - translation::type_translator::TypeTranslator::generate_structlike_use::hfd5d25c9b92cff3a
26: 0x55555567aef2 - translation::type_translator::TypeTranslator::translate_type_with_deps::h74015a037fcadf57
27: 0x55555564668e - translation::function_body::FunctionTranslator::translate::hf274d341fec9c3cf
28: 0x555555612ba1 - translation::translate_functions::h3fe59cdac6d5f65c
29: 0x5555555dde6b - translation::generate_coq_code::h2861c61ca0ef840f
30: 0x5555555e27d1 - refinedrust_rustc::analyze::h76cb9321d47aea38
31: 0x5555555e2b11 - <refinedrust_rustc::RRCompilerCalls as rustc_driver_impl::Callbacks>::after_analysis::h78aba6221d9048bf
[...]
rustc version: 1.74.0-nightly (ca2b74f1a 2023-09-14)
platform: x86_64-unknown-linux-gnu
The crash occurs in this line.