Skip to content

[ImgBot] Optimize images#1

Open
imgbot[bot] wants to merge 1 commit into
masterfrom
imgbot
Open

[ImgBot] Optimize images#1
imgbot[bot] wants to merge 1 commit into
masterfrom
imgbot

Conversation

@imgbot

@imgbot imgbot Bot commented May 8, 2025

Copy link
Copy Markdown

Beep boop. Your images are optimized!

Your image file size has been reduced by 9% 🎉

Details
File Before After Percent reduction
/src/tools/rust-analyzer/assets/logo-square.svg 4.90kb 3.25kb 33.59%
/tests/ui/diagnostic-flags/colored-session-opt-error.svg 0.80kb 0.58kb 26.68%
/src/doc/rustc-dev-guide/src/mir/mir_overview.svg 5.20kb 4.23kb 18.64%
/src/tools/rust-analyzer/assets/logo-wide.svg 12.87kb 10.73kb 16.63%
/src/doc/rustc-dev-guide/src/mir/mir_detailed.svg 17.49kb 14.67kb 16.12%
/src/librustdoc/html/static/images/rust-logo.svg 3.22kb 2.83kb 12.10%
/tests/ui/error-emitter/E0308-clarification.svg 6.69kb 5.92kb 11.40%
/tests/ui/error-emitter/highlighting.windows.svg 4.66kb 4.24kb 9.10%
/tests/ui/error-emitter/highlighting.svg 4.56kb 4.15kb 9.03%
/tests/ui/error-emitter/unicode-output.svg 4.65kb 4.24kb 8.86%
/src/librustdoc/html/static/images/favicon.svg 4.20kb 3.84kb 8.54%
/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg 7.82kb 7.18kb 8.15%
/src/doc/rustc-dev-guide/src/mir/mir_cfg.svg 19.13kb 17.63kb 7.80%
/tests/ui/codemap_tests/huge_multispan_highlight.unicode.svg 8.21kb 7.57kb 7.80%
/tests/ui/error-emitter/multiline-removal-suggestion.svg 46.04kb 42.60kb 7.48%
/tests/ui/error-emitter/multiline-multipart-suggestion.svg 8.95kb 8.32kb 7.08%
/tests/ui/error-emitter/multiline-multipart-suggestion.windows.svg 9.07kb 8.44kb 6.99%
/tests/ui/suggestions/incorrect-variant-literal.svg 81.87kb 76.24kb 6.88%
Total : 250.33kb 226.67kb 9.45%

📝 docs | :octocat: repo | 🙋🏾 issues | 🏪 marketplace

~Imgbot - Part of Optimole family

*Total -- 250.33kb -> 226.67kb (9.45%)

/src/tools/rust-analyzer/assets/logo-square.svg -- 4.90kb -> 3.25kb (33.59%)
/tests/ui/diagnostic-flags/colored-session-opt-error.svg -- 0.80kb -> 0.58kb (26.68%)
/src/doc/rustc-dev-guide/src/mir/mir_overview.svg -- 5.20kb -> 4.23kb (18.64%)
/src/tools/rust-analyzer/assets/logo-wide.svg -- 12.87kb -> 10.73kb (16.63%)
/src/doc/rustc-dev-guide/src/mir/mir_detailed.svg -- 17.49kb -> 14.67kb (16.12%)
/src/librustdoc/html/static/images/rust-logo.svg -- 3.22kb -> 2.83kb (12.1%)
/tests/ui/error-emitter/E0308-clarification.svg -- 6.69kb -> 5.92kb (11.4%)
/tests/ui/error-emitter/highlighting.windows.svg -- 4.66kb -> 4.24kb (9.1%)
/tests/ui/error-emitter/highlighting.svg -- 4.56kb -> 4.15kb (9.03%)
/tests/ui/error-emitter/unicode-output.svg -- 4.65kb -> 4.24kb (8.86%)
/src/librustdoc/html/static/images/favicon.svg -- 4.20kb -> 3.84kb (8.54%)
/tests/ui/codemap_tests/huge_multispan_highlight.ascii.svg -- 7.82kb -> 7.18kb (8.15%)
/src/doc/rustc-dev-guide/src/mir/mir_cfg.svg -- 19.13kb -> 17.63kb (7.8%)
/tests/ui/codemap_tests/huge_multispan_highlight.unicode.svg -- 8.21kb -> 7.57kb (7.8%)
/tests/ui/error-emitter/multiline-removal-suggestion.svg -- 46.04kb -> 42.60kb (7.48%)
/tests/ui/error-emitter/multiline-multipart-suggestion.svg -- 8.95kb -> 8.32kb (7.08%)
/tests/ui/error-emitter/multiline-multipart-suggestion.windows.svg -- 9.07kb -> 8.44kb (6.99%)
/tests/ui/suggestions/incorrect-variant-literal.svg -- 81.87kb -> 76.24kb (6.88%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>
bend-n pushed a commit that referenced this pull request Mar 24, 2026
…rochenkov

Avoid prematurely choosing a glob import

Fixes rust-lang#153842

Use the following without introducing trait to explain:
```rust
mod a {
    pub use crate::x::y as x; // single import #1
}

mod b {
    pub mod x {
        pub mod y {}
    }
}

use a::x; // single import rust-lang#2
use b::*; // glob import rust-lang#3

fn main() {}
```

In current implementation, when `#1` is first resolved, `crate::x` is temporarily taken from glob import `rust-lang#3` as `crate::b::x`. This happens because `single_import_can_define_name` will see that `rust-lang#2` cannot define `x` (because it depends on `#1` and `#1` is ignored) and then return `false`. Later, during finalization, `crate::x` in `#1` resolves through single import `rust-lang#2` instead, which no longer matches the initially cached module `crate::b::x` and triggers the ICE.

I think the resolver should keep this unresolved because `rust-lang#2` may still define `x` to avoid prematurely choosing a glob import.

r? petrochenkov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant