Skip to content

Test incorrect_visibility_restriction fails #223

Open
@antoyo

Description

@antoyo

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions