Repository navigation
[WIP] resolve: Make ambiguity checking stricter - #149145
petrochenkov wants to merge 1 commit into
Conversation
|
@bors try |
This comment has been minimized.
This comment has been minimized.
[WIP] resolve: Make ambiguity checking stricter
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
💔 Test for 0e7f93c failed: CI. Failed jobs:
|
bf5f878 to
58af356
Compare
This comment has been minimized.
This comment has been minimized.
|
@bors try |
[WIP] resolve: Make ambiguity checking stricter
This comment has been minimized.
This comment has been minimized.
|
@craterbot check |
|
👌 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🚧 Experiment ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more |
|
🎉 Experiment
Footnotes
|
|
☔ The latest upstream changes (presumably #149462) made this pull request unmergeable. Please resolve the merge conflicts. |
58af356 to
27839b2
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
Closing in favor of #149596. |
With a current Rust, you get this warning: ``` warning: ambiguous import visibility: pub or pub(crate) --> src/lib.rs:21:9 | 21 | pub use vello; | ^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #149145 <rust-lang/rust#149145> = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution = note: `vello` could refer to a crate passed with `--extern` = help: use `::vello` to refer to this crate unambiguously note: `vello` could also refer to the crate imported here --> src/lib.rs:5:5 | 5 | use crate::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `vello` to disambiguate = help: or use `crate::vello` to refer to this crate unambiguously = note: `#[warn(ambiguous_import_visibilities)]` (part of `#[warn(future_incompatible)]`) on by default warning: `bevy_vello` (lib) generated 1 warning ```
With a current Rust, you get this warning: ``` warning: ambiguous import visibility: pub or pub(crate) --> src/lib.rs:21:9 | 21 | pub use vello; | ^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #149145 <rust-lang/rust#149145> = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution = note: `vello` could refer to a crate passed with `--extern` = help: use `::vello` to refer to this crate unambiguously note: `vello` could also refer to the crate imported here --> src/lib.rs:5:5 | 5 | use crate::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `vello` to disambiguate = help: or use `crate::vello` to refer to this crate unambiguously = note: `#[warn(ambiguous_import_visibilities)]` (part of `#[warn(future_incompatible)]`) on by default warning: `bevy_vello` (lib) generated 1 warning ```
With a current Rust, you get this warning: ``` warning: ambiguous import visibility: pub or pub(crate) --> src/lib.rs:21:9 | 21 | pub use vello; | ^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #149145 <rust-lang/rust#149145> = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution = note: `vello` could refer to a crate passed with `--extern` = help: use `::vello` to refer to this crate unambiguously note: `vello` could also refer to the crate imported here --> src/lib.rs:5:5 | 5 | use crate::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `vello` to disambiguate = help: or use `crate::vello` to refer to this crate unambiguously = note: `#[warn(ambiguous_import_visibilities)]` (part of `#[warn(future_incompatible)]`) on by default warning: `bevy_vello` (lib) generated 1 warning ```
With a current Rust, you get this warning: ``` warning: ambiguous import visibility: pub or pub(crate) --> src/lib.rs:21:9 | 21 | pub use vello; | ^^^^^ | = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #149145 <rust-lang/rust#149145> = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution = note: `vello` could refer to a crate passed with `--extern` = help: use `::vello` to refer to this crate unambiguously note: `vello` could also refer to the crate imported here --> src/lib.rs:5:5 | 5 | use crate::prelude::*; | ^^^^^^^^^^^^^^^^^ = help: consider adding an explicit import of `vello` to disambiguate = help: or use `crate::vello` to refer to this crate unambiguously = note: `#[warn(ambiguous_import_visibilities)]` (part of `#[warn(future_incompatible)]`) on by default warning: `bevy_vello` (lib) generated 1 warning ```
The 1.98.1 toolchain fails 27 of 30 CI jobs on code that has not changed, because the workflows build with RUSTFLAGS: -D warnings. - sgb/protocol.rs re-exported the same nine modules twice, once as `pub` and once as `pub(in crate::sgb)`, so every name reached `sgb.rs` through two paths with different visibility: 81 `ambiguous import visibility` warnings. The second block only really added `boot_palette`, so it is reduced to that one glob; `pub` already covers the rest. The warning is a future hard error (rust-lang/rust#149145), not a style preference. - 16 `chunks_exact_to_as_chunks` and one `needless_late_init`, applied with `clippy --fix`. `as_chunks::<N>().0` drops the trailing partial chunk exactly as `chunks_exact(N)` did. - 5 `unused_format_specs`: `{:#03X}` becomes `{:#X}`. With the `0x` prefix taking two characters a width of 3 never pads anything, so the emitted bytes are identical — these are `trace_summary` and `scheduler_trace_message` strings, and widening to `{:#04X}` would have changed trace output. cargo lint, cargo fmt-check and cargo tests are clean on 1.98.1.
* chore(deps): bump rust-toolchain from 1.96.0 to 1.98.1 Bumps [rust-toolchain](https://github.com/rust-lang/rust) from 1.96.0 to 1.98.1. - [Release notes](https://github.com/rust-lang/rust/releases) - [Changelog](https://github.com/rust-lang/rust/blob/main/RELEASES.md) - [Commits](rust-lang/rust@1.96.0...1.98.1) --- updated-dependencies: - dependency-name: rust-toolchain dependency-version: 1.98.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): adapt the workspace to rust 1.98 lints The 1.98.1 toolchain fails 27 of 30 CI jobs on code that has not changed, because the workflows build with RUSTFLAGS: -D warnings. - sgb/protocol.rs re-exported the same nine modules twice, once as `pub` and once as `pub(in crate::sgb)`, so every name reached `sgb.rs` through two paths with different visibility: 81 `ambiguous import visibility` warnings. The second block only really added `boot_palette`, so it is reduced to that one glob; `pub` already covers the rest. The warning is a future hard error (rust-lang/rust#149145), not a style preference. - 16 `chunks_exact_to_as_chunks` and one `needless_late_init`, applied with `clippy --fix`. `as_chunks::<N>().0` drops the trailing partial chunk exactly as `chunks_exact(N)` did. - 5 `unused_format_specs`: `{:#03X}` becomes `{:#X}`. With the `0x` prefix taking two characters a width of 3 never pads anything, so the emitted bytes are identical — these are `trace_summary` and `scheduler_trace_message` strings, and widening to `{:#04X}` would have changed trace output. cargo lint, cargo fmt-check and cargo tests are clean on 1.98.1. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Francis Molina <pakitovic@gmail.com>
Testing a possible proper fix for the
RustEmbedissue (#147196).cc @LorrensP-2158466