We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2daa097 commit 6807349Copy full SHA for 6807349
src/librustc/middle/privacy.rs
@@ -325,7 +325,7 @@ impl<'a> Visitor<()> for EmbargoVisitor<'a> {
325
}
326
327
fn visit_foreign_item(&mut self, a: &ast::ForeignItem, _: ()) {
328
- if self.prev_exported && a.vis == ast::Public {
+ if (self.prev_exported && a.vis == ast::Public) || self.reexports.contains(&a.id) {
329
self.exported_items.insert(a.id);
330
331
src/test/compile-fail/lint-dead-code-3.rs
@@ -16,6 +16,11 @@
16
17
extern crate libc;
18
19
+pub use x = extern_foo;
20
+extern {
21
+ fn extern_foo();
22
+}
23
+
24
struct Foo; //~ ERROR: code is never used
25
impl Foo {
26
fn foo(&self) { //~ ERROR: code is never used
0 commit comments