Mara Bos
ed1de99b4f
Fix bug with assert!() calling the wrong edition of panic!().
...
The span of `panic!` produced by the `assert` macro did not carry the
right edition. This changes `assert` to call the right version.
2021-02-01 23:23:27 +01:00
Mara Bos
a730970dff
Only call span.rust_2021() when necessary.
2021-01-24 14:19:05 +01:00
Mara Bos
a1c41e9ca7
Expand assert!(expr, args..) to include $crate for hygiene on 2021.
...
Before 2021, this was a breaking change, as std::panic and core::panic
are different. In edition 2021 they will be identical, making it
possible again to apply proper hygiene here.
2021-01-09 20:53:24 +01:00
Mara Bos
0f193d1a62
Small cleanups in assert!() and panic_fmt lint.
...
(From the PR feedback.)
Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
2020-10-19 21:14:05 +02:00
Mara Bos
3beb2e95a9
Expand assert!(expr) to panic() function instead of panic!() macro.
...
The panic message might contain braces which should never be
interpreted as format placeholders, which panic!() will do in a future
edition.
2020-10-18 22:30:16 +02:00
Vadim Petrochenkov
219c66c55c
rustc_parse: Make Parser::unexpected
public and use it in built-in macros
2020-10-06 00:23:36 +03:00
mark
9e5f7d5631
mv compiler to compiler/
2020-08-30 18:45:07 +03:00