about summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2016-05-11rustc: Replace &'a TyCtxt<'tcx> with a TyCtxt<'a, 'tcx> wrapper.Eduard Burtescu-11/+11
2016-05-03change the newly-added errors to warningsAriel Ben-Yehuda-0/+4
this commit should be reverted after a release cycle
2016-05-03refactor the handling of builtin candidatesAriel Ben-Yehuda-1/+1
2016-04-13Auto merge of #32780 - soltanmm:consider-the-following, r=nikomatsakisbors-0/+18
Replace consider_unification_despite_ambiguity with new obligation variant Is work towards #32730. Addresses part one of #32286. Addresses #24210 and #26046 to some degree. r? @nikomatsakis
2016-04-07Auto merge of #32583 - arielb1:need-a-bound, r=nikomatsakisbors-91/+103
Suggest adding a where-clause when that can help Suggest adding a where-clause when there is an unmet trait-bound that can be satisfied if some type can implement it. r? @nikomatsakis
2016-04-06Replace consider_unification_despite_ambiguity with obligation variantMasood Malekghassemi-0/+18
2016-04-06rustc: move middle::{def,def_id,pat_util} to hir.Eduard Burtescu-2/+2
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-4/+4
2016-04-05improve the printing of substs and trait-refsAriel Ben-Yehuda-91/+103
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-8/+8
2016-03-27rustc: move middle::subst into middle::ty.Eduard Burtescu-1/+1
2016-03-24remove ErasedRegions from substitutionsNiko Matsakis-37/+15
This hack has long since outlived its usefulness; the transition to trans passing around full substitutions is basically done. Instead of `ErasedRegions`, just supply substitutions with a suitable number of `'static` entries, and invoke `erase_regions` when needed (the latter of which we already do).
2016-03-22fix alignmentJorge Aparicio-5/+5
2016-03-22try! -> ?Jorge Aparicio-72/+72
Automated conversion using the untry tool [1] and the following command: ``` $ find -name '*.rs' -type f | xargs untry ``` at the root of the Rust repo. [1]: https://github.com/japaric/untry
2016-03-17trans: Rename MonoId to Instance and start using it in more places.Eduard Burtescu-24/+56
2016-03-09Print fn type parameters for TyFnDef.Eduard Burtescu-4/+13
2016-03-09Track fn type and lifetime parameters in TyFnDef.Eduard Burtescu-1/+1
2016-03-09Split TyBareFn into TyFnDef and TyFnPtr.Eli Friedman-7/+15
There's a lot of stuff wrong with the representation of these types: TyFnDef doesn't actually uniquely identify a function, TyFnPtr is used to represent method calls, TyFnDef in the sub-expression of a cast isn't correctly reified, and probably some other stuff I haven't discovered yet. Splitting them seems like the right first step, though.
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-3/+3
2016-02-20make *mut T -> *const T a coercionAriel Ben-Yehuda-0/+3
rather than being implicit quasi-subtyping. Nothing good can come out of quasi-subtyping.
2016-02-12Autoderef in librustcJonas Schievink-1/+1
2016-02-11[breaking-change] don't glob import/export syntax::abi enum variantsOliver Schneider-2/+2
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-07Rename fold_subitems_with to super_fold_withJeffrey Seyfried-3/+2
2016-01-07Refactor away extension traits RegionEscape and HasTypeFlagsJeffrey Seyfried-2/+1
2016-01-07Create a visitor for `TypeFoldable`s and use it to implement RegionEscape ↵Jeffrey Seyfried-0/+4
and HasTypeFlags (fixes #20298)
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-28Rename ExplicitSelfCategory's variants and stop re-exporting them.Ms2ger-5/+5
2015-12-28rewrite the method-receiver matching codeAriel Ben-Yehuda-2/+1
the old code was *so terrible*.
2015-12-21Register new snapshotsAlex Crichton-1/+0
Lots of cruft to remove!
2015-12-17Remove unused importsJeffrey Seyfried-5/+2
2015-12-14[breaking-change] move ast_util functions to methodsfaineance-4/+4
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
2015-11-26Add suggestion of similar macro names to `macro undefined` error messageFlorian Hartwig-63/+0
2015-11-23Avoid some code duplication around getting names of numeric types.Michael Woerister-46/+4
2015-11-18Port a bunch of code new-visitor; all of these ports wereNiko Matsakis-6/+6
straightforward uses of `visit_all_items`. In some cases I had to remove empty `visit_item` calls that were just to suppress visiting nested items.
2015-11-09std: Migrate to the new libcAlex Crichton-9/+14
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-10-01Convert DefId to use DefIndex, which is an index into a list ofNiko Matsakis-1/+1
paths, and construct paths for all definitions. Also, stop rewriting DefIds for closures, and instead just load the closure data from the original def-id, which may be in another crate.
2015-10-01build up a set of node-ids that we can construct def-ids fromNiko Matsakis-2/+2
2015-10-01Rename `node_id` to `var_id` and limit to the cases that are actually usedNiko Matsakis-1/+1
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-10/+10
they are being used as an opaque "position identifier"
2015-10-01move job of creating local-def-ids to ast-map (with a few stragglers)Niko Matsakis-3/+3
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-7/+8
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-14split ty::util and ty::adjustmentAriel Ben-Yehuda-5/+5
2015-09-14split ty.rs into smaller partsAriel Ben-Yehuda-3/+152
2015-09-14move middle::ty and related modules to middle/ty/Ariel Ben-Yehuda-3/+3
2015-09-06move fnv hashing support into librustc_data_structuresNiko Matsakis-37/+2
2015-09-03Add an intital HIR and lowering stepNick Cameron-17/+59
2015-08-30fix compilation with RUST_LOG=rustc::middle::traitsAriel Ben-Yehuda-2/+27
2015-08-25use the parameter environment when checking dtorsAriel Ben-Yehuda-1/+1
This makes it more uniform. No functional changes.