2019-04-24 21:23:44 +00:00
|
|
|
// compile-flags: -Z unstable-options
|
|
|
|
|
|
|
|
#![feature(rustc_private)]
|
2019-06-24 08:43:51 +00:00
|
|
|
#![deny(rustc::usage_of_qualified_ty)]
|
2019-04-24 21:23:44 +00:00
|
|
|
#![allow(unused)]
|
|
|
|
|
2020-03-29 16:08:01 +00:00
|
|
|
extern crate rustc_middle;
|
2019-04-24 21:23:44 +00:00
|
|
|
|
2020-03-29 16:08:01 +00:00
|
|
|
use rustc_middle::ty::{self, Ty, TyCtxt};
|
2019-04-24 21:23:44 +00:00
|
|
|
|
|
|
|
macro_rules! qualified_macro {
|
|
|
|
($a:ident) => {
|
|
|
|
fn ty_in_macro(
|
|
|
|
ty_q: ty::Ty<'_>,
|
|
|
|
ty: Ty<'_>,
|
2019-06-13 21:48:52 +00:00
|
|
|
ty_ctxt_q: ty::TyCtxt<'_>,
|
|
|
|
ty_ctxt: TyCtxt<'_>,
|
2019-04-24 21:23:44 +00:00
|
|
|
) {
|
|
|
|
println!("{}", stringify!($a));
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
fn ty_qualified(
|
|
|
|
ty_q: ty::Ty<'_>, //~ ERROR usage of qualified `ty::Ty<'_>`
|
|
|
|
ty: Ty<'_>,
|
2019-06-13 21:48:52 +00:00
|
|
|
ty_ctxt_q: ty::TyCtxt<'_>, //~ ERROR usage of qualified `ty::TyCtxt<'_>`
|
|
|
|
ty_ctxt: TyCtxt<'_>,
|
2019-04-24 21:23:44 +00:00
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
qualified_macro!(a);
|
|
|
|
}
|