b225aab5ef
Make the following API stable: // in core::any pub fn type_name_of_val<T: ?Sized>(_val: &T) -> &'static str Const stability is not added because this relies on `type_name` which is also not const. That has a blocking issue. Fixes #66359
19 lines
445 B
Rust
19 lines
445 B
Rust
// Check that a marco from another crate can define an item in one expansion
|
|
// and use it from another, without it being visible to everyone.
|
|
// This requires that the definition of `my_struct` preserves the hygiene
|
|
// information for the tokens in its definition.
|
|
|
|
// check-pass
|
|
// aux-build:use_by_macro.rs
|
|
|
|
extern crate use_by_macro;
|
|
|
|
use use_by_macro::*;
|
|
|
|
enum MyStruct {}
|
|
my_struct!(define);
|
|
|
|
fn main() {
|
|
let x = my_struct!(create);
|
|
}
|