about summary refs log tree commit diff
path: root/src/librustc/util/common.rs
AgeCommit message (Collapse)AuthorLines
2019-04-03Deny internal lints in librustcflip1995-5/+4
2019-03-13Use derive macro for HashStableJohn Kåre Alsaker-1/+2
2019-02-10rustc: doc commentsAlexander Regueiro-4/+4
2019-02-05move librustc to 2018Mark Mansi-3/+3
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-8/+5
(compiler front-ends).
2018-09-29don't elide lifetimes in paths in librustc/Zack M. Davis-2/+2
This seemed like a good way to kick the tires on the elided-lifetimes-in-paths lint (#52069)—seems to work! This was also pretty tedious—it sure would be nice if `cargo fix` worked on this codebase (#53896)!
2018-08-29Replace usages of 'bad_style' with 'nonstandard_style'.Corey Farwell-1/+1
`bad_style` is being deprecated in favor of `nonstandard_style`: - https://github.com/rust-lang/rust/issues/41646
2018-08-23use String::new() instead of String::from(""), "".to_string(), "".to_owned() ↵Matthias Krüger-1/+1
or "".into()
2018-08-09Move path2cstr to rustc_fs_utilMark Rousskov-15/+0
2018-07-29Auto merge of #52767 - ljedrz:avoid_format, r=petrochenkovbors-1/+1
Prefer to_string() to format!() Simple benchmarks suggest in some cases it can be faster by even 37%: ``` test converting_f64_long ... bench: 339 ns/iter (+/- 199) test converting_f64_short ... bench: 136 ns/iter (+/- 34) test converting_i32_long ... bench: 87 ns/iter (+/- 16) test converting_i32_short ... bench: 87 ns/iter (+/- 49) test converting_str ... bench: 54 ns/iter (+/- 15) test formatting_f64_long ... bench: 349 ns/iter (+/- 176) test formatting_f64_short ... bench: 145 ns/iter (+/- 14) test formatting_i32_long ... bench: 98 ns/iter (+/- 14) test formatting_i32_short ... bench: 93 ns/iter (+/- 15) test formatting_str ... bench: 86 ns/iter (+/- 23) ```
2018-07-27Use str::repeatShotaro Yamada-2/+1
2018-07-27Prefer to_string() to format!()ljedrz-1/+1
2018-05-05Misc tweaksJohn Kåre Alsaker-0/+11
2018-04-27Move query functions out from the define_maps! macroJohn Kåre Alsaker-1/+7
2018-04-10Make PerfStats thread-safe and remove unused fieldsJohn Kåre Alsaker-12/+5
2018-04-06Print query stack on ICEsJohn Kåre Alsaker-1/+9
2018-03-30Rename fs::read_string to read_to_string and stabilizeMatt Brubeck-1/+2
2018-03-13add handy helper for Cell<usize>, used for perf statsNiko Matsakis-0/+10
2018-03-09Move PROFQ_CHAN to a Session fieldJohn Kåre Alsaker-30/+32
2018-03-02Run Rustfix on librustcManish Goregaokar-1/+1
2018-02-20Do not run the default panic hook inside procedural macros. Fixes #47812John Kåre Alsaker-0/+21
2018-01-10Use the new fs_read_write functions in rustc internalsMatt Brubeck-5/+2
2017-12-20incr.comp.: Cache check_match query.Michael Woerister-1/+1
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-10/+4
2017-09-23Compress "small" spans to 32 bits and intern "large" spansVadim Petrochenkov-2/+3
2017-08-23-Z profile-queries includes dep_graph.with_task uses in outputMatthew Hammer-1/+6
2017-08-23-Z profile-queries: remove panic when channel is unsetMatthew Hammer-1/+6
2017-08-23profiling with -Z profile-queries recognizes -Z time-passesMatthew Hammer-1/+11
2017-08-23inc comp: -Z profile-queries support; see also ↵Matthew Hammer-0/+57
https://github.com/rust-lang-nursery/rust-forge/blob/master/profile-queries.md
2017-08-12Fix some typosBastien Orivel-1/+1
2017-07-31async-llvm(25): Restore -Ztime-passes output for trans and LLVM.Michael Woerister-5/+27
2017-07-12integrate anon dep nodes into trait selectionNiko Matsakis-4/+2
2017-06-09incr.comp.: Uniformly represent DepNodes as (Kind, StableHash) pairs.Michael Woerister-2/+4
2017-05-16put option_try macro def under #[cfg(unix)]est31-0/+1
2017-03-13some style fixesTshepang Lekhonkhobe-3/+4
2016-12-27propagate TIME_DEPTH to the helper threads for -Z time-passesNiko Matsakis-3/+17
2016-11-21Implement the `loop_break_value` feature.Geoffry Song-55/+0
This implements RFC 1624, tracking issue #37339. - `FnCtxt` (in typeck) gets a stack of `LoopCtxt`s, which store the currently deduced type of that loop, the desired type, and a list of break expressions currently seen. `loop` loops get a fresh type variable as their initial type (this logic is stolen from that for arrays). `while` loops get `()`. - `break {expr}` looks up the broken loop, and unifies the type of `expr` with the type of the loop. - `break` with no expr unifies the loop's type with `()`. - When building MIR, `loop` loops no longer construct a `()` value at termination of the loop; rather, the `break` expression assigns the result of the loop. `while` loops are unchanged. - `break` respects contexts in which expressions may not end with braced blocks. That is, `while break { break-value } { while-body }` is illegal; this preserves backwards compatibility. - The RFC did not make it clear, but I chose to make `break ()` inside of a `while` loop illegal, just in case we wanted to do anything with that design space in the future. This is my first time dealing with this part of rustc so I'm sure there's plenty of problems to pick on here ^_^
2016-11-04Add -Zhir-stats for collecting statistics on HIR and ASTMichael Woerister-0/+34
2016-09-01Add some infrastructure for timing things where time_passes can't be used.Michael Woerister-9/+26
2016-07-06rustc: Update stage0 to beta-2016-07-06Alex Crichton-12/+0
Hot off the presses, let's update our stage0 compiler!
2016-06-09fix damage in librustcAriel Ben-Yehuda-0/+12
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-3/+3
2016-02-12Autoderef in librustcJonas Schievink-1/+1
2016-01-26std: Stabilize custom hasher support in HashMapAlex Crichton-3/+2
This commit implements the stabilization of the custom hasher support intended for 1.7 but left out due to some last-minute questions that needed some decisions. A summary of the actions done in this PR are: Stable * `std::hash::BuildHasher` * `BuildHasher::Hasher` * `BuildHasher::build_hasher` * `std::hash::BuildHasherDefault` * `HashMap::with_hasher` * `HashMap::with_capacity_and_hasher` * `HashSet::with_hasher` * `HashSet::with_capacity_and_hasher` * `std::collections::hash_map::RandomState` * `RandomState::new` Deprecated * `std::collections::hash_state` * `std::collections::hash_state::HashState` - this trait was also moved into `std::hash` with a reexport here to ensure that we can have a blanket impl to prevent immediate breakage on nightly. Note that this is unstable in both location. * `HashMap::with_hash_state` - renamed * `HashMap::with_capacity_and_hash_state` - renamed * `HashSet::with_hash_state` - renamed * `HashSet::with_capacity_and_hash_state` - renamed Closes #27713
2016-01-05Refactor compiler to make use of dep-tracking-maps. Also, in cases whereNiko Matsakis-39/+31
we were using interior mutability (RefCells, TyIvar), add some reads/writes.
2015-12-21Register new snapshotsAlex Crichton-1/+0
Lots of cruft to remove!
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-10/+4
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968