Skip to content

[EXPERIMENT] Use path-sensitive approach to implement lint exported_private_dependencies#159514

Closed
mu001999 wants to merge 3 commits into
rust-lang:mainfrom
mu001999-contrib:exper/exported_private_dependencies
Closed

[EXPERIMENT] Use path-sensitive approach to implement lint exported_private_dependencies#159514
mu001999 wants to merge 3 commits into
rust-lang:mainfrom
mu001999-contrib:exper/exported_private_dependencies

Conversation

@mu001999

@mu001999 mu001999 commented Jul 18, 2026

Copy link
Copy Markdown
Member

The current implementation is entirely written by AI, and I provide the implementation plan and boundaries to consider.

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output. labels Jul 18, 2026
@mu001999

mu001999 commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

This PR will not be merged and is only used for the experimentation tries to fix #119428.

(Comment separately because I found having this in the PR description would trigger GitHub's Development)

@rust-log-analyzer

This comment has been minimized.

@mu001999
mu001999 force-pushed the exper/exported_private_dependencies branch from 4753c25 to f0d611c Compare July 19, 2026 02:49
@mu001999 mu001999 added the S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. label Jul 19, 2026
@rust-log-analyzer

This comment has been minimized.

@mu001999
mu001999 force-pushed the exper/exported_private_dependencies branch from f0d611c to 983766c Compare July 19, 2026 03:08
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-miri failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

thread 'rustc' (16252) panicked at compiler/rustc_resolve/src/imports.rs:1239:25:
Box<dyn Any>
stack backtrace:
   0:     0x7f330a5dee81 - <<std[230c7218466d7ceb]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[8ec35bcd8078f253]::fmt::Display>::fmt
   1:     0x7f330a62235a - core[8ec35bcd8078f253]::fmt::write
   2:     0x7f330a5f0fbc - <std[230c7218466d7ceb]::sys::stdio::unix::Stderr as std[230c7218466d7ceb]::io::Write>::write_fmt
   3:     0x7f330a5aac06 - std[230c7218466d7ceb]::panicking::default_hook::{closure#0}
   4:     0x7f330a5cf311 - std[230c7218466d7ceb]::panicking::default_hook
   5:     0x7f3305b10026 - std[230c7218466d7ceb]::panicking::update_hook::<alloc[20281b059bda2f70]::boxed::Box<rustc_driver_impl[22be8793bfdb3aa]::install_ice_hook::{closure#1}>>::{closure#0}
   6:     0x7f330a5cf672 - std[230c7218466d7ceb]::panicking::panic_with_hook
   7:     0x7f330a231db3 - std[230c7218466d7ceb]::panicking::begin_panic::<rustc_errors[2e5624551d22b53f]::ExplicitBug>::{closure#0}
   8:     0x7f330a22ee36 - std[230c7218466d7ceb]::sys::backtrace::__rust_end_short_backtrace::<std[230c7218466d7ceb]::panicking::begin_panic<rustc_errors[2e5624551d22b53f]::ExplicitBug>::{closure#0}, !>
   9:     0x7f330a22d89e - std[230c7218466d7ceb]::panicking::begin_panic::<rustc_errors[2e5624551d22b53f]::ExplicitBug>
  10:     0x7f330a229d32 - <rustc_errors[2e5624551d22b53f]::diagnostic::BugAbort as rustc_errors[2e5624551d22b53f]::diagnostic::EmissionGuarantee>::emit_producing_guarantee
  11:     0x7f3309bb79b0 - <rustc_errors[2e5624551d22b53f]::DiagCtxtHandle>::span_bug::<rustc_span[c6285356db279219]::span_encoding::Span, alloc[20281b059bda2f70]::string::String>
  12:     0x7f3309d6235d - rustc_middle[7ef0854f5b936038]::util::bug::opt_span_bug_fmt::<rustc_span[c6285356db279219]::span_encoding::Span>::{closure#0}
  13:     0x7f3309d623c8 - rustc_middle[7ef0854f5b936038]::ty::context::tls::with_opt::<rustc_middle[7ef0854f5b936038]::util::bug::opt_span_bug_fmt<rustc_span[c6285356db279219]::span_encoding::Span>::{closure#0}, !>::{closure#0}
  14:     0x7f3309d5d546 - rustc_middle[7ef0854f5b936038]::ty::context::tls::with_context_opt::<rustc_middle[7ef0854f5b936038]::ty::context::tls::with_opt<rustc_middle[7ef0854f5b936038]::util::bug::opt_span_bug_fmt<rustc_span[c6285356db279219]::span_encoding::Span>::{closure#0}, !>::{closure#0}, !>
  15:     0x7f3309d5d51a - rustc_middle[7ef0854f5b936038]::util::bug::span_bug_fmt::<rustc_span[c6285356db279219]::span_encoding::Span>
  16:     0x7f3307b231f6 - <rustc_resolve[14ddb1044445307a]::Resolver>::finalize_import
  17:     0x7f3307b25d0c - <rustc_resolve[14ddb1044445307a]::Resolver>::finalize_imports
  18:     0x7f3307c205cb - <rustc_session[319181dd6ebe217d]::session::Session>::time::<(), <rustc_resolve[14ddb1044445307a]::Resolver>::resolve_crate::{closure#0}>
  19:     0x7f3307b41089 - <rustc_resolve[14ddb1044445307a]::Resolver>::resolve_crate
  20:     0x7f3305d58e78 - rustc_interface[7437a44b981bbd38]::passes::resolver_for_lowering_raw
  21:     0x7f33084b3ca1 - rustc_query_impl[dacc5976b1b5b7b3]::query_impl::resolver_for_lowering_raw::invoke_provider_fn::__rust_begin_short_backtrace
  22:     0x7f33081d4fb9 - rustc_query_impl[dacc5976b1b5b7b3]::execution::try_execute_query::<rustc_middle[7ef0854f5b936038]::query::caches::SingleCache<rustc_middle[7ef0854f5b936038]::query::erase::ErasedData<[u8; 24usize]>>, false>
  23:     0x7f330850f4d8 - rustc_query_impl[dacc5976b1b5b7b3]::query_impl::resolver_for_lowering_raw::execute_query_non_incr::__rust_end_short_backtrace
  24:     0x7f3309b5a869 - <rustc_middle[7ef0854f5b936038]::ty::context::TyCtxt>::resolver_for_lowering
  25:     0x7f3305b35d80 - <std[230c7218466d7ceb]::thread::local::LocalKey<core[8ec35bcd8078f253]::cell::Cell<*const ()>>>::with::<rustc_middle[7ef0854f5b936038]::ty::context::tls::enter_context<<rustc_middle[7ef0854f5b936038]::ty::context::GlobalCtxt>::enter<rustc_interface[7437a44b981bbd38]::passes::create_and_enter_global_ctxt<core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>, rustc_driver_impl[22be8793bfdb3aa]::run_compiler::{closure#0}::{closure#2}>::{closure#2}, core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>>::{closure#1}, core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>>::{closure#0}, core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>>
  26:     0x7f3305a41093 - <rustc_middle[7ef0854f5b936038]::ty::context::TyCtxt>::create_global_ctxt::<core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>, rustc_interface[7437a44b981bbd38]::passes::create_and_enter_global_ctxt<core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>, rustc_driver_impl[22be8793bfdb3aa]::run_compiler::{closure#0}::{closure#2}>::{closure#2}>
  27:     0x7f3305ab630c - rustc_interface[7437a44b981bbd38]::passes::create_and_enter_global_ctxt::<core[8ec35bcd8078f253]::option::Option<rustc_interface[7437a44b981bbd38]::queries::Linker>, rustc_driver_impl[22be8793bfdb3aa]::run_compiler::{closure#0}::{closure#2}>
  28:     0x7f3305a9dade - rustc_span[c6285356db279219]::create_session_globals_then::<(), rustc_interface[7437a44b981bbd38]::util::run_in_thread_with_globals<rustc_interface[7437a44b981bbd38]::util::run_in_thread_pool_with_globals<rustc_interface[7437a44b981bbd38]::interface::run_compiler<(), rustc_driver_impl[22be8793bfdb3aa]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}::{closure#0}>
  29:     0x7f3305b0eab8 - std[230c7218466d7ceb]::sys::backtrace::__rust_begin_short_backtrace::<rustc_interface[7437a44b981bbd38]::util::run_in_thread_with_globals<rustc_interface[7437a44b981bbd38]::util::run_in_thread_pool_with_globals<rustc_interface[7437a44b981bbd38]::interface::run_compiler<(), rustc_driver_impl[22be8793bfdb3aa]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
  30:     0x7f3305af43d3 - <std[230c7218466d7ceb]::thread::lifecycle::spawn_unchecked<rustc_interface[7437a44b981bbd38]::util::run_in_thread_with_globals<rustc_interface[7437a44b981bbd38]::util::run_in_thread_pool_with_globals<rustc_interface[7437a44b981bbd38]::interface::run_compiler<(), rustc_driver_impl[22be8793bfdb3aa]::run_compiler::{closure#0}>::{closure#2}, ()>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[8ec35bcd8078f253]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  31:     0x7f330a5db3ef - <std[230c7218466d7ceb]::sys::thread::unix::Thread>::new::thread_start
  32:     0x7f3303a8aaa4 - <unknown>
  33:     0x7f3303b17c6c - <unknown>
  34:                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: please make sure that you have updated to the latest nightly

note: please attach the file at `/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_locale-2.2.0/rustc-ice-2026-07-19T03_22_40-16250.txt` to your bug report

note: rustc 1.99.0-nightly (b9f5472da 2026-07-19) running on x86_64-unknown-linux-gnu

note: compiler flags: --crate-type lib -C opt-level=3 -C embed-bitcode=no -C debug-assertions=on -C symbol-mangling-version=v0 -Z annotate-moves -Z unstable-options -Z macro-backtrace -C split-debuginfo=off -C link-args=-Wl,-z,origin -C link-args=-Wl,-rpath,$ORIGIN/../lib -Z on-broken-pipe=kill -Z binary-dep-depinfo -Z tls-model=initial-exec -Z force-unstable-if-unmarked

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [resolver_for_lowering_raw] getting the resolver for lowering
end of query stack
[RUSTC-TIMING] icu_locale test:false 0.118
error: could not compile `icu_locale` (lib)

Caused by:
  process didn't exit successfully: `/checkout/obj/build/bootstrap/debug/rustc /checkout/obj/build/bootstrap/debug/rustc --crate-name icu_locale --edition=2021 /cargo/registry/src/index.crates.io-1949cf8c6b5b557f/icu_locale-2.2.0/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C opt-level=3 -C embed-bitcode=no '--warn=clippy::wildcard_dependencies' '--warn=clippy::useless_transmute' --warn=unused_qualifications --warn=unused_macro_rules --warn=unused_lifetimes '--warn=clippy::unnecessary-wraps' --warn=unexpected_cfgs '--deny=clippy::trivially_copy_pass_by_ref' --deny=trivial_numeric_casts '--warn=clippy::transmutes_expressible_as_ptr_casts' '--warn=clippy::transmute_undefined_repr' '--warn=clippy::transmute_ptr_to_ref' '--warn=clippy::transmute_ptr_to_ptr' '--warn=clippy::transmute_int_to_non_zero' '--warn=clippy::transmute_int_to_bool' '--warn=clippy::transmute_bytes_to_str' '--warn=clippy::todo' '--warn=clippy::same_functions_in_if_condition' '--warn=clippy::or-fun-call' '--warn=clippy::negative_feature_names' '--warn=clippy::missing_transmute_annotations' '--warn=clippy::missing_fields_in_debug' --deny=missing_debug_implementations '--warn=clippy::mismatching_type_param_order' '--warn=clippy::large_stack_arrays' '--warn=clippy::infinite_loop' '--warn=clippy::fn_to_numeric_cast_any' '--deny=clippy::exhaustive_structs' '--deny=clippy::exhaustive_enums' '--warn=clippy::doc_markdown' '--warn=clippy::debug_assert_with_mut_call' '--warn=clippy::dbg_macro' '--warn=clippy::crosspointer_transmute' '--warn=clippy::collection_is_never_read' '--warn=clippy::branches-sharing-code' '--warn=clippy::alloc-instead-of-core' --check-cfg 'cfg(icu4c_enable_renaming)' --check-cfg 'cfg(needs_alloc_error_handler)' --check-cfg 'cfg(icu4x_run_size_tests)' --check-cfg 'cfg(icu4x_unstable_fast_trie_only)' -C debug-assertions=on --cfg 'feature="compiled_data"' --check-cfg 'cfg(docsrs,test)' --check-cfg 'cfg(feature, values("compiled_data", "datagen", "default", "serde"))' -C metadata=93531bdf20e240ec -C extra-filename=-531e4bff9d07e214 --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_locale/531e4bff9d07e214/out --target x86_64-unknown-linux-gnu -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/displaydoc/8b39eae06ae61658/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/proc-macro2/4f28f1b4723420bd/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/quote/a8a1f358b3c91008/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/syn/db4f4bd46cff4e26/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/synstructure/126725b11c1f286f/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/unicode-ident/a6fca9296e3118d2/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/yoke-derive/62f44fd0c4857134/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/zerofrom-derive/c5a4dbcbc24fcc01/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/zerovec-derive/d2d80e5bf78043c3/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_collections/ea39d54ea1841b74/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_locale_core/4a8bd71ed5b2f18d/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_locale_data/1adfbbff1750669a/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_provider/cb0903c3eace14c3/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/litemap/ba4548f5ef2afd59/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/potential_utf/eba7bbecbb71ea84/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/stable_deref_trait/a32dbc72ab97ad68/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tinystr/1303604de05d2d88/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/utf8_iter/f6eb9c4996fb410b/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/writeable/291db9e83929d914/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/yoke/78d627ddcf84b75b/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/zerofrom/f7aa5348efe0765d/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/zerotrie/211261e343006f32/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/zerovec/e6db8b1b2fc07301/out -L dependency=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/release/build/icu_locale/531e4bff9d07e214/out --extern icu_collections=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_collections/ea39d54ea1841b74/out/libicu_collections-ea39d54ea1841b74.rmeta --extern icu_locale_core=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_locale_core/4a8bd71ed5b2f18d/out/libicu_locale_core-4a8bd71ed5b2f18d.rmeta --extern icu_locale_data=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_locale_data/1adfbbff1750669a/out/libicu_locale_data-1adfbbff1750669a.rmeta --extern icu_provider=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/icu_provider/cb0903c3eace14c3/out/libicu_provider-cb0903c3eace14c3.rmeta --extern potential_utf=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/potential_utf/eba7bbecbb71ea84/out/libpotential_utf-eba7bbecbb71ea84.rmeta --extern tinystr=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/tinystr/1303604de05d2d88/out/libtinystr-1303604de05d2d88.rmeta --extern zerovec=/checkout/obj/build/x86_64-unknown-linux-gnu/stage2-rustc/x86_64-unknown-linux-gnu/release/build/zerovec/e6db8b1b2fc07301/out/libzerovec-e6db8b1b2fc07301.rmeta --cap-lints allow --cfg=windows_raw_dylib -Csymbol-mangling-version=v0 -Zannotate-moves -Zunstable-options '--check-cfg=cfg(bootstrap)' -Zmacro-backtrace -Csplit-debuginfo=off -Clink-args=-Wl,-z,origin '-Clink-args=-Wl,-rpath,$ORIGIN/../lib' -Alinker-messages -Zon-broken-pipe=kill -Z binary-dep-depinfo` (exit status: 101)
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] rustc_span test:false 13.448
[RUSTC-TIMING] regex_automata test:false 28.606
[RUSTC-TIMING] darling_core test:false 2.210
Bootstrap failed while executing `test --stage 2 src/tools/miri src/tools/miri/cargo-miri`

@mu001999 mu001999 closed this Jul 19, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants