Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/ui/eii/auxiliary/other_crate_privacy2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ mod private {
pub fn decl3(x: u64);
}

pub use private::eii3 as eii4;
pub use private::decl3 as decl4;
pub use private::{decl3 as decl4, eii3 as eii4};

#[eii(eii5)]
static FOO: u8;

pub fn local_call_decl1(x: u64) {
decl1(x)
Expand Down
1 change: 1 addition & 0 deletions tests/ui/eii/privacy2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ extern crate other_crate_privacy2 as codegen;
// has a span but in the other crate
//~? ERROR `#[eii2]` function required, but not found
//~? ERROR `#[eii3]` function required, but not found
//~? ERROR `#[eii5]` static required, but not found

#[codegen::eii1]
fn eii1_impl(x: u64) {
Expand Down
14 changes: 11 additions & 3 deletions tests/ui/eii/privacy2.stderr
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
error[E0433]: cannot find `eii3` in `codegen`
--> $DIR/privacy2.rs:16:12
--> $DIR/privacy2.rs:17:12
|
LL | #[codegen::eii3]
| ^^^^ could not find `eii3` in `codegen`

error[E0603]: function `decl1` is private
--> $DIR/privacy2.rs:26:14
--> $DIR/privacy2.rs:27:14
|
LL | codegen::decl1(42);
| ^^^^^ private function
Expand All @@ -32,7 +32,15 @@ LL | #[eii(eii3)]
|
= help: expected at least one implementation in crate `privacy2` or any of its dependencies

error: aborting due to 4 previous errors
error: `#[eii5]` static required, but not found
--> $DIR/auxiliary/other_crate_privacy2.rs:19:7
|
LL | #[eii(eii5)]
| ^^^^ expected because `#[eii5]` was declared here in crate `other_crate_privacy2`
|
= help: expected at least one implementation in crate `privacy2` or any of its dependencies

error: aborting due to 5 previous errors

Some errors have detailed explanations: E0433, E0603.
For more information about an error, try `rustc --explain E0433`.
Loading