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

crash: checking hyper with borrowck-migrate #52992

Closed
matthiaskrgr opened this issue Aug 2, 2018 · 5 comments · Fixed by #53580
Closed

crash: checking hyper with borrowck-migrate #52992

matthiaskrgr opened this issue Aug 2, 2018 · 5 comments · Fixed by #53580
Assignees
Labels
A-NLL Area: Non-lexical lifetimes (NLL) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ NLL-complete Working towards the "valid code works" goal P-high High priority
Milestone

Comments

@matthiaskrgr
Copy link
Member

matthiaskrgr commented Aug 2, 2018

git clone https://github.com/hyperium/hyper
cd hyper
git checkout v0.11.27
RUSTFLAGS="-Zborrowck=migrate" cargo check -j1

       Fresh nodrop v0.1.12
       Fresh cfg-if v0.1.4
       Fresh libc v0.2.42
       Fresh lazy_static v1.0.2
       Fresh scopeguard v0.3.3
       Fresh byteorder v1.2.4
       Fresh memoffset v0.2.1
       Fresh slab v0.4.0
       Fresh futures v0.1.23
       Fresh lazycell v0.6.0
       Fresh version_check v0.1.4
       Fresh scoped-tls v0.1.2
       Fresh smallvec v0.2.1
       Fresh safemem v0.2.0
       Fresh slab v0.3.0
       Fresh try-lock v0.1.0
       Fresh take v0.1.0
       Fresh language-tags v0.2.2
       Fresh percent-encoding v1.0.1
       Fresh arrayvec v0.4.7
       Fresh crossbeam-utils v0.3.2
       Fresh log v0.4.3
       Fresh iovec v0.1.2
       Fresh net2 v0.2.33
       Fresh rand v0.4.2
       Fresh num_cpus v1.8.0
       Fresh time v0.1.40
       Fresh tokio-executor v0.1.2
       Fresh tokio-service v0.1.0
       Fresh relay v0.1.1
       Fresh base64 v0.9.2
       Fresh crossbeam-epoch v0.4.3
       Fresh log v0.3.9
       Fresh want v0.0.4
       Fresh bytes v0.4.9
       Fresh mio v0.6.15
       Fresh rand v0.3.22
       Fresh futures-cpupool v0.1.8
       Fresh tokio-timer v0.2.4
       Fresh httparse v1.3.2
       Fresh crossbeam-deque v0.3.1
       Fresh tokio-io v0.1.7
       Fresh unicase v2.1.0
       Fresh tokio-threadpool v0.1.5
       Fresh tokio-reactor v0.1.2
       Fresh tokio-codec v0.1.0
       Fresh mime v0.3.8
       Fresh tokio-fs v0.1.2
       Fresh tokio-tcp v0.1.0
       Fresh tokio-udp v0.1.1
       Fresh tokio v0.1.7
       Fresh tokio-core v0.1.17
       Fresh tokio-proto v0.1.1
    Checking hyper v0.11.27 (file:///tmp/hyper)
     Running `rustc --crate-name hyper src/lib.rs --crate-type lib --emit=dep-info,metadata -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="server-proto"' --cfg 'feature="tokio-proto"' -C metadata=465f7886ca4a40ca -C extra-filename=-465f7886ca4a40ca --out-dir /tmp/hyper/target/debug/deps -C incremental=/tmp/hyper/target/debug/incremental -L dependency=/tmp/hyper/target/debug/deps --extern base64=/tmp/hyper/target/debug/deps/libbase64-7f888070408e9584.rmeta --extern bytes=/tmp/hyper/target/debug/deps/libbytes-926f4be38b0ef49a.rmeta --extern futures=/tmp/hyper/target/debug/deps/libfutures-3e034e8c4fadab05.rmeta --extern futures_cpupool=/tmp/hyper/target/debug/deps/libfutures_cpupool-3f3a8918cddf229d.rmeta --extern httparse=/tmp/hyper/target/debug/deps/libhttparse-7fa16ff1de6399dc.rmeta --extern iovec=/tmp/hyper/target/debug/deps/libiovec-10dda303b566010f.rmeta --extern language_tags=/tmp/hyper/target/debug/deps/liblanguage_tags-fedadc717cc3771f.rmeta --extern log=/tmp/hyper/target/debug/deps/liblog-81cb68337885c10e.rmeta --extern mime=/tmp/hyper/target/debug/deps/libmime-e6896d1a95033795.rmeta --extern net2=/tmp/hyper/target/debug/deps/libnet2-ab600f3287d3dca8.rmeta --extern percent_encoding=/tmp/hyper/target/debug/deps/libpercent_encoding-0c7a64ed7c39bd90.rmeta --extern relay=/tmp/hyper/target/debug/deps/librelay-8fa98676479e7181.rmeta --extern time=/tmp/hyper/target/debug/deps/libtime-98f6d9e519834157.rmeta --extern tokio_core=/tmp/hyper/target/debug/deps/libtokio_core-825ab810c0bbc020.rmeta --extern tokio_io=/tmp/hyper/target/debug/deps/libtokio_io-25fbcf6adf05ccf3.rmeta --extern tokio_proto=/tmp/hyper/target/debug/deps/libtokio_proto-22632b982b7a70d1.rmeta --extern tokio_service=/tmp/hyper/target/debug/deps/libtokio_service-bcd12f7a5bd6b195.rmeta --extern unicase=/tmp/hyper/target/debug/deps/libunicase-8cddf57e734c9821.rmeta --extern want=/tmp/hyper/target/debug/deps/libwant-fc7ca82b1f72e647.rmeta -Zborrowck=migrate`
thread 'main' panicked at 'scrape_region_constraints: incoming region obligations = [
    (
        NodeId(
            4242
        ),
        RegionObligation(sub_region=ReStatic, sup_type=B)
    )
]', librustc/traits/query/type_op/custom.rs:85:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: rustc::util::common::panic_hook
   5: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:479
   6: std::panicking::continue_panic_fmt
             at libstd/panicking.rs:390
   7: std::panicking::begin_panic_fmt
             at libstd/panicking.rs:345
   8: <rustc::traits::query::type_op::custom::CustomTypeOp<F, G> as rustc::traits::query::type_op::TypeOp<'gcx, 'tcx>>::fully_perform
   9: rustc_mir::borrow_check::nll::type_check::type_check
  10: rustc_mir::borrow_check::nll::compute_regions
  11: rustc_mir::borrow_check::do_mir_borrowck
  12: rustc::ty::context::tls::with_related_context
  13: rustc::infer::InferCtxtBuilder::enter
  14: rustc_mir::borrow_check::mir_borrowck
  15: rustc::ty::query::__query_compute::mir_borrowck
  16: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_borrowck<'tcx>>::compute
  17: rustc::ty::context::tls::with_context
  18: rustc::dep_graph::graph::DepGraph::with_task_impl
  19: rustc::ty::context::tls::with_related_context
  20: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  21: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  22: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_borrowck
  23: rustc_mir::borrow_check::nll::type_check::TypeChecker::check_stmt
  24: rustc_mir::borrow_check::nll::type_check::TypeChecker::typeck_mir
  25: rustc_mir::borrow_check::nll::type_check::type_check
  26: rustc_mir::borrow_check::nll::compute_regions
  27: rustc_mir::borrow_check::do_mir_borrowck
  28: rustc::ty::context::tls::with_related_context
  29: rustc::infer::InferCtxtBuilder::enter
  30: rustc_mir::borrow_check::mir_borrowck
  31: rustc::ty::query::__query_compute::mir_borrowck
  32: rustc::ty::query::<impl rustc::ty::query::config::QueryAccessors<'tcx> for rustc::ty::query::queries::mir_borrowck<'tcx>>::compute
  33: rustc::ty::context::tls::with_context
  34: rustc::dep_graph::graph::DepGraph::with_task_impl
  35: rustc::ty::context::tls::with_related_context
  36: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::force_query_with_job
  37: rustc::ty::query::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::get_query
  38: rustc::ty::query::<impl rustc::ty::context::TyCtxt<'a, 'tcx, 'lcx>>::mir_borrowck
  39: rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::par_body_owners
  40: rustc::util::common::time
  41: rustc::ty::context::tls::enter_context
  42: <std::thread::local::LocalKey<T>>::with
  43: rustc::ty::context::TyCtxt::create_and_enter
  44: rustc_driver::driver::compile_input
  45: rustc_driver::run_compiler_with_pool
  46: <scoped_tls::ScopedKey<T>>::set
  47: <scoped_tls::ScopedKey<T>>::set
  48: syntax::with_globals
  49: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
  50: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  51: rustc_driver::run
  52: rustc_driver::main
  53: std::rt::lang_start::{{closure}}
  54: std::panicking::try::do_call
             at libstd/rt.rs:59
             at libstd/panicking.rs:310
  55: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  56: std::rt::lang_start_internal
             at libstd/panicking.rs:289
             at libstd/panic.rs:392
             at libstd/rt.rs:58
  57: main
  58: __libc_start_main
  59: <unknown>
