summaryrefslogtreecommitdiffstats
path: root/tests/ui/extern-flag/multiple-opts.rs
blob: 3dc2f1d73f8e4b02219f5fcfc6be2284f435c6e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// aux-crate:priv,noprelude:somedep=somedep.rs
// compile-flags: -Zunstable-options
// edition:2018

// Test for multiple options to --extern. Can't test for errors from both
// options at the same time, so this only checks that noprelude is honored.

#![warn(exported_private_dependencies)]

// Module to avoid adding to prelude.
pub mod m {
    extern crate somedep;
    pub struct PublicType {
        pub field: somedep::S,
    }
}

fn main() {
    somedep::somefun();  //~ ERROR failed to resolve
}