summary refs log tree commit diff
path: root/compiler/rustc_builtin_macros/src/assert.rs
AgeCommit message (Collapse)AuthorLines
2022-06-13remove unnecessary `to_string` and `String::new`Takayuki Maeda-2/+2
2022-06-02Basic compiler infraCaio-22/+48
2022-02-23rustc_errors: let `DiagnosticBuilder::emit` return a "guarantee of emission".Eduard-Mihai Burtescu-6/+2
2022-01-31Fix invalid special casing of the unreachable! macroLoïc BRANSTETT-1/+1
2021-10-07Use correct edition for panic in [debug_]assert!() etc.Mara Bos-3/+3
2021-02-01Fix bug with assert!() calling the wrong edition of panic!().Mara Bos-2/+2
The span of `panic!` produced by the `assert` macro did not carry the right edition. This changes `assert` to call the right version.
2021-01-24Only call span.rust_2021() when necessary.Mara Bos-7/+5
2021-01-09Expand assert!(expr, args..) to include $crate for hygiene on 2021.Mara Bos-1/+19
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.
2020-10-19Small cleanups in assert!() and panic_fmt lint.Mara Bos-31/+29
(From the PR feedback.) Co-authored-by: Esteban Küber <esteban@kuber.com.ar>
2020-10-18Expand assert!(expr) to panic() function instead of panic!() macro.Mara Bos-26/+36
The panic message might contain braces which should never be interpreted as format placeholders, which panic!() will do in a future edition.
2020-10-06rustc_parse: Make `Parser::unexpected` public and use it in built-in macrosVadim Petrochenkov-2/+1
2020-08-30mv compiler to compiler/mark-0/+133