summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2015-10-23improve Scope to print node-ids etcNiko Matsakis-1/+18
2015-10-23distinguish projections from the env/obj-types vs those fromNiko Matsakis-12/+62
trait definitions, and give prefence to the former. This is consistent with what we do for selection. It also works around a limitation that was leading to #28871.
2015-10-16use the infcx tables to check if a closure is CopyAriel Ben-Yehuda-1/+8
Fixes #28550
2015-10-16don't crash when there are multiple conflicting implementations of DropAriel Ben-Yehuda-1/+0
Fixes #28568
2015-10-16remove the destructors tableAriel Ben-Yehuda-14/+9
Conflicts: src/librustc_lint/builtin.rs
2015-10-16show each object-safety violation onceAriel Ben-Yehuda-3/+22
different supertraits can suffer from the same object-safety violation, leading to duplication in the error message. Avoid it. Fixes #20692
2015-10-16deduplicate trait errors before they are displayedAriel Ben-Yehuda-1/+41
Because of type inference, duplicate obligations exist and cause duplicate errors. To avoid this, only display the first error for each (predicate,span). The inclusion of the span is somewhat bikesheddy, but *is* the more conservative option (it does not remove some instability, as duplicate obligations are ignored by `duplicate_set` under some inference conditions). Fixes #28098 cc #21528 (is it a dupe?)
2015-09-15Auto merge of #28413 - arielb1:deduplication, r=eddybbors-124/+126
clean a few things discovered during my split_ty work r? @eddyb
2015-09-15Auto merge of #28393 - arielb1:required-because-it-appears, r=nikomatsakisbors-41/+46
new error style: ``` path.rs:4:6: 4:7 error: the trait `core::marker::Sized` is not implemented for the type `[u8]` [E0277] path.rs:4 fn f(p: Path) {} ^ path.rs:4:6: 4:7 help: run `rustc --explain E0277` to see a detailed explanation path.rs:4:6: 4:7 note: `[u8]` does not have a constant size known at compile-time path.rs:4:6: 4:7 note: required because it appears within the type `std::sys::os_str::Slice` path.rs:4:6: 4:7 note: required because it appears within the type `std::ffi::os_str::OsStr` path.rs:4:6: 4:7 note: required because it appears within the type `std::path::Path` path.rs:4:6: 4:7 note: all local variables must have a statically known size path.rs:7:5: 7:36 error: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>` [E0277] path.rs:7 foo::<BTreeMap<Rc<()>, Rc<()>>>(); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ path.rs:7:5: 7:36 help: run `rustc --explain E0277` to see a detailed explanation path.rs:7:5: 7:36 note: `alloc::rc::Rc<()>` cannot be sent between threads safely path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::node::Node<alloc::rc::Rc<()>, alloc::rc::Rc<()>>` path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::map::BTreeMap<alloc::rc::Rc<()>, alloc::rc::Rc<()>>` path.rs:7:5: 7:36 note: required by `foo` error: aborting due to 2 previous errors ``` Fixes #21793 Fixes #23286 r? @nikomatsakis
2015-09-15Auto merge of #28274 - arielb1:split-ty, r=nikomatsakisbors-8303/+8550
That file got way too big for its own good. It could be split more - this is just a start. r? @nikomatsakis
2015-09-15deduplicate erase_regionsAriel Ben-Yehuda-108/+120
there is no need for 3 versions of the function
2015-09-14use RegionEscape instead of inherent has_escaping_regions fnsAriel Ben-Yehuda-16/+6
2015-09-14split ty::util and ty::adjustmentAriel Ben-Yehuda-1264/+1310
2015-09-14move traits structural impls to traits::structural_implsAriel Ben-Yehuda-226/+238
2015-09-14split ty.rs into smaller partsAriel Ben-Yehuda-4056/+4253
2015-09-14move middle::ty and related modules to middle/ty/Ariel Ben-Yehuda-92/+84
2015-09-14Auto merge of #28396 - arielb1:misplaced-binding, r=eddybbors-18/+23
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682 r? @eddyb
2015-09-14Auto merge of #28392 - arielb1:sort-bounds-list, r=eddybbors-3/+17
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377 r? @eddyb
2015-09-13Auto merge of #28178 - christopherdumas:fix_ice, r=nikomatsakisbors-2/+2
This fixes the ICE, and makes it just a compiler error/warning. I'm not exactly sure that's whats wanted, so tell me if it isn't.
2015-09-13ensure projections are prohibited when type parameters areAriel Ben-Yehuda-18/+23
Technically a [breaking-change], but the broken code is useless, like `i32<Param=()>`. Fixes #24682
2015-09-13don't duplicate the code snippet in the "trait unimplemented" errorAriel Ben-Yehuda-41/+46
new error style: ``` path.rs:4:6: 4:7 error: the trait `core::marker::Sized` is not implemented for the type `[u8]` [E0277] path.rs:4 fn f(p: Path) {} ^ path.rs:4:6: 4:7 help: run `rustc --explain E0277` to see a detailed explanation path.rs:4:6: 4:7 note: `[u8]` does not have a constant size known at compile-time path.rs:4:6: 4:7 note: required because it appears within the type `std::sys::os_str::Slice` path.rs:4:6: 4:7 note: required because it appears within the type `std::ffi::os_str::OsStr` path.rs:4:6: 4:7 note: required because it appears within the type `std::path::Path` path.rs:4:6: 4:7 note: all local variables must have a statically known size path.rs:7:5: 7:36 error: the trait `core::marker::Send` is not implemented for the type `alloc::rc::Rc<()>` [E0277] path.rs:7 foo::<BTreeMap<Rc<()>, Rc<()>>>(); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ path.rs:7:5: 7:36 help: run `rustc --explain E0277` to see a detailed explanation path.rs:7:5: 7:36 note: `alloc::rc::Rc<()>` cannot be sent between threads safely path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::node::Node<alloc::rc::Rc<()>, alloc::rc::Rc<()>>` path.rs:7:5: 7:36 note: required because it appears within the type `collections::btree::map::BTreeMap<alloc::rc::Rc<()>, alloc::rc::Rc<()>>` path.rs:7:5: 7:36 note: required by `foo` error: aborting due to 2 previous errors ``` This improves the #21793/#23286 situation
2015-09-13sort the existential bounds list in tydecodeAriel Ben-Yehuda-3/+17
The sort key is a (DefId, Name), which is *not* stable between runs, so we must re-sort when loading. Fixes #24063 Fixes #25467 Fixes #27222 Fixes #28377
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-10Fix ICE per #28172christopherdumas-2/+2
2015-09-09Auto merge of #28300 - Manishearth:crate_err, r=eddybbors-12/+67
Partially fixes #22750 I'll write a test for this when I figure out how to. r? @eddyb cc @steveklabnik
2015-09-09Print correct crate nameManish Goregaokar-1/+3
2015-09-09Fix fixme, add crate checkManish Goregaokar-2/+2
2015-09-08Use 'a different' for trait object mismatches tooManish Goregaokar-12/+17
2015-09-08Handle trait objectsManish Goregaokar-15/+26
2015-09-08Add note for when a type error comes from similarly named objects from two ↵Manish Goregaokar-0/+37
different crate of the same name (#22750)
2015-09-08Auto merge of #28246 - huonw:lang-tracking-issues, r=alexcrichtonbors-9/+5
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-09-08Allow tracking issues for lang features.Huon Wilson-9/+5
This is similar to the libs version, which allow an `issue` field in the `#[unstable]` attribute. cc #28244
2015-09-06fix EUV delegate to take advantage of defaults. This alsoNiko Matsakis-1/+1
works around a stage0 bug that has since been fixed.
2015-09-06add -Z always-build-mir optionNiko Matsakis-0/+6
2015-09-06add MIR code (unused thus far)Niko Matsakis-8/+15
2015-09-06extract autoderef type adjustment code into a reusableNiko Matsakis-22/+39
helper
2015-09-06move fnv hashing support into librustc_data_structuresNiko Matsakis-37/+2
2015-09-06track, for each upvar, its index in list of upvarsNiko Matsakis-4/+5
2015-09-05Auto merge of #28190 - arielb1:generic-key-entry, r=eddybbors-2/+6
Fixes #28181 This may fix #28151 r? @pnkfelix
2015-09-05Rollup merge of #28231 - GuillaumeGomez:help_note, r=ManishearthManish Goregaokar-4/+19
r? @Manishearth
2015-09-05Add erroneous code example for E0010Guillaume Gomez-3/+15
2015-09-04Auto merge of #28227 - birkenfeld:use_filter_map, r=alexcrichtonbors-3/+2
2015-09-04Add span_help for E0002Guillaume Gomez-1/+4
2015-09-04Auto merge of #28201 - apasel422:issue-26205, r=nikomatsakisbors-7/+26
Closes #26205. r? @eddyb
2015-09-04Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichtonbors-4/+4
r? @alexcrichton
2015-09-04Auto merge of #28220 - steveklabnik:rollup, r=steveklabnikbors-5/+5
- Successful merges: #28167, #28202, #28203, #28204, #28205, #28207, #28208, #28209, #28210, #28212, #28213, #28214, #28215, #28216 - Failed merges:
2015-09-03Rollup merge of #28167 - petrochenkov:bytelit, r=nikomatsakisSteve Klabnik-5/+5
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-04Auto merge of #27984 - arielb1:misc-assemble-improvements, r=nikomatsakisbors-31/+36
this resolves type-variables early in assemble_candidates and bails out quickly if the self type is an inference variable (which would fail anyway because of `assemble_candidates_from_projected_tys`). In both these cases, `assemble_candidates_from_impls` would try to go over all impls and match them, leading to O(`n*m`) performance. Fixing this improves rustc type-checking performance by 10%. As type-checking is only is 5% of compilation, this doesn't impact bootstrap times, but *does* improve type-error-detection time which is nice. Crates that have many dependencies and contain significant amounts of generic functions could see a bigger perf boost. As a microbenchmark, the crate generated by ``` echo '#![feature(rustc_private)]' echo 'extern crate rustc_driver;' for i in {1..1000}; do cat << _EOF_ pub fn foo$i<T>() { let mut v = Vec::new(); let _w = v.clone(); v.push(""); } _EOF_ done ``` sees performance improve from 7.2 to 1.4 seconds. I imagine many crates would fall somewhere in-between. r? @nikomatsakis
2015-09-04Rollup merge of #28194 - steveklabnik:add_fixme, r=alexcrichtonManish Goregaokar-1/+1
2015-09-03Fix multiple mutable autoderefs with `Box`Andrew Paseltiner-7/+26
Closes #26205.