query stack during panic:
#0 [mir_borrowck] processing `<client::Client<C, B>>::send_request::{{closure}}`
#1 [mir_borrowck] processing `<client::Client<C, B>>::send_request`
end of query stack
error: internal compiler error: unexpected panic
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.29.0-nightly (97085f9fb 2018-08-01) running on x86_64-unknown-linux-gnu
note: compiler flags: -Z borrowck=migrate -C debuginfo=2 -C incremental --crate-type lib
note: some of the compiler flags provided by cargo are hidden
error: Could not compile `hyper`.
Caused by:
  process didn't exit successfully: `rustc --crate-name hyper src/lib.rs --crate-type lib --emit=dep-info,metadata -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="server-proto"' --cfg 'feature="tokio-proto"' -C metadata=465f7886ca4a40ca -C extra-filename=-465f7886ca4a40ca --out-dir /tmp/hyper/target/debug/deps -C incremental=/tmp/hyper/target/debug/incremental -L dependency=/tmp/hyper/target/debug/deps --extern base64=/tmp/hyper/target/debug/deps/libbase64-7f888070408e9584.rmeta --extern bytes=/tmp/hyper/target/debug/deps/libbytes-926f4be38b0ef49a.rmeta --extern futures=/tmp/hyper/target/debug/deps/libfutures-3e034e8c4fadab05.rmeta --extern futures_cpupool=/tmp/hyper/target/debug/deps/libfutures_cpupool-3f3a8918cddf229d.rmeta --extern httparse=/tmp/hyper/target/debug/deps/libhttparse-7fa16ff1de6399dc.rmeta --extern iovec=/tmp/hyper/target/debug/deps/libiovec-10dda303b566010f.rmeta --extern language_tags=/tmp/hyper/target/debug/deps/liblanguage_tags-fedadc717cc3771f.rmeta --extern log=/tmp/hyper/target/debug/deps/liblog-81cb68337885c10e.rmeta --extern mime=/tmp/hyper/target/debug/deps/libmime-e6896d1a95033795.rmeta --extern net2=/tmp/hyper/target/debug/deps/libnet2-ab600f3287d3dca8.rmeta --extern percent_encoding=/tmp/hyper/target/debug/deps/libpercent_encoding-0c7a64ed7c39bd90.rmeta --extern relay=/tmp/hyper/target/debug/deps/librelay-8fa98676479e7181.rmeta --extern time=/tmp/hyper/target/debug/deps/libtime-98f6d9e519834157.rmeta --extern tokio_core=/tmp/hyper/target/debug/deps/libtokio_core-825ab810c0bbc020.rmeta --extern tokio_io=/tmp/hyper/target/debug/deps/libtokio_io-25fbcf6adf05ccf3.rmeta --extern tokio_proto=/tmp/hyper/target/debug/deps/libtokio_proto-22632b982b7a70d1.rmeta
