about summary refs log tree commit diff
path: root/src/libstd/macros.rs
AgeCommit message (Collapse)AuthorLines
2018-08-01Switch to bootstrapping from 1.29 betaMark Rousskov-12/+2
2018-07-23Rollup merge of #52581 - petrochenkov:bmacrodoc, r=alexcrichtonkennytm-17/+17
Avoid using `#[macro_export]` for documenting builtin macros Use a special `rustc_*` attribute instead. cc https://github.com/rust-lang/rust/pull/52234
2018-07-21fix tidy ~ againEsteban Küber-13/+0
2018-07-21Don't use the new `eprintln` for stage0 and stage1Esteban Küber-2/+2
I'm not entirely sure why (or if) this is needed.
2018-07-21Change `eprintln!()`Esteban Küber-2/+9
Address #30143 as well. `writeln!()` hasn't been changed.
2018-07-21Gate `format_args_nll` behind feature flagEsteban Küber-1/+1
2018-07-21Avoid using `#[macro_export]` for documenting builtin macrosVadim Petrochenkov-17/+17
2018-07-19rework printlnEsteban Küber-2/+24
2018-07-19Same change as `println` for `eprintln`Esteban Küber-2/+1
2018-07-19review comments: modify note wording and change `println`Esteban Küber-8/+1
- Don't print the newline on its own to avoid the possibility of printing it out of order due to `stdout` locking. - Modify wording of `concat!()` with non-literals to not mislead into believing that only `&str` literals are accepted. - Add test for `concat!()` with non-literals.
2018-07-19Improve suggestion for missing fmt str in printlnEsteban Küber-2/+8
Avoid using `concat!(fmt, "\n")` to improve the diagnostics being emitted when the first `println!()` argument isn't a formatting string literal.
2018-06-25Add sentence to compile_error!() docsBenjamin Sago-1/+3
It now details why using compile_error!() is different from just not having the final macro_rules!() branch.
2018-06-25Link the docs of panic!() and compile_error!()Benjamin Sago-1/+7
Fixes #47275. These two macros are similar, but different, and could do with documentation links to each other.
2018-06-22Remove impl trait names and move bits of await into a functionTaylor Cramer-3/+1
2018-06-22Review nits and updatesTaylor Cramer-5/+5
Move future_from_generator out of raw Update await to use $crate Renumber errors
2018-06-21Allow unsafe code inside of await macroTaylor Cramer-0/+1
2018-06-21async await desugaring and testsTaylor Cramer-0/+20
2018-05-24Add documentation about env! second argumentGuillaume Gomez-2/+15
2018-05-03update concat_idents doc stubsMichael Lamparski-2/+2
2018-04-16Remove unwanted auto-linking and updateGuillaume Gomez-2/+2
2018-04-03tweak format_args! docsAlex Burka-2/+2
Swap the variable names in the example.
2018-03-21document format_args! further wrt. Debug & Display"Mazdak Farrokhzad-0/+12
2018-03-16Auto merge of #48813 - sinkuu:build_in_assert_macro, r=alexcrichtonbors-0/+54
Make `assert` a built-in procedural macro Makes `assert` macro a built-in one without touching its functionality. This is a prerequisite for RFC 2011 (#44838).
2018-03-08Rollup merge of #48857 - Songbird0:improve_column_macro_documentation, ↵Manish Goregaokar-1/+1
r=joshtriplett Modify part of `column!` documentation. Just like `line!` documentation, I've replaced: > The returned column is not the invocation of the `column!` macro itself By > The returned column is *not necessarily* the line of the `column!` invocation itself See #46997.
2018-03-09Modify part of `column!` documentation.Anthony Defranceschi-1/+1
Just like `line!` documentation, I've replaced: > The returned column is not the invocation of the `column!` macro itself By > The returned column is *not necessarily* the line of the `column!` invocation itself See #46997.
2018-03-09Modify part of `line!` documentation.Anthony Defranceschi-1/+1
In accordance with #46997, I've replaced: > The returned line is not the invocation of the line! macro itself [...] By > The returned line is *not necessarily* the line of the `line!` invocation itself [...]
2018-03-07Make `assert` macro a built-in procedural macroShotaro Yamada-0/+54
2018-02-07update the builtin macro doc stubsMichael Lamparski-5/+20
2018-02-07libcore/libstd: fix commas in macro_rules! macrosMichael Lamparski-0/+3
BREAKING CHANGE: (or perhaps, *bugfix*) In #![no_std] applications, the following calls to `panic!` used to behave differently; they now behave the same. Old behavior: panic!("{{"); // panics with "{{" panic!("{{",); // panics with "{" New behavior: panic!("{{"); // panics with "{{" panic!("{{",); // panics with "{{" This only affects calls to `panic!` (and by proxy `assert` and `debug_assert`) with a single string literal followed by a trailing comma, and only in `#![no_std]` applications.
2018-01-08Fixed a typo in the compile_error docsAndrew Brinker-1/+1
2017-12-25Fix docs mistakeest31-1/+1
2017-12-24Make column macro output 1 based and document itest31-6/+12
2017-12-07Rollup merge of #46416 - liigo:cfg-macro, r=steveklabnikGuillaume Gomez-1/+1
doc: macro `cfg!` evaluating at compile-time
2017-12-05compile_error example blurbsHavvy-0/+5
2017-12-05No unused macro warning in compile_error example.Havvy-1/+4
2017-12-04Give compile_error macro examplesHavvy-2/+19
2017-12-01doc: macro `cfg!` evaluating at compile-timeLiigo Zhuang-1/+1
2017-11-25Make builtin macro doc stubs more accurateMichael Lamparski-6/+14
See #46242.
2017-11-19std: Add a new wasm32-unknown-unknown targetAlex Crichton-0/+36
This commit adds a new target to the compiler: wasm32-unknown-unknown. This target is a reimagining of what it looks like to generate WebAssembly code from Rust. Instead of using Emscripten which can bring with it a weighty runtime this instead is a target which uses only the LLVM backend for WebAssembly and a "custom linker" for now which will hopefully one day be direct calls to lld. Notable features of this target include: * There is zero runtime footprint. The target assumes nothing exists other than the wasm32 instruction set. * There is zero toolchain footprint beyond adding the target. No custom linker is needed, rustc contains everything. * Very small wasm modules can be generated directly from Rust code using this target. * Most of the standard library is stubbed out to return an error, but anything related to allocation works (aka `HashMap`, `Vec`, etc). * Naturally, any `#[no_std]` crate should be 100% compatible with this new target. This target is currently somewhat janky due to how linking works. The "linking" is currently unconditional whole program LTO (aka LLVM is being used as a linker). Naturally that means compiling programs is pretty slow! Eventually though this target should have a linker. This target is also intended to be quite experimental. I'm hoping that this can act as a catalyst for further experimentation in Rust with WebAssembly. Breaking changes are very likely to land to this target, so it's not recommended to rely on it in any critical capacity yet. We'll let you know when it's "production ready". --- Currently testing-wise this target is looking pretty good but isn't complete. I've got almost the entire `run-pass` test suite working with this target (lots of tests ignored, but many passing as well). The `core` test suite is still getting LLVM bugs fixed to get that working and will take some time. Relatively simple programs all seem to work though! --- It's worth nothing that you may not immediately see the "smallest possible wasm module" for the input you feed to rustc. For various reasons it's very difficult to get rid of the final "bloat" in vanilla rustc (again, a real linker should fix all this). For now what you'll have to do is: cargo install --git https://github.com/alexcrichton/wasm-gc wasm-gc foo.wasm bar.wasm And then `bar.wasm` should be the smallest we can get it! --- In any case for now I'd love feedback on this, particularly on the various integration points if you've got better ideas of how to approach them!
2017-10-22fix stringify docs in stdAlex Burka-2/+2
2017-09-10Use rvalue promotion to 'static instead of static items.Eduard-Mihai Burtescu-15/+3
2017-08-31Update bootstrap compilerAlex Crichton-10/+0
This commit updates the bootstrap compiler and clears out a number of #[cfg(stage0)] annotations and related business
2017-08-29broken links resolvedAndy Gauge-1/+1
2017-08-29fix test failures in documentation changeAndrew Gauger-2/+2
2017-08-29API docs: macros. Part of #29329 Standard Library Documentation Checklist.Andy Gauge-21/+101
2017-08-12Add complete doc example for `include_str!`.Corey Farwell-1/+18
2017-08-12Add complete doc example for `include_bytes!`.Corey Farwell-1/+18
2017-08-12Demonstrate `include!` with Rust code, not just a string slice literal.Corey Farwell-6/+11
2017-08-08Avoid calling the column!() macro in panicest31-2/+14
2017-07-27Auto merge of #43477 - est31:master, r=alexcrichtonbors-1/+1
Switch to begin_panic again In https://github.com/rust-lang/rust/pull/42938 we made the compiler emit a call to begin_panic_new in order to pass column info to it. Now with stage0 updated (https://github.com/rust-lang/rust/pull/43320), we can safely change begin_panic and start emitting calls for it again.