Rollup merge of #63613 - petrochenkov:stdhyg, r=alexcrichton

Hygienize use of built-in macros in the standard library

Same as https://github.com/rust-lang/rust/pull/61629, but for built-in macros.

Closes https://github.com/rust-lang/rust/issues/48781
r? @alexcrichton
This commit is contained in:
Mazdak Farrokhzad 2019-08-16 18:22:30 +02:00 committed by GitHub
commit cd21715c34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 26 additions and 54 deletions

View file

@ -5,5 +5,5 @@ LL | println!("Hello, World!");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: expanding `println! { "Hello, World!" }`
= note: to `{ $crate :: io :: _print (format_args_nl ! ("Hello, World!")) ; }`
= note: to `{ $crate :: io :: _print ($crate :: format_args_nl ! ("Hello, World!")) ; }`

View file

@ -1,4 +0,0 @@
fn main() {
println!("{}", __rust_unstable_column!());
//~^ ERROR use of unstable library feature '__rust_unstable_column'
}

View file

@ -1,11 +0,0 @@
error[E0658]: use of unstable library feature '__rust_unstable_column': internal implementation detail of the `panic` macro
--> $DIR/rust-unstable-column-gated.rs:2:20
|
LL | println!("{}", __rust_unstable_column!());
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(__rust_unstable_column)]` to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.