]> git.proxmox.com Git - rustc.git/blob - src/test/ui/privacy/legacy-ctor-visibility.rs
Update upstream source from tag 'upstream/1.30.0_beta.7+dfsg1'
[rustc.git] / src / test / ui / privacy / legacy-ctor-visibility.rs
1 // Copyright 2017 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // ignore-tidy-linelength
12
13 #![allow(unused)]
14
15 use m::S;
16
17 mod m {
18 pub struct S(u8);
19
20 mod n {
21 use S;
22 fn f() {
23 S(10);
24 //~^ ERROR private struct constructors are not usable through re-exports in outer modules
25 //~| WARN this was previously accepted
26 }
27 }
28 }
29
30 fn main() {}