summary refs log tree commit diff
path: root/src/librustc_resolve
AgeCommit message (Collapse)AuthorLines
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-92/+96
2015-09-01Add E0439 error explanationGuillaume Gomez-7/+7
2015-09-01Comment out unused error codesGuillaume Gomez-18/+18
2015-09-01Add E0411 error explanationGuillaume Gomez-1/+49
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-5/+4
2015-08-24fallout from moving def-idNiko Matsakis-33/+36
2015-08-19fallout of reworking rc and arc APIsAlexis Beingessner-4/+4
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-12Auto merge of #27698 - arielb1:foreign-type-import, r=alexcrichtonbors-0/+5
Fixes #22968 Probably fixes #27602 (the issue needs a reproduction) r? @alexcrichton
2015-08-12stop cross-crate associated types from being importedAriel Ben-Yehuda-0/+5
Fixes #22968 Probably fixes #27602
2015-08-11rollup merge of #27635: GuillaumeGomez/patch-4Alex Crichton-2/+10
r? @Manishearth
2015-08-11rollup merge of #27622: eefriedman/https-urlAlex Crichton-7/+7
Also fixes a few outdated links.
2015-08-11Update E0425 error explanationGuillaume Gomez-2/+2
2015-08-10Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichtonbors-6/+7
An implementation of [RFC 1219](https://github.com/rust-lang/rfcs/pull/1219). The RFC is not merged yet, but once merged, this could be.
2015-08-10Auto merge of #27547 - vberger:more_perseverant_resolve, r=nrcbors-9/+64
As noted in my previous PR #27439 , the import resolution algorithm has two cases where it bails out: - The algorithm will delay an import if the module containing the target of the import still has unresolved glob imports - The algorithm will delay a glob import of the target module still has unresolved imports This PR alters the behaviour to only bail out when the above described unresolved imports are `pub`, as non-pub imports don't affect the result anyway. It is still possible to fail the algorithm with examples like ```rust pub mod a { pub use b::*; } pub mod b { pub use a::*; } ``` but such configurations cannot be resolved in any meaningful way, as these are cyclic imports. Closes #4865
2015-08-10Add another example for E0425Guillaume Gomez-0/+8
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-7/+7
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-08rustc: rename multiple imports in a listSean McArthur-6/+7
2015-08-07Auto merge of #27378 - GuillaumeGomez:patch-2, r=brsonbors-9/+178
Part of #24407. r? @Manishearth
2015-08-07Add a guard example for E0416Guillaume Gomez-0/+9
2015-08-07Customize error messages for self glob imports.Victor Berger-1/+5
2015-08-06Add another example for E0412Guillaume Gomez-5/+8
2015-08-06Update E0423 exampleGuillaume Gomez-13/+13
2015-08-06remove ty::{VariantInfo, FieldTy}Ariel Ben-Yehuda-3/+1
2015-08-06Add E0416 error explanationGuillaume Gomez-1/+20
2015-08-06Add E0415 error explanationGuillaume Gomez-1/+16
2015-08-06Factor inc/dec count methods.Victor Berger-9/+30
2015-08-06Add E0419 error explanationGuillaume Gomez-1/+27
2015-08-06Add examples in E0412Guillaume Gomez-2/+12
2015-08-05Block import resolution only on 'pub' imports.Victor Berger-6/+36
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-47/+75
(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-04Add E0412 error explanationGuillaume Gomez-1/+17
2015-08-04Addressing nits & tests explanations.Victor Berger-15/+22
2015-08-04rustc: replace def::MethodProvenance with ty::ImplOrTraitItemContainer.Eduard Burtescu-5/+3