--extern tokio_service=/tmp/hyper/target/debug/deps/libtokio_service-bcd12f7a5bd6b195.rmeta --extern unicase=/tmp/hyper/target/debug/deps/libunicase-8cddf57e734c9821.rmeta --extern want=/tmp/hyper/target/debug/deps/libwant-fc7ca82b1f72e647.rmeta -Zborrowck=migrate` (exit code: 101)

rustc 1.29.0-nightly (97085f9fb 2018-08-01)

@pnkfelix pnkfelix added A-NLL Area: Non-lexical lifetimes (NLL) WG-compiler-nll I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ P-high High priority labels Aug 2, 2018
@klemens
Copy link

klemens commented Aug 5, 2018

I get (probably) the same ICE with the following code using itertools 0.7.8:

#![feature(nll)]

extern crate itertools;
use itertools::Itertools;

fn main() {
    vec![0]
        .into_iter()
        .group_by(|_| 0)
        .into_iter()
        .map(|_| 0);
}

The ICE happens on the first closure (the group_by one) with an identical backtrace and it does not crash without the map.

thread 'main' panicked at 'scrape_region_constraints: incoming region obligations = [
    (
        NodeId(
            23
        ),
        RegionObligation(sub_region='_#1r, sup_type=i32)
    )
]', librustc/traits/query/type_op/custom.rs:85:5
[…]
note: rustc 1.30.0-nightly (3edb355b7 2018-08-03) running on x86_64-unknown-linux-gnu
note: compiler flags: -C debuginfo=2 -C incremental --crate-type bin

@passy
Copy link

passy commented Aug 5, 2018

You beat me to the report. I ran into the same issue with group_by() and was trying to minimize the test case.

@klemens
Copy link

klemens commented Aug 5, 2018

I tried to reduce this some more (especially removing itertools). This is the smallest example that I could come up with that still reproduces the ICE:

#![feature(nll)]

fn main() {
    S1 {}
        .into_iter()
        .map(|_| ());
}

pub struct S1 {}

pub struct S2<'a>
{
    phantom: &'a (),
}

pub struct S3<'a, I: 'a>
    where I: Iterator,
          I::Item: 'a,
{
    it: &'a I,
}

impl<'a> IntoIterator for &'a S1
{
    type Item = S3<'a, std::iter::Empty<()>>;
    type IntoIter = S2<'a>;

    fn into_iter(self) -> Self::IntoIter {
        S2 { phantom: &() }
    }
}

impl<'a> Iterator for S2<'a>
{
    type Item = S3<'a, std::iter::Empty<()>>;

    fn next(&mut self) -> Option<Self::Item> {
        None
    }
}

playground

@klemens
Copy link

klemens commented Aug 6, 2018

And another round of minification, removing any dependency on std/core and two levels of structs. I guess it won't become much smaller:

#![feature(nll)]

fn main() {}

fn fail<'a>() -> Struct<'a, Generic<()>> {
    Struct(&Generic(()))
}

struct Struct<'a, T>(&'a T) where
    T: Trait + 'a,
    T::AT: 'a; // only fails with this bound

struct Generic<T>(T);

trait Trait {
    type AT;
}

impl<T> Trait for Generic<T> {
    type AT = T; // only fails with a generic AT
}

playground

@nikomatsakis
Copy link
Contributor

Fix in #53580

nikomatsakis added a commit to nikomatsakis/rust that referenced this issue Aug 23, 2018
bors added a commit that referenced this issue Aug 27, 2018
fix NLL ICEs

Custom type-ops reuse some of the query machinery -- but while query results are canonicalized after they are constructed, custom type ops are not, and hence we have to resolve the type variables to avoid an ICE here.

Also, use the type-op machinery for implied outlives bounds.

Fixes #53568
Fixes #52992
Fixes #53680
JohnTitor referenced this issue in JohnTitor/rust Mar 6, 2021
…nkov

Move some tests to more suitable subdirs

## The results from classifui

(The full results can be found here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427)

- [lint-expr-stmt-attrs-for-early-lints.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/lint-expr-stmt-attrs-for-early-lints.rs) <sup>unknown</sup>: lint (1.566), feature-gates (-0.632), numbers-arithmetic (-0.955)
- [try-block.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/try-block.rs) <sup>unknown</sup>: binding (1.385), try-block (-0.097), lint (-0.932)
- [backtrace-debuginfo.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/backtrace-debuginfo.rs) <sup>unknown</sup>: macros (1.365), cfg (-0.279), drop (-0.291)
- [issues/issue-3521.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3521.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/3521)</sup>: consts (1.298), enum (-0.872), in-band-lifetimes (-0.978)
- [impl-bounds-checking.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-bounds-checking.rs) <sup>unknown</sup>: traits (1.243), for (-0.999), shadowed (-0.999)
- [issues/issue-17718.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17718.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/17718)</sup>: binding (1.236), consts (0.315), extern (-0.779)
- [issue-6157.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-6157.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/6157)</sup>: regions (1.213), unboxed-closures (-0.285), traits (-0.510)
- [issues/issue-44373.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-44373.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/44373)</sup>: consts (1.187), nll (0.427), borrowck (-0.704)
- [nullable-pointer-ffi-compat.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/nullable-pointer-ffi-compat.rs) <sup>unknown</sup>: regions (1.184), consts (0.650), traits (-0.571)
- [issues/issue-52992.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52992.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52992)</sup>: nll (1.132), associated-types (-0.628), parser (-0.893)
- [issues/issue-2330.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2330.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2330)</sup>: traits (1.116), directory_ownership (-0.691), compare-method (-0.981)
- [issue-74047.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-74047.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/74047)</sup>: async-await (1.109), impl-trait (-0.629), resolve (-0.781)
- [issues/issue-33140.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/33140)</sup>: traits (1.063), coherence (-0.832), codemap_tests (-0.944)
- [issues/issue-28576.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-28576.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/28576)</sup>: traits (1.062), associated-types (-0.333), impl-trait (-0.697)
- [issues/issue-7222.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7222.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/7222)</sup>: binding (1.062), consts (-0.226), numbers-arithmetic (-0.294)
- [tup.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/tup.rs) <sup>unknown</sup>: structs-enums (1.061), threads-sendsync (-0.550), moves (-0.790)
- [issues/issue-15261.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-15261.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/15261)</sup>: consts (1.052), where-clauses (-0.833), macros (-0.862)
- [issues/issue-76179.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-76179.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/76179)</sup>: associated-types (1.048), process (-0.887), rfc-2457 (-0.984)
- [issues/issue-42344.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-42344.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/42344)</sup>: borrowck (1.043), macros (-0.481), specialization (-0.966)
- [issues/issue-18661.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18661.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/18661)</sup>: unboxed-closures (1.038), mir (-0.648), higher-rank-trait-bounds (-0.688)
- [issues/issue-2633.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2633.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2633)</sup>: structs-enums (1.020), functions-closures (-0.722), lint (-0.967)

Some notes:
- If there are related tests (e.g. it's for the same issue), they are moved along with it.
- Moved try-block.rs to the `try-block` dir.
- Moved tup.rs to the `tuple` dir.
- Moved some tests that classified as consts to the `statics` dir, as it seems they have statics actually.
- Skipped backtrace-debuginfo.rs because I think classifui overrates their helper macros.

cc rust-lang#73494
r? `@petrochenkov`
m-ou-se referenced this issue in m-ou-se/rust Mar 6, 2021
…nkov

Move some tests to more suitable subdirs

## The results from classifui

(The full results can be found here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427)

- [lint-expr-stmt-attrs-for-early-lints.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/lint-expr-stmt-attrs-for-early-lints.rs) <sup>unknown</sup>: lint (1.566), feature-gates (-0.632), numbers-arithmetic (-0.955)
- [try-block.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/try-block.rs) <sup>unknown</sup>: binding (1.385), try-block (-0.097), lint (-0.932)
- [backtrace-debuginfo.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/backtrace-debuginfo.rs) <sup>unknown</sup>: macros (1.365), cfg (-0.279), drop (-0.291)
- [issues/issue-3521.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3521.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/3521)</sup>: consts (1.298), enum (-0.872), in-band-lifetimes (-0.978)
- [impl-bounds-checking.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-bounds-checking.rs) <sup>unknown</sup>: traits (1.243), for (-0.999), shadowed (-0.999)
- [issues/issue-17718.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17718.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/17718)</sup>: binding (1.236), consts (0.315), extern (-0.779)
- [issue-6157.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-6157.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/6157)</sup>: regions (1.213), unboxed-closures (-0.285), traits (-0.510)
- [issues/issue-44373.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-44373.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/44373)</sup>: consts (1.187), nll (0.427), borrowck (-0.704)
- [nullable-pointer-ffi-compat.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/nullable-pointer-ffi-compat.rs) <sup>unknown</sup>: regions (1.184), consts (0.650), traits (-0.571)
- [issues/issue-52992.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52992.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52992)</sup>: nll (1.132), associated-types (-0.628), parser (-0.893)
- [issues/issue-2330.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2330.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2330)</sup>: traits (1.116), directory_ownership (-0.691), compare-method (-0.981)
- [issue-74047.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-74047.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/74047)</sup>: async-await (1.109), impl-trait (-0.629), resolve (-0.781)
- [issues/issue-33140.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/33140)</sup>: traits (1.063), coherence (-0.832), codemap_tests (-0.944)
- [issues/issue-28576.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-28576.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/28576)</sup>: traits (1.062), associated-types (-0.333), impl-trait (-0.697)
- [issues/issue-7222.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7222.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/7222)</sup>: binding (1.062), consts (-0.226), numbers-arithmetic (-0.294)
- [tup.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/tup.rs) <sup>unknown</sup>: structs-enums (1.061), threads-sendsync (-0.550), moves (-0.790)
- [issues/issue-15261.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-15261.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/15261)</sup>: consts (1.052), where-clauses (-0.833), macros (-0.862)
- [issues/issue-76179.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-76179.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/76179)</sup>: associated-types (1.048), process (-0.887), rfc-2457 (-0.984)
- [issues/issue-42344.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-42344.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/42344)</sup>: borrowck (1.043), macros (-0.481), specialization (-0.966)
- [issues/issue-18661.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18661.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/18661)</sup>: unboxed-closures (1.038), mir (-0.648), higher-rank-trait-bounds (-0.688)
- [issues/issue-2633.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2633.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2633)</sup>: structs-enums (1.020), functions-closures (-0.722), lint (-0.967)

Some notes:
- If there are related tests (e.g. it's for the same issue), they are moved along with it.
- Moved try-block.rs to the `try-block` dir.
- Moved tup.rs to the `tuple` dir.
- Moved some tests that classified as consts to the `statics` dir, as it seems they have statics actually.
- Skipped backtrace-debuginfo.rs because I think classifui overrates their helper macros.

cc rust-lang#73494
r? ``@petrochenkov``
JohnTitor referenced this issue in JohnTitor/rust Mar 7, 2021
…nkov

Move some tests to more suitable subdirs

## The results from classifui

(The full results can be found here: https://gist.github.com/JohnTitor/c9e00840990b5e4a8fc562ec3571e427)

- [lint-expr-stmt-attrs-for-early-lints.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/lint-expr-stmt-attrs-for-early-lints.rs) <sup>unknown</sup>: lint (1.566), feature-gates (-0.632), numbers-arithmetic (-0.955)
- [try-block.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/try-block.rs) <sup>unknown</sup>: binding (1.385), try-block (-0.097), lint (-0.932)
- [backtrace-debuginfo.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/backtrace-debuginfo.rs) <sup>unknown</sup>: macros (1.365), cfg (-0.279), drop (-0.291)
- [issues/issue-3521.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3521.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/3521)</sup>: consts (1.298), enum (-0.872), in-band-lifetimes (-0.978)
- [impl-bounds-checking.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/impl-bounds-checking.rs) <sup>unknown</sup>: traits (1.243), for (-0.999), shadowed (-0.999)
- [issues/issue-17718.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17718.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/17718)</sup>: binding (1.236), consts (0.315), extern (-0.779)
- [issue-6157.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-6157.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/6157)</sup>: regions (1.213), unboxed-closures (-0.285), traits (-0.510)
- [issues/issue-44373.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-44373.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/44373)</sup>: consts (1.187), nll (0.427), borrowck (-0.704)
- [nullable-pointer-ffi-compat.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/nullable-pointer-ffi-compat.rs) <sup>unknown</sup>: regions (1.184), consts (0.650), traits (-0.571)
- [issues/issue-52992.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-52992.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/52992)</sup>: nll (1.132), associated-types (-0.628), parser (-0.893)
- [issues/issue-2330.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2330.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2330)</sup>: traits (1.116), directory_ownership (-0.691), compare-method (-0.981)
- [issue-74047.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issue-74047.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/74047)</sup>: async-await (1.109), impl-trait (-0.629), resolve (-0.781)
- [issues/issue-33140.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/33140)</sup>: traits (1.063), coherence (-0.832), codemap_tests (-0.944)
- [issues/issue-28576.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-28576.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/28576)</sup>: traits (1.062), associated-types (-0.333), impl-trait (-0.697)
- [issues/issue-7222.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7222.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/7222)</sup>: binding (1.062), consts (-0.226), numbers-arithmetic (-0.294)
- [tup.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/tup.rs) <sup>unknown</sup>: structs-enums (1.061), threads-sendsync (-0.550), moves (-0.790)
- [issues/issue-15261.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-15261.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/15261)</sup>: consts (1.052), where-clauses (-0.833), macros (-0.862)
- [issues/issue-76179.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-76179.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/76179)</sup>: associated-types (1.048), process (-0.887), rfc-2457 (-0.984)
- [issues/issue-42344.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-42344.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/42344)</sup>: borrowck (1.043), macros (-0.481), specialization (-0.966)
- [issues/issue-18661.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18661.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/18661)</sup>: unboxed-closures (1.038), mir (-0.648), higher-rank-trait-bounds (-0.688)
- [issues/issue-2633.rs](https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2633.rs) <sup>[issue](https://github.com/rust-lang/rust/issues/2633)</sup>: structs-enums (1.020), functions-closures (-0.722), lint (-0.967)

Some notes:
- If there are related tests (e.g. it's for the same issue), they are moved along with it.
- Moved try-block.rs to the `try-block` dir.
- Moved tup.rs to the `tuple` dir.
- Moved some tests that classified as consts to the `statics` dir, as it seems they have statics actually.
- Skipped backtrace-debuginfo.rs because I think classifui overrates their helper macros.

cc rust-lang#73494
r? ```@petrochenkov```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-NLL Area: Non-lexical lifetimes (NLL) I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ NLL-complete Working towards the "valid code works" goal P-high High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants