about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2016-03-06Refactor away `ExternalExports`Jeffrey Seyfried-31/+3
2016-03-06Fix #21670Jeffrey Seyfried-1/+2
2016-03-06Add method `visibility` to `CrateStore`Jeffrey Seyfried-0/+11
2016-03-06Auto merge of #31920 - jseyfried:fix_spurious_privacy_error, r=nikomatsakisbors-73/+67
This PR allows using methods from traits that are visible but are defined in an inaccessible module (fixes #18241). For example, ```rust mod foo { pub use foo::bar::Tr; mod bar { // This module is inaccessible from `g` pub trait Tr { fn f(&self) {} } } } fn g<T: foo::Tr>(t: T) { t.f(); // Currently, this is a privacy error even though `foo::Tr` is visible } ``` After this PR, it will continue to be a privacy error to use a method from a trait that is not visible. This can happen when a public trait inherits from a private trait (in violation of the `public_in_private` lint) -- see @petrochenkov's example in #28504. r? @nikomatsakis
2016-03-05Auto merge of #31889 - alexcrichton:update-jemalloc-again, r=nikomatsakisbors-40/+28
Now that https://github.com/jemalloc/jemalloc/commit/767d85061a6fb88ec977bbcd9b429a43aff391e6 is upstream, the relevant deadlocking issue which prompted our downgrade has been resolved. As a result, there's no known issue to *not* upgrade! This also re-enables jemalloc for the pc-windows-gnu target as known issues with that have also been fixed. Closes #31030
2016-03-05Auto merge of #31726 - jseyfried:improve_import_resolution, r=nikomatsakisbors-305/+388
This PR improves the import resolution algorithm. First, it records that an import succeeded or failed for one namespace (by calling `decrement_outstanding_references_for` and `try_define_child` if successful) even if it is still indeterminate in the other namespace, fixing #31444. Second, it starts importing bindings from globs as soon as the glob path is determined. It maintains links from imported modules to their importers so that when a resolution becomes successful in an imported module, a corresponding binding will be added to the importer module. It also maintains links from importer modules to imported modules so that we can determine if an undefined name is indeterminate or failing by recursively checking this in the imported modules. This allows, for example: ```rust mod foo { pub mod baz {} pub use bar::baz::*; } mod bar { pub use foo::*; } ``` It also allows cycles of pub glob imports, although by to the current shadowing rules, the only way for such a cycle to compile is if each participating module defines no names. Incidentally, this PR lays the groundwork for more permissive feature-gated shadowing rules. Finally, this PR encapsulates almost all implementation details of import resolution in `resolve_imports` (some of which used to be in `lib.rs`) and refactors reexport recording, shadowed trait collecting, some duplicate checking, and the `private_in_public` lint out of the core import resolution algorithm and into a post-processing pass in `resolve_imports`. r? @nrc
2016-03-05Auto merge of #31700 - oli-obk:skip_double_ended, r=alexcrichtonbors-0/+49
[Playground Example](https://play.rust-lang.org/?gist=66fdb4fe1cf4d8aa2ad4&version=stable)
2016-03-04Auto merge of #32046 - steveklabnik:rollup, r=steveklabnikbors-5/+34
- Successful merges: #32002, #32017, #32027, #32035, #32036 - Failed merges:
2016-03-04Finish encapsulating the details of import resolution in resolve_importsJeffrey Seyfried-79/+31
2016-03-04Refactor away defineJeffrey Seyfried-12/+6
2016-03-04Start importing bindings from globs as soon as the glob path is known.Jeffrey Seyfried-128/+232
2016-03-04Add a field in Module for the ResolverArenasJeffrey Seyfried-27/+39
2016-03-04Add an arena for import directivesJeffrey Seyfried-9/+18
2016-03-04Record that an import succeeded or failed in one namespace even while it is ↵Jeffrey Seyfried-74/+86
indeterminate in the other namespace (fixes #31444)
2016-03-04Rollup merge of #32036 - Seeker14491:patch-1, r=steveklabnikSteve Klabnik-1/+1
To me it was unclear whether 'it' referred to the fold function, or the closure.
2016-03-04Rollup merge of #32035 - ubsan:master, r=blussSteve Klabnik-2/+0
Just take out the `NOTE` and the `#[allow(improper_ctypes)]`
2016-03-04Rollup merge of #32027 - japaric:rustbuild-mips, r=alexcrichtonSteve Klabnik-2/+2
These targets don't link statically to libunwind or libc --- r? @alexcrichton
2016-03-04Rollup merge of #32017 - brson:ignoretest, r=nikomatsakisSteve Klabnik-0/+1
2016-03-04Rollup merge of #32002 - srinivasreddy:vector_doc, r=ManishearthSteve Klabnik-0/+30
Issue here : https://github.com/rust-lang/rust/issues/31991
2016-03-04Don't treat associated types specially in `def_privacy`Jeffrey Seyfried-13/+7
Improve trait privacy error message
2016-03-04Add testJeffrey Seyfried-0/+30
2016-03-04privacy: change def_privacy so that it checks for visiblity instead of ↵Jeffrey Seyfried-68/+38
nameability
2016-03-04test: Clean up alloc_jemalloc usage in testsAlex Crichton-36/+28
Right now there's just a smattering of `// ignore-foo` platforms which is ever expanding as new ones are added. Instead switch to only running these tests on Linux/OSX and then use a guaranteed-to-work but not-as-well-tested alternative on other platforms.
2016-03-04std: Update jemalloc again to the 4.* trackAlex Crichton-4/+0
2016-03-04Auto merge of #32039 - arielb1:pat-enum, r=nagisabors-47/+58
Fixes #32004 r? @eddyb
2016-03-04Auto merge of #32032 - arielb1:load-const, r=eddybbors-9/+36
Fixes #30891 r? @eddyb
2016-03-04don't treat unit patterns as wildcard patternsAriel Ben-Yehuda-1/+30
Fixes #32004
2016-03-04Auto merge of #32022 - gohyda:master, r=alexcrichtonbors-3/+7
- Empty `.sidebar .location` caused "grey line" on top of the documentation page (under 700px) fixed. - `.sidebar .location` appearance improvement in responsive mode.
2016-03-04clean up check_pat_enumAriel Ben-Yehuda-46/+28
2016-03-04make skip a double ended iteratorOliver Schneider-0/+49
2016-03-04Clarify ambiguous wording in fold() docsBrian Bowman-1/+1
To me it was unclear whether 'it' referred to the fold function, or the closure.
2016-03-04Auto merge of #32006 - jseyfried:fix_expanded_mod_path, r=nikomatsakisbors-4/+113
This PR changes the search paths for macro-expanded non-inline modules so that they match ordinary non-inline modules (fixes #31624). This is a [breaking-change]. Right now, the search paths for a macro-expanded non-inline module are computed as if the module were declared in the top level of the file in which the macro was defined. For example, consider `./foo/mod.rs`: ```rust mod inconsequential { // moving the macro outside this module wouldn't change anything macro_rules! mod_decl { ($i:ident) => { mod $i; } } } ``` and `./lib.rs`: ```rust mod foo; mod bar { mod_decl!(baz); //^ Now, rustc expects `./foo/baz.rs` (or `./foo/baz/mod.rs`) //| After this PR, rustc will expect `./bar/baz.rs` (or `./bar/baz/mod.rs`) } ``` r? @alexcrichton
2016-03-04Auto merge of #31945 - sfackler:net2, r=alexcrichtonbors-4/+733
I have these tagged as stable in 1.9, so this shouldn't merge until the 1.8 beta's cut.
2016-03-03`usize` is now a proper ctype, so fix cmp_sliceubsan-2/+0
2016-03-04truncate i8-s to i1-s when loading constantsAriel Ben-Yehuda-9/+36
Fixes #30891
2016-03-03Auto merge of #31671 - ranma42:printcfg, r=alexcrichtonbors-3/+14
Show `cfg` as possible argument to `--print` and make it so that `--print cfg` also outputs the `target_feature`s. Should I also extend `src/test/run-make/print-cfg/Makefile` to check that `target_feature`s are actually printed?
2016-03-03Auto merge of #31797 - apasel422:issue-28950, r=alexcrichtonbors-28/+27
Closes #28950. r? @eddyb
2016-03-03[rustbuild] fix cross compilation of std for mips(el)-linux-muslJorge Aparicio-2/+2
These targets don't link statically to libunwind or libc
2016-03-03Fix netbsdSteven Fackler-4/+4
2016-03-03Auto merge of #32007 - nikomatsakis:compiletest-incremental, r=alexcrichtonbors-228/+498
This PR extends compiletest to support **test revisions** and with a preliminary **incremental testing harness**. run-pass, compile-fail, and run-fail tests may be tagged with ``` // revisions: a b c d ``` This will cause the test to be re-run four times with `--cfg {a,b,c,d}` in turn. This means you can write very closely related things using `cfg`. You can also configure the headers/expected-errors by writing `//[foo] header: value` or `//[foo]~ ERROR bar`, where `foo` is the name of your revision. See the changes to `coherence-cow.rs` as a proof of concept. The main point of this work is to support the incremental testing harness. This PR contains an initial, unused version. The code that uses it will land later. The incremental testing harness compiles each revision in turn, and requires that the revisions have particular names (e.g., `rpass2`, `cfail3`), which tell it whether a particular revision is expected to compile or not. Two questions: - Is there compiletest documentation anywhere I can update? - Should I hold off on landing the incremental testing harness until I have the code to exercise it? (That will come in a separate PR, still fixing a few details) r? @alexcrichton cc @rust-lang/compiler <-- new testing capabilities
2016-03-03added ignoresrinivasreddy-1/+1
2016-03-03Fix android buildSteven Fackler-3/+3
2016-03-03mention caveat about should-fail in docsNiko Matsakis-1/+1
2016-03-03make pretty printer tests understand revisions, and make them ignore theNiko Matsakis-20/+32
should-fail annotation
2016-03-03Auto merge of #31979 - jseyfried:rename_ctxt, r=eddybbors-706/+703
r? @eddyb
2016-03-03Do not assert revisions list is empty for pretty printing testsNiko Matsakis-1/+5
2016-03-03Hide gated cfg attributes from the output of `--print cfg`Andrea Canciani-1/+10
Gated cfg attributes are not available on the stable and beta release channels, therefore they should not be presented to users of those channels in order to avoid confusion.
2016-03-03Auto merge of #32012 - bluss:more-drop-in-place, r=alexcrichtonbors-12/+13
Use `drop_in_place` in Vec and VecDeque We can use drop_in_place's DST capabilities directly in Vec::drop and similarly in VecDeque::drop. I verfied this has the same effect as the previous `needs_drop` code; `drop_in_place` it itself an intrinsic. The VecDeque replacement should be more efficient too, even in release mode (slice iteration makes a more efficient loop than the deque iterator).
2016-03-03Rename middle::ty::ctxt to TyCtxtJeffrey Seyfried-706/+703
2016-03-02Fix comments and OSX buildSteven Fackler-5/+30