summary refs log tree commit diff
path: root/src/librustc_resolve/lib.rs
AgeCommit message (Collapse)AuthorLines
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-1/+0
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-1/+1
2015-10-13Provide span for visit_struct_def + remove some dead codeVadim Petrochenkov-1/+2
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-2/+2
2015-10-13Unify structures and enum variants in HIRVadim Petrochenkov-13/+1
2015-10-01Introduce semi-duplicate DefIds into DefLocal/DefUpvar to remove useNiko Matsakis-4/+6
of xxx_local.
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-9/+9
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-2/+3
2015-09-29Fill in some missing parts in the default HIR visitorVadim Petrochenkov-4/+4
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-1/+1
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-23Remove random Idents outside of libsyntaxVadim Petrochenkov-2/+2
2015-09-22Use Names in the remaining HIR structures with exception of...Vadim Petrochenkov-3/+3
PathSegment, PatIdent, ExprWhile, ExprLoop, ExprBreak and ExprAgain - they need Idents for resolve
2015-09-22Use Names in path fragments and MacroDefVadim Petrochenkov-6/+6
2015-09-22Use Names in hir::{Field, ExprMethodCall, ExprField}Vadim Petrochenkov-4/+4
2015-09-22Use Names in HIR ItemsVadim Petrochenkov-6/+6
2015-09-22Use Names in HIR visitors and foldersVadim Petrochenkov-1/+1
2015-09-17Resolve prefix in imports with empty bracesVadim Petrochenkov-6/+22
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-5/+4
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-15Auto merge of #28406 - petrochenkov:primitive, r=eddybbors-2/+16
This was missing from https://github.com/rust-lang/rust/pull/27451 r? @eddyb
2015-09-15Prohibit renaming to primitive types' names in import listsVadim Petrochenkov-2/+16
2015-09-11std: Stabilize/deprecate features for 1.4Alex Crichton-1/+0
The FCP is coming to a close and 1.4 is coming out soon, so this brings in the libs team decision for all library features this cycle. Stabilized APIs: * `<Box<str>>::into_string` * `Arc::downgrade` * `Arc::get_mut` * `Arc::make_mut` * `Arc::try_unwrap` * `Box::from_raw` * `Box::into_raw` * `CStr::to_str` * `CStr::to_string_lossy` * `CString::from_raw` * `CString::into_raw` * `IntoRawFd::into_raw_fd` * `IntoRawFd` * `IntoRawHandle::into_raw_handle` * `IntoRawHandle` * `IntoRawSocket::into_raw_socket` * `IntoRawSocket` * `Rc::downgrade` * `Rc::get_mut` * `Rc::make_mut` * `Rc::try_unwrap` * `Result::expect` * `String::into_boxed_slice` * `TcpSocket::read_timeout` * `TcpSocket::set_read_timeout` * `TcpSocket::set_write_timeout` * `TcpSocket::write_timeout` * `UdpSocket::read_timeout` * `UdpSocket::set_read_timeout` * `UdpSocket::set_write_timeout` * `UdpSocket::write_timeout` * `Vec::append` * `Vec::split_off` * `VecDeque::append` * `VecDeque::retain` * `VecDeque::split_off` * `rc::Weak::upgrade` * `rc::Weak` * `slice::Iter::as_slice` * `slice::IterMut::into_slice` * `str::CharIndices::as_str` * `str::Chars::as_str` * `str::split_at_mut` * `str::split_at` * `sync::Weak::upgrade` * `sync::Weak` * `thread::park_timeout` * `thread::sleep` Deprecated APIs * `BTreeMap::with_b` * `BTreeSet::with_b` * `Option::as_mut_slice` * `Option::as_slice` * `Result::as_mut_slice` * `Result::as_slice` * `f32::from_str_radix` * `f64::from_str_radix` Closes #27277 Closes #27718 Closes #27736 Closes #27764 Closes #27765 Closes #27766 Closes #27767 Closes #27768 Closes #27769 Closes #27771 Closes #27773 Closes #27775 Closes #27776 Closes #27785 Closes #27792 Closes #27795 Closes #27797
2015-09-06track, for each upvar, its index in list of upvarsNiko Matsakis-14/+13
2015-09-03Use proper span for break and continue labelsSimonas Kazlauskas-3/+3
Fixes #28109
2015-09-03Add an intital HIR and lowering stepNick Cameron-58/+61
2015-08-26Rename FnKind variants and stop re-exporting them from the visit module.Ms2ger-5/+5
There is no longer a need for that pattern, since enums are now qualified.
2015-08-24Auto merge of #27857 - Manishearth:improve-fnkind, r=pnkfelixbors-1/+1
Since enums are namespaced now, should we also remove the `Fk` prefixes from `FnKind` and remove the reexport? (The reexport must be removed because otherwise it clashes with glob imports containing `ItemFn`). IMO writing `FnKind::Method` is much clearer than `FkMethod`.
2015-08-24convert to use `is_local` instead of `== LOCAL_CRATE`Niko Matsakis-3/+3
2015-08-24fallout from moving def-idNiko Matsakis-6/+7
2015-08-19fallout of reworking rc and arc APIsAlexis Beingessner-1/+1
2015-08-19Auto merge of #27493 - GSam:master, r=nrcbors-28/+88
In order to test the validity of identifiers, exposing the name resolution module is necessary. Other changes mostly comprise of exposing modules publicly like parts of save-analysis, so they can be called appropriately.
2015-08-16FnFnBlock -> FkClosureManish Goregaokar-1/+1
2015-08-15Add issue for the rustc_private feature everywhereAlex Crichton-1/+1
2015-08-11rollup merge of #27622: eefriedman/https-urlAlex Crichton-2/+2
Also fixes a few outdated links.
2015-08-10Modify the callback to be run from a macroGarming Sam-30/+17
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-2/+2
Also fixes a few outdated links.
2015-08-09Add a proper comment for create_resolverGarming Sam-0/+8
2015-08-09Remove some duplicated code with new create_resolverGarming Sam-10/+1
2015-08-09Remove unused language itemsGarming Sam-1/+0
2015-08-09Avoid change to current module on escape from callbackGarming Sam-2/+1
2015-08-09Introduce callback to resolverGarming Sam-16/+92
Sets a flag to pass through the rest of the walker.
2015-08-06Factor inc/dec count methods.Victor Berger-0/+24
2015-08-05Block import resolution only on 'pub' imports.Victor Berger-0/+8
When resolving 'use' statements, only consider pub imports of the target module as blocking. Closes #4865
2015-08-05Auto merge of #27439 - vberger:more_perseverant_resolve, r=nrcbors-19/+14
(This is a second try at #26242. This time I think things should be ok.) The current algorithm handling import resolutions works sequentially, handling imports in the order they appear in the source file, and blocking/bailing on the first one generating an error/being unresolved. This can lead to situations where the order of the `use` statements can make the difference between "this code compiles" and "this code fails on an unresolved import" (see #18083 for example). This is especially true when considering glob imports. This PR changes the behaviour of the algorithm to instead try to resolve all imports in a module. If one fails, it is recorded and the next one is tried (instead of directly giving up). Also, all errors generated are stored (and not reported directly). The main loop of the algorithms guaranties that the algorithm will always finish: if a round of resolution does not resolve anything new, we are stuck and give up. At this point, the new version of the algorithm will display all errors generated by the last round of resolve. This way we are sure to not silence relevant errors or help messages, but also to not give up too early. **As a consequence, the import resolution becomes independent of the order in which the `use` statements are written in the source files.** I personally don't see any situations where this could be a problem, but this might need some thought. I passed `rpass` and `cfail` tests on my computer, and now am compiling a full stage2 compiler to ensure the crates reporting errors in my previous attempts still build correctly. I guess once I have checked it, this will need a crater run? Fixes #18083. r? @alexcrichton , cc @nrc @brson
2015-08-04Rollup merge of #27491 - GuillaumeGomez:patch-4, r=ManishearthManish Goregaokar-2/+2
2015-08-04rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer.Eduard Burtescu-1/+1
2015-08-03Improve E0423 error messageGuillaume Gomez-2/+2
2015-07-31More perseverant about indeterminate imports.Victor Berger-3/+9
Most errors generated by resolve might be caused by not-yet-resolved glob imports. This changes the behavior of the resolve imports algorithms to not fail prematurally on first error, but instead buffer intermediate errors and report them only when stuck. Fixes #18083
2015-07-31Remove unused resolve error message.Victor Berger-16/+5
There is not situation where `foo` would be unresolved but not `foo::*`.
2015-07-29Auto merge of #27349 - arielb1:constant-at, r=alexcrichtonbors-9/+8
Fixes #27033 Fixes #27077 r? @alexcrichton
2015-07-28prohibit the lhs of an @-pattern being a constantAriel Ben-Yehuda-9/+8
as this breaks code that worked under some conditions, this is a [breaking-change] Fixes #27033 Fixes #27077