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: cfi: TAIT transform_ty: unexpected Alias(Opaque` #111206

Open
matthiaskrgr opened this issue May 4, 2023 · 10 comments
Open

ICE: cfi: TAIT transform_ty: unexpected Alias(Opaque` #111206

matthiaskrgr opened this issue May 4, 2023 · 10 comments
Assignees
Labels
A-sanitizers Area: Sanitizers for correctness and code quality. C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ PG-exploit-mitigations Project group: Exploit mitigations requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented May 4, 2023

Code

build with -Zsanitizer=cfi -Clto

#![feature(type_alias_impl_trait)]

trait T {
    type Item;
}

type Alias<'a> = impl T;

struct S;
impl<'a> T for &'a S {
    type Item = &'a ();
}

fn filter_positive<'a>() -> Alias<'a> {
    &S
}

fn with_positive(fun: impl Fn(Alias<'_>)) {}

fn main() {
    with_positive(|_| ());
}

Meta

rustc --version --verbose:

rustc 1.71.0-nightly (6f8c0557e 2023-05-04)
binary: rustc
commit-hash: 6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c
commit-date: 2023-05-04
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2

Error output


Backtrace

warning: unused variable: `fun`
  --> treereduce.out:18:18
   |
18 | fn with_positive(fun: impl Fn(Alias<'_>)) {}
   |                  ^^^ help: if this is intentional, prefix it with an underscore: `_fun`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: function `filter_positive` is never used
  --> treereduce.out:14:4
   |
14 | fn filter_positive<'a>() -> Alias<'a> {
   |    ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

error: internal compiler error: compiler/rustc_symbol_mangling/src/typeid/typeid_itanium_cxx_abi.rs:881:13: transform_ty: unexpected `Alias(Opaque, AliasTy { substs: [ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrAnon(None) })], def_id: DefId(0:17 ~ treereduce[9f90]::Alias::{opaque#0}) })`

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/compiler/rustc_errors/src/lib.rs:1643:9
stack backtrace:
   0:     0x7f4e28569441 - std::backtrace_rs::backtrace::libunwind::trace::ha1124e3c4b659eb5
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x7f4e28569441 - std::backtrace_rs::backtrace::trace_unsynchronized::h3a8d622ec81b6cb5
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f4e28569441 - std::sys_common::backtrace::_print_fmt::h2128e938c7086b6e
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x7f4e28569441 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc50c3543d0b1b52f
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x7f4e285ca0df - core::fmt::rt::Argument::fmt::h84c36e9580f5b71f
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/core/src/fmt/rt.rs:138:9
   5:     0x7f4e285ca0df - core::fmt::write::h326e01f7a9aa5dd9
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/core/src/fmt/mod.rs:1094:21
   6:     0x7f4e2855c4f1 - std::io::Write::write_fmt::h71f0f6281149b8c8
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/io/mod.rs:1712:15
   7:     0x7f4e28569255 - std::sys_common::backtrace::_print::h6b9c2111a065fb89
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x7f4e28569255 - std::sys_common::backtrace::print::hf8d0af7625f66057
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x7f4e2856bee7 - std::panicking::default_hook::{{closure}}::h630fe7740556559d
  10:     0x7f4e2856bcd4 - std::panicking::default_hook::h337047625b381696
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/panicking.rs:288:9
  11:     0x7f4e2b771715 - rustc_driver_impl[f38315262de66e12]::DEFAULT_HOOK::{closure#0}::{closure#0}
  12:     0x7f4e2856c607 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h1ac669e77ecf459f
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/alloc/src/boxed.rs:1999:9
  13:     0x7f4e2856c607 - std::panicking::rust_panic_with_hook::h22ef26cea64ec65c
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/panicking.rs:695:13
  14:     0x7f4e2bc39901 - std[2e06b57a958d7603]::panicking::begin_panic::<rustc_errors[5778b576bff5e43e]::ExplicitBug>::{closure#0}
  15:     0x7f4e2bc392a6 - std[2e06b57a958d7603]::sys_common::backtrace::__rust_end_short_backtrace::<std[2e06b57a958d7603]::panicking::begin_panic<rustc_errors[5778b576bff5e43e]::ExplicitBug>::{closure#0}, !>
  16:     0x7f4e2bc5fca6 - std[2e06b57a958d7603]::panicking::begin_panic::<rustc_errors[5778b576bff5e43e]::ExplicitBug>
  17:     0x7f4e2bc5d114 - <rustc_errors[5778b576bff5e43e]::HandlerInner>::bug::<alloc[3df6c3833cdafa3e]::string::String>
  18:     0x7f4e2bc5ce46 - <rustc_errors[5778b576bff5e43e]::Handler>::bug::<alloc[3df6c3833cdafa3e]::string::String>
  19:     0x7f4e2bce52cc - rustc_middle[9b03ef73197c8750]::util::bug::opt_span_bug_fmt::<rustc_span[e5d9edf586a8e474]::span_encoding::Span>::{closure#0}
  20:     0x7f4e2bce4afa - rustc_middle[9b03ef73197c8750]::ty::context::tls::with_opt::<rustc_middle[9b03ef73197c8750]::util::bug::opt_span_bug_fmt<rustc_span[e5d9edf586a8e474]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  21:     0x7f4e2bce4aca - rustc_middle[9b03ef73197c8750]::ty::context::tls::with_context_opt::<rustc_middle[9b03ef73197c8750]::ty::context::tls::with_opt<rustc_middle[9b03ef73197c8750]::util::bug::opt_span_bug_fmt<rustc_span[e5d9edf586a8e474]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  22:     0x7f4e29e50ccd - rustc_middle[9b03ef73197c8750]::util::bug::bug_fmt
  23:     0x7f4e2c1c9752 - rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty
  24:     0x7f4e2c1d2a4a - <rustc_middle[9b03ef73197c8750]::ty::Ty as rustc_type_ir[2476610ddda7a73]::CollectAndApply<rustc_middle[9b03ef73197c8750]::ty::Ty, rustc_middle[9b03ef73197c8750]::ty::Ty>>::collect_and_apply::<core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::iter::adapters::copied::Copied<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::Ty>>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty::{closure#0}>, <rustc_middle[9b03ef73197c8750]::ty::context::TyCtxt>::mk_tup_from_iter<core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::iter::adapters::copied::Copied<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::Ty>>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty::{closure#0}>, rustc_middle[9b03ef73197c8750]::ty::Ty>::{closure#0}>
  25:     0x7f4e2c1c8f9e - rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty
  26:     0x7f4e2c1dcef6 - <core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::Ty>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty::{closure#2}> as core[351080cb3919538e]::iter::traits::iterator::Iterator>::fold::<(), core[351080cb3919538e]::iter::traits::iterator::Iterator::for_each::call<rustc_middle[9b03ef73197c8750]::ty::Ty, <alloc[3df6c3833cdafa3e]::vec::Vec<rustc_middle[9b03ef73197c8750]::ty::Ty>>::extend_trusted<core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::Ty>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty::{closure#2}>>::{closure#0}>::{closure#0}>
  27:     0x7f4e2c1ce388 - <alloc[3df6c3833cdafa3e]::vec::Vec<rustc_middle[9b03ef73197c8750]::ty::Ty> as alloc[3df6c3833cdafa3e]::vec::spec_from_iter::SpecFromIter<rustc_middle[9b03ef73197c8750]::ty::Ty, core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::Ty>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty::{closure#2}>>>::from_iter
  28:     0x7f4e2c1c9269 - rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty
  29:     0x7f4e2c1c5613 - <&mut rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_substs::{closure#0} as core[351080cb3919538e]::ops::function::FnOnce<(rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg,)>>::call_once
  30:     0x7f4e2c1d4beb - <smallvec[163c2c57480b45e5]::SmallVec<[rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg; 8usize]> as core[351080cb3919538e]::iter::traits::collect::Extend<<[rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg; 8usize] as smallvec[163c2c57480b45e5]::Array>::Item>>::extend::<core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::iter::adapters::copied::Copied<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg>>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_substs::{closure#0}>>
  31:     0x7f4e2c1cf19e - <rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg as rustc_type_ir[2476610ddda7a73]::CollectAndApply<rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg, &rustc_middle[9b03ef73197c8750]::ty::list::List<rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg>>>::collect_and_apply::<core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::iter::adapters::copied::Copied<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg>>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_substs::{closure#0}>, <rustc_middle[9b03ef73197c8750]::ty::context::TyCtxt>::mk_substs_from_iter<core[351080cb3919538e]::iter::adapters::map::Map<core[351080cb3919538e]::iter::adapters::copied::Copied<core[351080cb3919538e]::slice::iter::Iter<rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg>>, rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_substs::{closure#0}>, rustc_middle[9b03ef73197c8750]::ty::subst::GenericArg>::{closure#0}>
  32:     0x7f4e2c1c9170 - rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::transform_ty
  33:     0x7f4e2c1c9f1a - rustc_symbol_mangling[1bf499ff7f75842a]::typeid::typeid_itanium_cxx_abi::typeid_for_fnabi
  34:     0x7f4e29d7059f - <rustc_codegen_llvm[d78081c433bf4e31]::context::CodegenCx as rustc_codegen_ssa[7c934ba332e0ab85]::traits::declare::PreDefineMethods>::predefine_fn
  35:     0x7f4e2ac1a0dd - rustc_codegen_llvm[d78081c433bf4e31]::base::compile_codegen_unit::module_codegen
  36:     0x7f4e2ac18fb0 - rustc_codegen_llvm[d78081c433bf4e31]::base::compile_codegen_unit
  37:     0x7f4e2ae5c416 - rustc_codegen_ssa[7c934ba332e0ab85]::base::codegen_crate::<rustc_codegen_llvm[d78081c433bf4e31]::LlvmCodegenBackend>
  38:     0x7f4e2ae5bce2 - <rustc_codegen_llvm[d78081c433bf4e31]::LlvmCodegenBackend as rustc_codegen_ssa[7c934ba332e0ab85]::traits::backend::CodegenBackend>::codegen_crate
  39:     0x7f4e2a9ff8e0 - rustc_interface[32f66f6c15b482f4]::passes::start_codegen
  40:     0x7f4e2a9facc7 - <rustc_middle[9b03ef73197c8750]::ty::context::GlobalCtxt>::enter::<<rustc_interface[32f66f6c15b482f4]::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core[351080cb3919538e]::result::Result<alloc[3df6c3833cdafa3e]::boxed::Box<dyn core[351080cb3919538e]::any::Any>, rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>>
  41:     0x7f4e2a9fa2a8 - <rustc_interface[32f66f6c15b482f4]::queries::Queries>::ongoing_codegen
  42:     0x7f4e2a9f99e3 - <rustc_interface[32f66f6c15b482f4]::interface::Compiler>::enter::<rustc_driver_impl[f38315262de66e12]::run_compiler::{closure#1}::{closure#2}, core[351080cb3919538e]::result::Result<core[351080cb3919538e]::option::Option<rustc_interface[32f66f6c15b482f4]::queries::Linker>, rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>>
  43:     0x7f4e2a9f714f - std[2e06b57a958d7603]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[32f66f6c15b482f4]::util::run_in_thread_pool_with_globals<rustc_interface[32f66f6c15b482f4]::interface::run_compiler<core[351080cb3919538e]::result::Result<(), rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>, rustc_driver_impl[f38315262de66e12]::run_compiler::{closure#1}>::{closure#0}, core[351080cb3919538e]::result::Result<(), rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[351080cb3919538e]::result::Result<(), rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>>
  44:     0x7f4e2b058a1e - <<std[2e06b57a958d7603]::thread::Builder>::spawn_unchecked_<rustc_interface[32f66f6c15b482f4]::util::run_in_thread_pool_with_globals<rustc_interface[32f66f6c15b482f4]::interface::run_compiler<core[351080cb3919538e]::result::Result<(), rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>, rustc_driver_impl[f38315262de66e12]::run_compiler::{closure#1}>::{closure#0}, core[351080cb3919538e]::result::Result<(), rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[351080cb3919538e]::result::Result<(), rustc_span[e5d9edf586a8e474]::ErrorGuaranteed>>::{closure#1} as core[351080cb3919538e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  45:     0x7f4e28576ad5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::he4e640066a72afb4
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/alloc/src/boxed.rs:1985:9
  46:     0x7f4e28576ad5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6a43b4ec147b3dd9
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/alloc/src/boxed.rs:1985:9
  47:     0x7f4e28576ad5 - std::sys::unix::thread::Thread::new::thread_start::h8c269a865bc351fb
                               at /rustc/6f8c0557e0b73c73a8a7163a15f4a5a3feca7d5c/library/std/src/sys/unix/thread.rs:108:17
  48:     0x7f4e28312bb5 - <unknown>
  49:     0x7f4e28394d90 - <unknown>
  50:                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.71.0-nightly (6f8c0557e 2023-05-04) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z sanitizer=cfi -C lto

query stack during panic:
end of query stack
error: aborting due to previous error; 2 warnings emitted

@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 May 4, 2023
@Jules-Bertholet
Copy link
Contributor

@rustbot label F-type_alias_impl_trait requires-nightly

@rustbot rustbot added F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` requires-nightly This issue requires a nightly compiler in some way. labels May 5, 2023
@matthiaskrgr matthiaskrgr added the PG-exploit-mitigations Project group: Exploit mitigations label May 13, 2023
@rcvalle
Copy link
Member

rcvalle commented Jun 2, 2023

@rustbot claim

@rcvalle
Copy link
Member

rcvalle commented Jun 2, 2023

@matthiaskrgr is this issue still reproducible for you?

@matthiaskrgr
Copy link
Member Author

This was fixed with probably #112182 or #111914 , can't see a crash with master toolchain

@matthiaskrgr
Copy link
Member Author

or wait, looks like there might be a hang now. It no longer ICEs right away, but its now stuck normalizing for 5+ minutes this does not seem right :|

@rcvalle
Copy link
Member

rcvalle commented Jun 2, 2023

Oh, noes. I'll take a look. Also CC'ing @compiler-errors in case they have any idea of what might be causing it.

@compiler-errors
Copy link
Member

Possible that it's a recursive type that's now being uncovered by the normalization added in #112182. If I were you, I'd do some print-debugging of the inputs to transform_ty to make sure it's not being called on itself recursively, and if so, then implement some sort of stop condition or something, 🤷

@rcvalle
Copy link
Member

rcvalle commented Jun 5, 2023

Humm... I just started looking at this today and it isn't reproducible for me with HEAD. Is this still reproducible for you?

@matthiaskrgr
Copy link
Member Author

Yes, still hangs with

rustc cfi.rs  -Zsanitizer=cfi   -Clto  -Ztime-passes
time:   0.000; rss:   50MB ->   53MB (   +3MB)	parse_crate
time:   0.000; rss:   54MB ->   54MB (   +1MB)	setup_global_ctxt
time:   0.000; rss:   55MB ->   56MB (   +1MB)	crate_injection
time:   0.003; rss:   56MB ->   69MB (  +13MB)	expand_crate
time:   0.003; rss:   56MB ->   69MB (  +13MB)	macro_expand_crate
time:   0.000; rss:   69MB ->   70MB (   +0MB)	AST_validation
time:   0.000; rss:   70MB ->   71MB (   +1MB)	finalize_macro_resolutions
time:   0.000; rss:   71MB ->   71MB (   +0MB)	late_resolve_crate
time:   0.000; rss:   71MB ->   71MB (   +0MB)	resolve_postprocess
time:   0.001; rss:   70MB ->   71MB (   +2MB)	resolve_crate
time:   0.000; rss:   71MB ->   71MB (   +0MB)	prepare_outputs
time:   0.000; rss:   72MB ->   72MB (   +0MB)	complete_gated_feature_checking
time:   0.001; rss:   71MB ->   74MB (   +3MB)	looking_for_entry_point
time:   0.000; rss:   74MB ->   74MB (   +0MB)	looking_for_derive_registrar
time:   0.000; rss:   76MB ->   76MB (   +0MB)	unused_lib_feature_checking
time:   0.001; rss:   71MB ->   76MB (   +4MB)	misc_checking_1
time:   0.001; rss:   76MB ->   79MB (   +3MB)	type_collecting
time:   0.000; rss:   79MB ->   79MB (   +0MB)	impl_wf_inference
time:   0.000; rss:   79MB ->   79MB (   +0MB)	coherence_checking
time:   0.001; rss:   79MB ->   81MB (   +2MB)	wf_checking
time:   0.000; rss:   89MB ->   89MB (   +0MB)	SanityCheck
time:   0.000; rss:   89MB ->   89MB (   +0MB)	PromoteTemps
time:   0.004; rss:   81MB ->   92MB (  +12MB)	item_types_checking
time:   0.006; rss:   76MB ->   93MB (  +17MB)	type_check_crate
warning: unused variable: `fun`
  --> cfi.rs:18:18
   |
18 | fn with_positive(fun: impl Fn(Alias<'_>)) {}
   |                  ^^^ help: if this is intentional, prefix it with an underscore: `_fun`
   |
   = note: `#[warn(unused_variables)]` on by default

time:   0.020; rss:   93MB ->   97MB (   +4MB)	MIR_borrow_checking
time:   0.000; rss:   97MB ->   97MB (   +0MB)	ElaborateBoxDerefs
time:   0.001; rss:   97MB ->   98MB (   +1MB)	ConstProp
time:   0.000; rss:   98MB ->   98MB (   +0MB)	ElaborateDrops
time:   0.004; rss:   97MB ->   98MB (   +2MB)	MIR_effect_checking
warning: function `filter_positive` is never used
  --> cfi.rs:14:4
   |
14 | fn filter_positive<'a>() -> Alias<'a> {
   |    ^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

time:   0.000; rss:   99MB ->   99MB (   +0MB)	module_lints
time:   0.001; rss:   99MB ->   99MB (   +0MB)	lint_checking
time:   0.002; rss:   98MB ->   99MB (   +1MB)	misc_checking_3
time:   0.000; rss:   99MB ->  100MB (   +0MB)	monomorphization_collector_root_collections
time:   0.009; rss:  100MB ->  102MB (   +3MB)	monomorphization_collector_graph_walk
time:   0.000; rss:  102MB ->  103MB (   +0MB)	partition_and_assert_distinct_symbols
time:   0.000; rss:  135MB ->  137MB (   +1MB)	write_allocator_module

@Jules-Bertholet
Copy link
Contributor

@rustbot label A-sanitizers

@rustbot rustbot added the A-sanitizers Area: Sanitizers for correctness and code quality. label Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sanitizers Area: Sanitizers for correctness and code quality. C-bug Category: This is a bug. F-type_alias_impl_trait `#[feature(type_alias_impl_trait)]` I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ PG-exploit-mitigations Project group: Exploit mitigations requires-nightly This issue requires a nightly compiler in some way. 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

5 participants