File tree 3 files changed +45
-0
lines changed
3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ // force-host
2
+ // no-prefer-dynamic
3
+
4
+ #![ crate_type = "proc-macro" ]
5
+
6
+ extern crate proc_macro;
7
+
8
+ use proc_macro:: TokenStream ;
9
+
10
+ #[ proc_macro]
11
+ pub fn cause_ice ( _: TokenStream ) -> TokenStream {
12
+ "
13
+ enum IceCause {
14
+ Variant,
15
+ }
16
+
17
+ pub use IceCause::Variant;
18
+ " . parse ( ) . unwrap ( )
19
+ }
Original file line number Diff line number Diff line change
1
+ // aux-build:re-export.rs
2
+ // edition:2018
3
+
4
+ extern crate re_export;
5
+
6
+ use re_export:: cause_ice;
7
+
8
+ cause_ice ! ( ) ; //~ ERROR `Variant` is only public within the crate, and cannot be re-exported outside
9
+
10
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error[E0364]: `Variant` is only public within the crate, and cannot be re-exported outside
2
+ --> $DIR/issue-79148.rs:8:1
3
+ |
4
+ LL | cause_ice!();
5
+ | ^^^^^^^^^^^^
6
+ |
7
+ note: consider marking `Variant` as `pub` in the imported module
8
+ --> $DIR/issue-79148.rs:8:1
9
+ |
10
+ LL | cause_ice!();
11
+ | ^^^^^^^^^^^^
12
+ = note: this error originates in the macro `cause_ice` (in Nightly builds, run with -Z macro-backtrace for more info)
13
+
14
+ error: aborting due to previous error
15
+
16
+ For more information about this error, try `rustc --explain E0364`.
You can’t perform that action at this time.
0 commit comments