Vadim Petrochenkov
dbdbd30bf2
expand/resolve: Turn #[derive]
into a regular macro attribute
2021-02-07 20:08:45 +03:00
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
d5414f9a9f
Implement new panic!() behaviour for Rust 2021.
2021-01-25 13:48:11 +01:00
Mara Bos
dec5cfbaba
Remove unused allow_internal_unstable on core::panic.
2021-01-25 13:48:10 +01:00
Caleb Sander
391b4cc378
Fix formatting specifiers doc link
...
Was incorrectly linked to `core::fmt`, which is empty, in d36e3e23a8
Some of the links were fixed already in 3baf6a4a74
2021-01-13 15:05:39 -05:00
Mark Rousskov
fe031180d0
Bump bootstrap compiler to 1.50 beta
2020-12-30 09:27:19 -05:00
Camelid
d8b1d51b95
Clean up core
macros documentation
...
* Switch a couple links over to intra-doc links
* Clean up some formatting/typography
2020-11-23 11:28:25 -08:00
Camelid
d37e1e186e
Qualify panic!
as core::panic!
in non-built-in core
macros
...
Otherwise code like this
#![no_implicit_prelude]
fn main() {
::std::todo!();
::std::unimplemented!();
}
will fail to compile, which is unfortunate and presumably unintended.
This changes many invocations of `panic!` in a `macro_rules!` definition
to invocations of `$crate::panic!`, which makes the invocations hygienic.
Note that this does not make the built-in macro `assert!` hygienic.
2020-11-23 11:28:25 -08:00
Mara Bos
d3b41497fe
Also apply panic_fmt lint suggestions to debug_assert!().
2020-10-19 00:45:07 +02:00
Mara Bos
dd262e3856
Add cfg(not(bootstrap)) on the new rustc_diagnostic_item attributes.
...
The beta compiler doesn't accept rustc_diagnostic_items on macros yet.
2020-10-18 23:45:20 +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
Mara Bos
f228efc3f5
Make panic_fmt lint work properly for assert!(expr, msg) too.
2020-10-18 22:29:40 +02:00
Mara Bos
462ee9c1b5
Mark the panic macros as diagnostic items.
2020-10-18 22:20:19 +02:00
cyqsimon
bf982a52f6
Bad grammar
2020-11-09 23:52:33 +08:00
cyqsimon
2633e93aa0
Clarified description of write! macro
2020-11-09 23:00:31 +08:00
Ivan Pavluk
3baf6a4a74
Fix doc links to std::fmt
...
std::format and core::write macros' docs linked to core::fmt for format string reference, even though only std::fmt has format string documentation and the link titles were std::fmt.
2020-10-31 18:02:55 +07:00
Taiki Endo
04c0018d1b
Use ? in core/std macros
2020-10-26 07:15:37 +09:00
Mara Bos
4f7ffbf351
Fix const core::panic!(non_literal_str).
2020-10-22 18:41:35 +02:00
Shahar Or (mightyiam)
badf4afdd5
core::global_allocator docs link to std::alloc::GlobalAlloc
2020-09-29 14:39:44 +07:00
Tyler Mandry
383da5e1e6
Rollup merge of #74880 - chrisduerr:fix_matches, r=dtolnay
...
Add trailing comma support to matches macro
2020-09-01 18:24:23 -07:00
Camelid
511ee052a0
Use intra-doc links in core::macros
...
Also cleaned up some things and added a few more links.
2020-08-25 18:45:20 -07:00
LeSeulArtichaut
d36e3e23a8
Use intra-doc-links in core::{char, macros, fmt}
2020-08-24 00:13:23 +02:00
Christian Duerr
f3d7645fb7
Add trailing comma support to matches macro
2020-07-28 18:42:13 +02:00
mark
2c31b45ae8
mv std libs to library/
2020-07-27 19:51:13 -05:00