summary refs log tree commit diff
path: root/src/librustc
AgeCommit message (Collapse)AuthorLines
2017-01-07Merge pull request #38884 from nikomatsakis/beta-unmergedAlex Crichton-1/+2
More beta backports
2017-01-06fix help for the --print optionDoug Goldstein-1/+2
Since 8285ab5c99, which was merged in with #38061, the help for the --print option is missing the surrounding [ ] around the possible options. Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
2017-01-06Revert "Update for changes to TraitItem on master."Niko Matsakis-3/+3
This reverts commit 1d23be75b95b1dad318020fcf110836a7f17fc80.
2017-01-06Update for changes to TraitItem on master.Eduard-Mihai Burtescu-3/+3
2017-01-06Don't leak the compiler's internal representation of scopes in error messages.Eduard-Mihai Burtescu-15/+41
2017-01-06rebase: remove `tcx` from `associated_item`Niko Matsakis-6/+5
2017-01-06Dont check stability for items that are not pub to universe.Felix S. Klock II-1/+36
Includes special case handling for trait methods. Fix #38412.
2016-12-30Demote most backwards incompatible ambiguity errors from RFC 1560 to warnings.Jeffrey Seyfried-0/+7
2016-12-30Disable field reorderingAustin Hicks-0/+4
2016-12-29Remove --crate-type=metadata from betaNick Cameron-2/+2
Leaves most of the implementation, just ignores the argument itself.
2016-12-18Auto merge of #38051 - sanxiyn:unused-type-alias-3, r=eddybbors-18/+6
Warn unused type aliases, reimplemented Reimplementation of #37631. Fix #37455.
2016-12-18Auto merge of #38369 - aturon:stab-1.15, r=alexcrichtonbors-11/+6
Library stabilizations/deprecations for 1.15 release Stabilized: - `std::iter::Iterator::{min_by, max_by}` - `std::os::*::fs::FileExt` - `std::sync::atomic::Atomic*::{get_mut, into_inner}` - `std::vec::IntoIter::{as_slice, as_mut_slice}` - `std::sync::mpsc::Receiver::try_iter` - `std::os::unix::process::CommandExt::before_exec` - `std::rc::Rc::{strong_count, weak_count}` - `std::sync::Arc::{strong_count, weak_count}` - `std::char::{encode_utf8, encode_utf16}` - `std::cell::Ref::clone` - `std::io::Take::into_inner` Deprecated: - `std::rc::Rc::{would_unwrap, is_unique}` - `std::cell::RefCell::borrow_state` Closes #23755 Closes #27733 Closes #27746 Closes #27784 Closes #28356 Closes #31398 Closes #34931 Closes #35601 Closes #35603 Closes #35918 Closes #36105
2016-12-18Auto merge of #37429 - camlorn:univariant_layout_optimization, r=eddybbors-125/+312
struct field reordering and optimization This is work in progress. The goal is to divorce the order of fields in source code from the order of fields in the LLVM IR, then optimize structs (and tuples/enum variants)by always ordering fields from least to most aligned. It does not work yet. I intend to check compiler memory usage as a benchmark, and a crater run will probably be required. I don't know enough of the compiler to complete this work unaided. If you see places that still need updating, please mention them. The only one I know of currently is debuginfo, which I'm putting off intentionally until a bit later. r? @eddyb
2016-12-17rustbuild: Fix LC_ID_DYLIB directives on OSXAlex Crichton-0/+2
Currently libraries installed by rustbuild on OSX have an incorrect `LC_ID_DYLIB` directive located in the dynamic libraries that are installed. The directive we expect looks like: @rpath/libstd.dylib Which means that if you want to find that dynamic library you should look at the dylib's other `@rpath` directives. Typically our `@rpath` directives look like `@loader_path/../lib` for the compiler as that's where the installed libraries will be located. Currently, though, rustbuild produces dylibs with the directive that looks like: /Users/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-mac/build/build/x86_64-apple-darwin/stage1-std/x86_64-apple-darwin/release/deps/libstd-713ad88203512705.dylib In other words, the build directory is encoded erroneously. The compiler already [knows how] to change this directive, but it only passes that argument when `-C rpath` is also passed. The rustbuild system, however, explicitly [does not pass] this option explicitly and instead bakes its own. This logic then also erroneously didn't pass `-Wl,-install_name` like the compiler. [knows how]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/librustc_trans/back/linker.rs#L210-L214 [does not pass]: https://github.com/rust-lang/rust/blob/4a008cccaabc8b3fe65ccf5868b9d16319c9ac58/src/bootstrap/bin/rustc.rs#L133-L158 To fix this regression this patch introduces a new `-Z` flag, `-Z osx-rpath-install-name` which basically just forces the compiler to take the previous `-install_name` branch when creating a dynamic library. Hopefully we can sort out a better rpath story in the future, but for now this "hack" should suffice in getting our nightly builds back to the same state as before. Closes #38430
2016-12-16Address falloutAaron Turon-11/+6
2016-12-16Incorporate review comments.Austin Hicks-9/+7
2016-12-15Use StableHasher everywhereAriel Ben-Yehuda-91/+19
The standard implementations of Hasher have architecture-dependent results when hashing integers. This causes problems when the hashes are stored within metadata - metadata written by one host architecture can't be read by another. To fix that, implement an architecture-independent StableHasher and use it in all places an architecture-independent hasher is needed. Fixes #38177.
2016-12-15Warn unused type aliasesSeo Sanghyeon-0/+1
2016-12-15Remove now unnecessary codeSeo Sanghyeon-18/+5
This code was introduced in #27565 to mark types in paths alive. It is now unnecessary since #37676.
2016-12-14Fix computation of enum names based off the discrfield in the case of the ↵Austin Hicks-17/+29
null pointer optimization. This functionality is needed by pretty printers for gdb and lldb.
2016-12-14Fix error introduced during last rebaseAustin Hicks-1/+1
2016-12-14Fix -Z print-type-sizes and tests.Austin Hicks-1/+6
This was done by sorting the fields by increasing offset; as a consequence, the order of -Z print-type-sizes matches memory order not source order.
2016-12-14Incorporate review commentsAustin Hicks-13/+7
2016-12-14Some small fixes to how structs/enums are optimizedAustin Hicks-2/+2
2016-12-14Make tidyAustin Hicks-1/+1
2016-12-14Fix having multiple reprs on the same type.Austin Hicks-53/+79
This bug has applied to master for an indefinite period of time and is orthogonal to univariant layout optimization.
2016-12-14Make tidyAustin Hicks-8/+17
2016-12-14Fix checking to see if the last field of a struct can be unsized.Austin Hicks-1/+1
2016-12-14Don't optimize pairsAustin Hicks-2/+7
2016-12-14First attempt at detecting if structs can ever be unsizedAustin Hicks-2/+14
2016-12-14Use an enum to differentiate between kinds of structs.Austin Hicks-30/+61
2016-12-14Make tidyAustin Hicks-7/+18
2016-12-14Struct::new takes a vec, avoiding double allocation in some casesAustin Hicks-18/+19
2016-12-14Incorporate a bunch of review comments.Austin Hicks-56/+43
2016-12-14Fix bugs to optimizing enums:Austin Hicks-3/+8
- The discriminant must be first in all variants. - The loop responsible for patching enum variants when the discriminant is enlarged was nonfunctional.
2016-12-14Optimize anything using a layout::Struct by introducing a mapping from ↵Austin Hicks-62/+153
source code field order to in-memory field order and sorting by alignment.
2016-12-12incr.comp.: Avoid creating an edge to DepNode::Krate when generating ↵Michael Woerister-3/+4
debuginfo namespaces.
2016-12-12Auto merge of #38307 - bluss:mir-opt-level, r=eddybbors-8/+3
Simplify use of mir_opt_level Remove the unused top level option by the same name, and retain the debug option. Use -Zmir-opt-level=1 as default. One pass is enabled by default but wants to be optional: - Instcombine requires mir_opt_level > 0 Copy propagation is not used by default, but used to be activated by explicit -Zmir-opt-level=1. It must move one higher to be off by default: - CopyPropagation requires mir_opt_level > 1 Deaggregate is not used by default, and used to be on a different level than CopyPropagation: - Deaggreate requires mir_opt_level > 2
2016-12-12Auto merge of #38057 - KiChjang:display-formal-type-param, r=nikomatsakisbors-19/+88
Display better error messages for E0282 Fixes #36554.
2016-12-11Simplify use of mir_opt_levelUlrik Sverdrup-8/+3
Remove the unused top level option by the same name, and retain the debug option. Use -Zmir-opt-level=1 as default. One pass is enabled by default but wants to be optional: - Instcombine requires mir_opt_level > 0 Copy propagation is not used by default, but used to be activated by explicit -Zmir-opt-level=1. It must move one higher to be off by default: - CopyPropagation requires mir_opt_level > 1 Deaggregate is not used by default, and used to be on a different level than CopyPropagation: - Deaggreate requires mir_opt_level > 2
2016-12-11Auto merge of #38249 - arielb1:special-substs, r=nikomatsakisbors-0/+1
erase lifetimes when translating specialized substs Projections can generate lifetime variables with equality constraints, that will not be resolved by `resolve_type_vars_if_possible`, so substs need to be lifetime-erased after that. Fixes #36848.
2016-12-11Auto merge of #38250 - michaelwoerister:trait-methods-in-reachable, ↵bors-3/+22
r=alexcrichton Consider provided trait methods in middle::reachable Fixes https://github.com/rust-lang/rust/issues/38226 by also considering trait methods with default implementation instead of just methods provided in an impl. r? @alexcrichton cc @panicbit
2016-12-10Auto merge of #38217 - oli-obk:mir-for-all-and-all-for-mir, r=eddybbors-0/+10
add a -Z flag to guarantee that MIR is generated for all functions r? @eddyb cc @solson
2016-12-09move the check for instantiation from metadata encoding to the actual ↵Oliver Schneider-0/+8
decision site before it was assumed that anything that had a MIR was fair game for local instatiation
2016-12-08Extend middle::reachable to also consider provided trait methods.Michael Woerister-3/+22
2016-12-07Auto merge of #38191 - oli-obk:clippy_is_sad, r=eddybbors-96/+128
annotate stricter lifetimes on LateLintPass methods to allow them to forward to a Visitor this unblocks clippy (rustup blocked after #37918) clippy has lots of lints that internally call an `intravisit::Visitor`, but the current lifetimes on `LateLintPass` methods conflicted with the required lifetimes (there was no connection between the HIR elements and the `TyCtxt`) r? @Manishearth
2016-12-07add a -Z flag to guarantee that MIR is generated for all functionsOliver Schneider-0/+2
2016-12-07remove useless lifetime outlives boundsOliver Schneider-96/+75
2016-12-06Auto merge of #37973 - vadimcn:dllimport, r=alexcrichtonbors-27/+56
Implement RFC 1717 Implement the first two points from #37403. r? @alexcrichton
2016-12-06annotate stricter lifetimes on LateLintPass methods to allow them to forward ↵Oliver Schneider-93/+146
to a Visitor