resolve: Fix a false positive "cannot reexport" error for ambiguous glob sets#156284
Conversation
|
r? @JohnTitor rustbot has assigned @JohnTitor. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
The proper fix requires landing #149195 first, and may potentially cause some performance issues. |
|
r? @mu001999 |
This comment was marked as outdated.
This comment was marked as outdated.
1 similar comment
|
@bors r+ rollup |
…uwer Rollup of 6 pull requests Successful merges: - #156287 (move more compiler crates away from `box_patterns` ) - #156428 (Move `std::io::Cursor` to `core::io`) - #156431 (Move `std::io::util` to `core::io`) - #156145 (Move tests cast) - #156284 (resolve: Fix a false positive "cannot reexport" error for ambiguous glob sets) - #156502 (Give an example of a Ctor in the doc-comments)
…uwer Rollup of 6 pull requests Successful merges: - #156287 (move more compiler crates away from `box_patterns` ) - #156428 (Move `std::io::Cursor` to `core::io`) - #156431 (Move `std::io::util` to `core::io`) - #156145 (Move tests cast) - #156284 (resolve: Fix a false positive "cannot reexport" error for ambiguous glob sets) - #156502 (Give an example of a Ctor in the doc-comments)
|
@rust-timer build 27617b5 |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (27617b5): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up. @rustbot label: -S-waiting-on-perf -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (primary -2.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 510.527s -> 508.407s (-0.42%) |
…biguity, r=petrochenkov resolve: fix effective visibilities for items in ambiguous glob sets Fixes rust-lang#159038 (1.96.1 → 1.97.0 regression; details there). When an item is glob-imported twice at different visibilities, effective visibility was computed from whichever declaration arrived first, not the most visible one. An exported item could then get no MIR encoded, and downstream crates fail with ``missing optimized MIR``. Fix: also walk the most visible declaration's re-export chain (`update_decl_chain`, recursing into `ambiguity_vis_max`). Lint behavior unchanged. Two regression tests added; `tests/ui/{imports,privacy,resolve}` pass with every rust-lang#154149 / rust-lang#156284 test unmodified. @rustbot label +A-resolve +A-visibility +T-compiler +regression-from-stable-to-stable
…biguity, r=petrochenkov resolve: fix effective visibilities for items in ambiguous glob sets Fixes rust-lang#159038 (1.96.1 → 1.97.0 regression; details there). When an item is glob-imported twice at different visibilities, effective visibility was computed from whichever declaration arrived first, not the most visible one. An exported item could then get no MIR encoded, and downstream crates fail with ``missing optimized MIR``. Fix: also walk the most visible declaration's re-export chain (`update_decl_chain`, recursing into `ambiguity_vis_max`). Lint behavior unchanged. Two regression tests added; `tests/ui/{imports,privacy,resolve}` pass with every rust-lang#154149 / rust-lang#156284 test unmodified. @rustbot label +A-resolve +A-visibility +T-compiler +regression-from-stable-to-stable
…biguity, r=petrochenkov resolve: fix effective visibilities for items in ambiguous glob sets Fixes rust-lang#159038 (1.96.1 → 1.97.0 regression; details there). When an item is glob-imported twice at different visibilities, effective visibility was computed from whichever declaration arrived first, not the most visible one. An exported item could then get no MIR encoded, and downstream crates fail with ``missing optimized MIR``. Fix: also walk the most visible declaration's re-export chain (`update_decl_chain`, recursing into `ambiguity_vis_max`). Lint behavior unchanged. Two regression tests added; `tests/ui/{imports,privacy,resolve}` pass with every rust-lang#154149 / rust-lang#156284 test unmodified. @rustbot label +A-resolve +A-visibility +T-compiler +regression-from-stable-to-stable
…biguity, r=petrochenkov resolve: fix effective visibilities for items in ambiguous glob sets Fixes rust-lang#159038 (1.96.1 → 1.97.0 regression; details there). When an item is glob-imported twice at different visibilities, effective visibility was computed from whichever declaration arrived first, not the most visible one. An exported item could then get no MIR encoded, and downstream crates fail with ``missing optimized MIR``. Fix: also walk the most visible declaration's re-export chain (`update_decl_chain`, recursing into `ambiguity_vis_max`). Lint behavior unchanged. Two regression tests added; `tests/ui/{imports,privacy,resolve}` pass with every rust-lang#154149 / rust-lang#156284 test unmodified. @rustbot label +A-resolve +A-visibility +T-compiler +regression-from-stable-to-stable
Fixes #156264.