about summary refs log tree commit diff
path: root/src/librustc_borrowck
AgeCommit message (Collapse)AuthorLines
2016-01-24mk: Move from `-D warnings` to `#![deny(warnings)]`Alex Crichton-0/+1
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2016-01-23Rollup merge of #31050 - apasel422:issue-31048, r=ManishearthSteve Klabnik-1/+1
Closes #31048 r? @Manishearth
2016-01-20Correct code in E0382 explanationAndrew Paseltiner-1/+1
Closes #31048
2016-01-17Auto merge of #30964 - GuillaumeGomez:patch-5, r=Manishearthbors-1/+88
r? @Manishearth
2016-01-17Add E0507 error explanationGuillaume Gomez-1/+88
2016-01-16std: Stabilize APIs for the 1.7 releaseAlex Crichton-2/+1
This commit stabilizes and deprecates the FCP (final comment period) APIs for the upcoming 1.7 beta release. The specific APIs which changed were: Stabilized * `Path::strip_prefix` (renamed from `relative_from`) * `path::StripPrefixError` (new error type returned from `strip_prefix`) * `Ipv4Addr::is_loopback` * `Ipv4Addr::is_private` * `Ipv4Addr::is_link_local` * `Ipv4Addr::is_multicast` * `Ipv4Addr::is_broadcast` * `Ipv4Addr::is_documentation` * `Ipv6Addr::is_unspecified` * `Ipv6Addr::is_loopback` * `Ipv6Addr::is_unique_local` * `Ipv6Addr::is_multicast` * `Vec::as_slice` * `Vec::as_mut_slice` * `String::as_str` * `String::as_mut_str` * `<[T]>::clone_from_slice` - the `usize` return value is removed * `<[T]>::sort_by_key` * `i32::checked_rem` (and other signed types) * `i32::checked_neg` (and other signed types) * `i32::checked_shl` (and other signed types) * `i32::checked_shr` (and other signed types) * `i32::saturating_mul` (and other signed types) * `i32::overflowing_add` (and other signed types) * `i32::overflowing_sub` (and other signed types) * `i32::overflowing_mul` (and other signed types) * `i32::overflowing_div` (and other signed types) * `i32::overflowing_rem` (and other signed types) * `i32::overflowing_neg` (and other signed types) * `i32::overflowing_shl` (and other signed types) * `i32::overflowing_shr` (and other signed types) * `u32::checked_rem` (and other unsigned types) * `u32::checked_neg` (and other unsigned types) * `u32::checked_shl` (and other unsigned types) * `u32::saturating_mul` (and other unsigned types) * `u32::overflowing_add` (and other unsigned types) * `u32::overflowing_sub` (and other unsigned types) * `u32::overflowing_mul` (and other unsigned types) * `u32::overflowing_div` (and other unsigned types) * `u32::overflowing_rem` (and other unsigned types) * `u32::overflowing_neg` (and other unsigned types) * `u32::overflowing_shl` (and other unsigned types) * `u32::overflowing_shr` (and other unsigned types) * `ffi::IntoStringError` * `CString::into_string` * `CString::into_bytes` * `CString::into_bytes_with_nul` * `From<CString> for Vec<u8>` * `From<CString> for Vec<u8>` * `IntoStringError::into_cstring` * `IntoStringError::utf8_error` * `Error for IntoStringError` Deprecated * `Path::relative_from` - renamed to `strip_prefix` * `Path::prefix` - use `components().next()` instead * `os::unix::fs` constants - moved to the `libc` crate * `fmt::{radix, Radix, RadixFmt}` - not used enough to stabilize * `IntoCow` - conflicts with `Into` and may come back later * `i32::{BITS, BYTES}` (and other integers) - not pulling their weight * `DebugTuple::formatter` - will be removed * `sync::Semaphore` - not used enough and confused with system semaphores Closes #23284 cc #27709 (still lots more methods though) Closes #27712 Closes #27722 Closes #27728 Closes #27735 Closes #27729 Closes #27755 Closes #27782 Closes #27798
2016-01-16fallout from removing the `errors_will_be_reported` flagNiko Matsakis-3/+3
2016-01-11Rollup merge of #30737 - Ms2ger:MutateMode, r=sanxiynSimonas Kazlauskas-4/+6
2016-01-06Stop re-exporting MutateMode's variants.Ms2ger-4/+6
2016-01-05Annotate the compiler with information about what it is doing when.Niko Matsakis-1/+2
2015-12-30use structured errorsNick Cameron-144/+159
2015-12-21Register new snapshotsAlex Crichton-3/+0
Lots of cruft to remove!
2015-12-17Remove unused importsJeffrey Seyfried-2/+2
2015-12-15Stop re-exporting RestrictionResult variants.Ms2ger-14/+14
2015-12-11Fix for issue #27889: same field names in enum variantsw00ns-21/+38
2015-12-05Auto merge of #30185 - fhahn:improve-borrowck-public-accessibility, r=pnkfelixbors-25/+10
This PR makes `AnalysisData` and`BorrowckCtxt` public. Those types are returned by the public function `build_borrowck_dataflow_data_for_fn` and are needed if a caller wants to pass on the return values. It also removes `FnPartsWithCFG`, which required callers of `build_borrowck_dataflow_data_for_fn` to have a reference to a `CFG` with the same lifetime as `FnParts`, which is more limiting than required.
2015-12-03Make public borrowck api more accessibleFlorian Hahn-25/+10
2015-12-02s/isize/i32Tobias Bucher-4/+4
2015-12-01Replace uses of int/uint with isize/uzsize in doc examplesFlorian Hahn-3/+5
2015-11-28Auto merge of #29383 - petrochenkov:empstr, r=pnkfelixbors-12/+12
Fixes https://github.com/rust-lang/rust/issues/28692 Fixes https://github.com/rust-lang/rust/issues/28992 Fixes some other similar issues (see the tests) [breaking-change], needs crater run (cc @brson or @alexcrichton ) The pattern with parens `UnitVariant(..)` for unit variants seems to be popular in rustc (see the second commit), but mostly used by one person (@nikomatsakis), according to git blame. If it causes breakage on crates.io I'll add an exceptional case for it.
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-24Use the EntryOrExit variants qualified.Ms2ger-3/+2
2015-11-19Fix the falloutVadim Petrochenkov-12/+12
2015-11-18Port a bunch of code new-visitor; all of these ports wereNiko Matsakis-10/+10
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-16ImplItem_ -> ImplItemKind renameOliver Schneider-1/+1
2015-11-16rename ImplItem_::*ImplItem to ImplItem_::*Oliver Schneider-1/+1
[breaking change]
2015-11-14Stop using dynamic borrowing in MoveErrorCollectorJonathan S-13/+12
2015-11-10Suggest `mut` for mutability errorsSeo Sanghyeon-1/+12
2015-10-29Rename categorization and stop re-exporting its variants.Ms2ger-58/+65
2015-10-27Auto merge of #28833 - jryans:borrowck-linear-errors, r=pnkfelixbors-8/+10
Change error reporting of conflicting loans to stop earlier after printing an error for a given borrow, instead of proceeding to error on possibly every issued loan. This keeps us down to O(n) errors (for n problem lines), instead of O(n^2) errors in some cases. Fixes #27485.
2015-10-08typos: fix a grabbag of typos all over the placeCristi Cobzarenco-2/+2
2015-10-04Only report error for first issued loan with conflictJ. Ryan Stinnett-8/+10
Change error reporting of conflicting loans to stop earlier after printing an error for a given borrow, instead of proceeding to error on possibly every issued loan. This keeps us down to O(n) errors (for n problem lines), instead of O(n^2) errors in some cases. Fixes #27485.
2015-10-01move direct accesses of `node` to go through `as_local_node_id`, unlessNiko Matsakis-2/+1
they are being used as an opaque "position identifier"
2015-10-01move LOCAL_CRATE to cstoreNiko Matsakis-1/+2
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-2/+0
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-5/+5
2015-09-19Add librustc_trans error codesGuillaume Gomez-1/+1
2015-09-18Add url to rust-bookGuillaume Gomez-7/+11
2015-09-17Add span_err_with_code method for BorrowckCtxt structGuillaume Gomez-0/+4
2015-09-16Add error codes for librustc_borrowckGuillaume Gomez-54/+81
2015-09-16Use ast attributes every where (remove HIR attributes).Nick Cameron-1/+1
This could be a [breaking-change] if your lint or syntax extension (is that even possible?) uses HIR attributes or literals.
2015-09-09Treat loans of 'static data as extending to the end of the enclosingNiko Matsakis-11/+1
fn. Fixes #27616.
2015-09-03Add an intital HIR and lowering stepNick Cameron-46/+55
2015-08-31Auto merge of #28007 - Ms2ger:FnKind, r=nrcbors-3/+3
There is no longer a need for that pattern, since enums are now qualified.
2015-08-26Rename FnKind variants and stop re-exporting them from the visit module.Ms2ger-3/+3
There is no longer a need for that pattern, since enums are now qualified.
2015-08-25move destructors_for_type into AdtDefAriel Ben-Yehuda-3/+3
2015-08-24store the CodeExtent directly in FreeRegionAriel Ben-Yehuda-3/+1
this makes the code cleaner
2015-08-24Use a Vec instead of an HashMap for the scope hierarchyAriel Ben-Yehuda-26/+31
This increases regionck performance greatly - type-checking on librustc decreased from 9.1s to 8.1s. Because of Amdahl's law, total performance is improved only by about 1.5% (LLVM wizards, this is your opportunity to shine!). before: 576.91user 4.26system 7:42.36elapsed 125%CPU (0avgtext+0avgdata 1142192maxresident)k after: 566.50user 4.84system 7:36.84elapsed 125%CPU (0avgtext+0avgdata 1124304maxresident)k I am somewhat worried really need to find out why we have this Red Queen's Race going on here. Originally I suspected it may be a problem from RFC1214's warnings, but it seems to be an effect from other changes. However, the increase seems to be mostly in LLVM's time, so I guess it's the LLVM wizards' problem.
2015-08-24split ReInfer into ReVar and ReSkolemizedAriel Ben-Yehuda-1/+2
this should reduce the size of ty::Region to 24 bytes (from 32), and they are treated differently in most cases anyway.
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`.