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

Test incorrect_visibility_restriction fails #223

Open
antoyo opened this issue Sep 1, 2024 · 0 comments
Open

Test incorrect_visibility_restriction fails #223

antoyo opened this issue Sep 1, 2024 · 0 comments

Comments

@antoyo
Copy link

antoyo commented Sep 1, 2024

Hi.
The test incorrect_visibility_restriction fails with the following:

test tests/compile_fail/incorrect_visibility_restriction.rs ... mismatch

EXPECTED:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0704]: incorrect visibility restriction
 --> tests/compile_fail/incorrect_visibility_restriction.rs:5:9
  |
5 |     pub(nonsense) static ref WRONG: () = ();
  |         ^^^^^^^^ help: make this visible only to module `nonsense` with `in`: `in nonsense`
  |
  = help: some possible visibility restrictions are:
          `pub(crate)`: visible only on the current crate
          `pub(super)`: visible only in the current module's parent
          `pub(in path::to::module)`: visible only on the specified path
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈

ACTUAL OUTPUT:
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
error[E0704]: incorrect visibility restriction
 --> tests/compile_fail/incorrect_visibility_restriction.rs:5:9
  |
5 |     pub(nonsense) static ref WRONG: () = ();
  |         ^^^^^^^^
  |
  = help: some possible visibility restrictions are:
          `pub(crate)`: visible only on the current crate
          `pub(super)`: visible only in the current module's parent
          `pub(in path::to::module)`: visible only on the specified path
help: make this visible only to module `nonsense` with `in`
  |
5 |     pub(in nonsense) static ref WRONG: () = ();
  |         ~~~~~~~~~~~
┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈
note: If the actual output is the correct output you can bless it by rerunning
      your test with the environment variable TRYBUILD=overwrite

Since this crate is deprecated, I don't know if you intend to fix these tests, so ignore in this case.
Thanks.

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

No branches or pull requests

1 participant