summary refs log tree commit diff
path: root/src/libfmt_macros
AgeCommit message (Collapse)AuthorLines
2019-06-16Separate libfmt_macros modulechansuke-245/+244
2019-06-12Rollup merge of #61568 - Mark-Simulacrum:symbol-fmt-macros, r=estebankMazdak Farrokhzad-66/+70
Use Symbol, Span in libfmt_macros I'm not super happy with this, personally, but I think it might be a decent start -- happy to take suggestions as to how to expand this or change things further. r? @estebank Fixes #60795
2019-06-11Add deny(unused_lifetimes) to all the crates that have deny(internal).Eduard-Mihai Burtescu-0/+1
2019-06-09Properly point at the last opening braceMark Rousskov-1/+1
2019-06-09Add comment about raw strings to self.styleMark Rousskov-0/+2
2019-06-09Introduce InnerSpan abstractionMark Rousskov-47/+42
This should be used when trying to get at subsets of a larger span, especially when the larger span is not available in the code attempting to work with those subsets (especially common in the fmt_macros crate). This is usually a good replacement for (BytePos, BytePos) and (usize, usize) tuples. This commit also removes from_inner_byte_pos, since it took usize arguments, which is error prone.
2019-06-09Use Symbol for named arguments in fmt_macrosMark Rousskov-15/+25
2019-06-09Inline raw methodMark Rousskov-6/+3
2019-04-17Deny `internal` in stage0Mateusz Mikuła-1/+1
2019-04-03Deny internal lints on two more cratesflip1995-0/+1
- libfmt_macros - librustdoc
2019-02-10Revert removed #![feature(nll)]Taiki Endo-0/+1
2019-02-07Remove images' url to make it work even without internet connectionGuillaume Gomez-3/+1
2019-02-03libfmt_macros => 2018Mazdak Farrokhzad-6/+8
2019-01-26Rollup merge of #57764 - Xanewok:tiny-tweaks, r=nikomatsakisMazdak Farrokhzad-0/+1
Fix some minor warnings Since apparently RLS works when initialized in the root repository (:tada:) I decided to fix some of the issues it caught. There are a lot of unused attribute warnings left on `rustc_on_unimplemented` and `rustc_layout_scalar_valid_range_start` but I imagine we can't do much about it due to 2-stage compilation?
2019-01-20Add missing #![feature(rustc_private)] annotationIgor Matuszewski-0/+1
2019-01-12Fix simple formatting optimizationShotaro Yamada-0/+9
name old2 ns/iter new2 ns/iter diff ns/iter diff % speedup fmt::write_str_macro1 12,295 12,308 13 0.11% x 1.00 fmt::write_str_macro2 24,079 21,451 -2,628 -10.91% x 1.12 fmt::write_str_macro_debug 238,363 230,807 -7,556 -3.17% x 1.03 fmt::write_str_ref 6,203 6,064 -139 -2.24% x 1.02 fmt::write_str_value 6,225 6,075 -150 -2.41% x 1.02 fmt::write_vec_macro1 17,144 17,121 -23 -0.13% x 1.00 fmt::write_vec_macro2 29,845 26,703 -3,142 -10.53% x 1.12 fmt::write_vec_macro_debug 248,840 242,117 -6,723 -2.70% x 1.03 fmt::write_vec_ref 5,954 6,438 484 8.13% x 0.92 fmt::write_vec_value 5,959 6,439 480 8.06% x 0.93
2018-12-26Point at correct span for arguments in format stringsEsteban Küber-4/+3
When a format string has escaped whitespace characters format arguments were shifted by one per each escaped character. Account for these escaped characters when synthesizing the spans. Fix #55155.
2018-12-26Various changes to string format diagnosticsEsteban Küber-40/+104
- Point at opening mismatched formatting brace - Account for differences between raw and regular strings - Account for differences between the code snippet and `InternedString` - Add more tests
2018-12-25Remove licensesMark Rousskov-10/+0
2018-10-03remove padding from multiline format string labelAndy Russell-1/+1
Fixes #53836.
2018-09-27Bump to 1.31.0 and bootstrap from 1.30 betaJosh Stone-1/+1
2018-09-11stabalize infer outlives requirements (RFC 2093).toidiu-1/+0
Co-authored-by: nikomatsakis
2018-08-24check that adding infer-outlives requirement to all crates worksNiko Matsakis-0/+1
2018-08-19Fix typos found by codespell.Matthias Krüger-1/+1
2018-08-11A few cleanups for fmt_macros, graphviz, apfloat, target, serialize and termljedrz-7/+5
2018-08-09[nll] libfmt_macros: enable feature(nll) for bootstrapmemoryruins-0/+2
2018-07-29Remove unused `mut`sMatthew Jasper-1/+1
2018-07-27Auto merge of #52336 - ishitatsuyuki:dyn-rollup, r=Mark-Simulacrumbors-2/+0
Rollup of bare_trait_objects PRs All deny attributes were moved into bootstrap so they can be disabled with a line of config. Warnings for external tools are allowed and it's up to the tool's maintainer to keep it warnings free. r? @Mark-Simulacrum cc @ljedrz @kennytm
2018-07-25Deny bare_trait_objects globallyTatsuyuki Ishi-2/+0
2018-07-24Add documentation for `Parser::arg_places`Esteban Küber-0/+1
2018-07-22Point at internal span in format stringEsteban Küber-4/+13
2018-07-21fix testEsteban Küber-2/+2
2018-07-21Remove dependency on `libsyntax`Esteban Küber-16/+5
2018-07-20fix rebaseEsteban Küber-1/+1
2018-07-20fix incorrect position of chars in fmt strEsteban Küber-8/+9
2018-07-19Use correct spans for format string errorsEsteban Küber-9/+34
When encountering format string errors in a raw string, or regular string literal with embedded newlines, account for the positional change to use correct spans. :drive by fix: 🚗
2018-07-19rework printlnEsteban Küber-1/+5
2018-07-12Deny bare trait objects in the rest of rustljedrz-0/+2
2018-05-10Improve format string errorsEsteban Küber-14/+68
- Point at format string position inside the formatting string - Explain that argument names can't start with an underscore
2018-04-08Move deny(warnings) into rustbuildMark Simulacrum-1/+0
This permits easier iteration without having to worry about warnings being denied. Fixes #49517
2018-03-13Add hexadecimal formatting of integers with fmt::DebugSimon Sapin-2/+20
This can be used for integers within a larger types which implements Debug (possibly through derive) but not fmt::UpperHex or fmt::LowerHex. ```rust assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]"); assert!(format!("{:02X?}", b"Foo\0") == "[46, 6F, 6F, 00]"); ``` RFC: https://github.com/rust-lang/rfcs/pull/2226
2018-02-10fix typos in src/{bootstrap,ci,etc,lib{backtrace,core,fmt_macros}}Matthias Krüger-1/+1
2017-11-09Retain information on whether a format argument has explicit positionTommy Ip-10/+12
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-3/+0
Fixes #41701.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-1/+1
Like #43008 (f668999), but _much more aggressive_.
2017-06-19Bump version and stage0 compilerAlex Crichton-4/+0
2017-06-16Introduce tidy lint to check for inconsistent tracking issuesest31-1/+1
This commit * Refactors the collect_lib_features function to work in a non-checking mode (no bad pointer needed, and list of lang features). * Introduces checking whether unstable/stable tags for a given feature have inconsistent tracking issues. * Fixes such inconsistencies throughout the codebase.
2017-05-11rustc: Remove #![unstable] annotationAlex Crichton-2/+2
These are now no longer necessary with `-Z force-unstable-if-unmarked`
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-11-11On fmt string with unescaped `{` note how to escapeEsteban Küber-4/+19
On cases of malformed format strings where a `{` hasn't been properly escaped, like `println!("{");`, present a note explaining how to escape the `{` char.