about summary refs log tree commit diff
path: root/src/test/auxiliary
AgeCommit message (Collapse)AuthorLines
2016-03-06Split out rustdoc pass to strip private importsmitaa-0/+9
2016-03-04Add Pass manager for MIRSimonas Kazlauskas-4/+5
2016-03-03Auto merge of #31824 - jseyfried:privacy_in_resolve, r=nikomatsakisbors-2/+2
This PR privacy checks paths as they are resolved instead of in `librustc_privacy` (fixes #12334 and fixes #31779). This removes the need for the `LastPrivate` system introduced in PR #9735, the limitations of which cause #31779. This PR also reports privacy violations in paths to intra- and inter-crate items the same way -- it always reports the first inaccessible segment of the path. Since it fixes #31779, this is a [breaking-change]. For example, the following code would break: ```rust mod foo { pub use foo::bar::S; mod bar { // `bar` should be private to `foo` pub struct S; } } impl foo::S { fn f() {} } fn main() { foo::bar::S::f(); // This is now a privacy error } ``` r? @alexcrichton
2016-02-29std: Stabilize APIs for the 1.8 releaseAlex Crichton-7/+1
This commit is the result of the FCPs ending for the 1.8 release cycle for both the libs and the lang suteams. The full list of changes are: Stabilized * `braced_empty_structs` * `augmented_assignments` * `str::encode_utf16` - renamed from `utf16_units` * `str::EncodeUtf16` - renamed from `Utf16Units` * `Ref::map` * `RefMut::map` * `ptr::drop_in_place` * `time::Instant` * `time::SystemTime` * `{Instant,SystemTime}::now` * `{Instant,SystemTime}::duration_since` - renamed from `duration_from_earlier` * `{Instant,SystemTime}::elapsed` * Various `Add`/`Sub` impls for `Time` and `SystemTime` * `SystemTimeError` * `SystemTimeError::duration` * Various impls for `SystemTimeError` * `UNIX_EPOCH` * `ops::{Add,Sub,Mul,Div,Rem,BitAnd,BitOr,BitXor,Shl,Shr}Assign` Deprecated * Scoped TLS (the `scoped_thread_local!` macro) * `Ref::filter_map` * `RefMut::filter_map` * `RwLockReadGuard::map` * `RwLockWriteGuard::map` * `Condvar::wait_timeout_with` Closes #27714 Closes #27715 Closes #27746 Closes #27748 Closes #27908 Closes #29866
2016-02-26Auto merge of #31903 - mitaa:rdoc-ghostly-impls, r=alexcrichtonbors-0/+18
fixes #29584 r? @alexcrichton
2016-02-26Don't inline impls from `doc(hidden)` modulesmitaa-0/+18
2016-02-26Fix fallout in testsJeffrey Seyfried-2/+2
2016-02-25Auto merge of #30856 - mneumann:thread_local_extern, r=alexcrichtonbors-0/+17
This will correctly add the thread_local attribute to the external static variable ```errno```: ```rust extern { #[thread_local] static errno: c_int; } ``` Before this commit, the thread_local attribute is ignored. Fixes #30795. Thanks @alexcrichton for pointing out the solution.
2016-02-25Rollup merge of #31362 - jseyfried:fix_extern_crate_visibility, r=nikomatsakisManish Goregaokar-0/+1
This PR changes the visibility of extern crate declarations to match that of items (fixes #26775). To avoid breakage, the PR makes it a `public_in_private` lint to reexport a private extern crate, and it adds the lint `inaccessible_extern_crate` for uses of an inaccessible extern crate. The lints can be avoided by making the appropriate `extern crate` declaration public.
2016-02-24Fix the visibility of extern crate declarations and stop warning on pub ↵Jeffrey Seyfried-0/+1
extern crate
2016-02-22Fix #[derive] for empty structs with bracesVadim Petrochenkov-1/+1
2016-02-21Run thread-local-extern-static test only on supported platforms.Michael Neumann-1/+2
2016-02-20Fix test case. Needs no_mangle and aux-buildMichael Neumann-0/+2
2016-02-20Auto merge of #31474 - arielb1:mir-typeck, r=nikomatsakisbors-5/+2
This should stop broken MIR from annoying us when we try to implement things
2016-02-20Auto merge of #31674 - VladUreche:issue/21221, r=nikomatsakisbors-0/+51
This commit adds functionality that allows the name resolution pass to search for entities (traits/types/enums/structs) by name, in order to show recommendations along with the errors. For now, only E0405 and E0412 have suggestions attached, as per the request in bug #21221, but it's likely other errors can also benefit from the ability to generate suggestions.
2016-02-20use the FulfillmentContext and InferCtxt more correctlyAriel Ben-Yehuda-5/+2
2016-02-19Add license and feature(thread_local)Michael Neumann-0/+12
2016-02-19Show candidates for names not in scopeVlad Ureche-0/+51
This commit adds functionality that allows the name resolution pass to search for entities (traits/types/enums/structs) by name, in order to show recommendations along with the errors. For now, only E0405 and E0412 have suggestions attached, as per the request in bug #21221, but it's likely other errors can also benefit from the ability to generate suggestions.
2016-02-18Add more tests for unnameable reachable itemsVadim Petrochenkov-23/+116
2016-02-18privacy: Mark reachable but unnameable items as reachableVadim Petrochenkov-0/+23
2016-02-16rustc: Rebase LLVM on the 3.8 release branchAlex Crichton-0/+56
This commit rebases our LLVM submodule on the most recent tip of the `release_38` branch of LLVM. There's been a few fixes and this notably fixes the assertion error in #31702.
2016-02-12Omit src-links for items from extern macrosmitaa-0/+14
If the span of a local item points into an external macro its source-file will be bogus.
2016-02-12Auto merge of #31583 - petrochenkov:indi_ast, r=Manishearthbors-2/+2
cc #31487 plugin-[breaking-change] The AST part of https://github.com/rust-lang/rust/pull/30087 r? @Manishearth
2016-02-11Auto merge of #31545 - dotdash:no_noalias, r=alexcrichtonbors-0/+26
LLVM's memory dependence analysis doesn't properly account for calls that could unwind and thus effectively act as a branching point. This can lead to stores that are only visible when the call unwinds being removed, possibly leading to calls to drop() functions with b0rked memory contents. As there is no fix for this in LLVM yet and we want to keep compatibility to current LLVM versions anyways, we have to workaround this bug by omitting the noalias attribute on &mut function arguments. Benchmarks suggest that the performance loss by this change is very small. Thanks to @RalfJung for pushing me towards not removing too many noalias annotations and @alexcrichton for helping out with the test for this bug. Fixes #29485
2016-02-11Remove some unnecessary indirection from AST structuresVadim Petrochenkov-2/+2
2016-02-11[breaking-change] don't glob export ast::MetaItem_Oliver 'ker' Schneider-2/+2
2016-02-11[breaking-change] don't glob export ast::Item_ variantsOliver 'ker' Schneider-3/+3
2016-02-11[breaking-change] don't glob export ast::BinOp_Oliver Schneider-2/+2
2016-02-10Workaround LLVM optimizer bug by not marking &mut pointers as noaliasBjörn Steinbrink-0/+26
LLVM's memory dependence analysis doesn't properly account for calls that could unwind and thus effectively act as a branching point. This can lead to stores that are only visible when the call unwinds being removed, possibly leading to calls to drop() functions with b0rked memory contents. As there is no fix for this in LLVM yet and we want to keep compatibility to current LLVM versions anyways, we have to workaround this bug by omitting the noalias attribute on &mut function arguments. Benchmarks suggest that the performance loss by this change is very small. Thanks to @RalfJung for pushing me towards not removing too many noalias annotations and @alexcrichton for helping out with the test for this bug. Fixes #29485
2016-02-09Allow registering MIR-passes through compiler pluginsOliver Schneider-0/+52
2016-01-30Auto merge of #30448 - alexcrichton:llvmup, r=nikomatsakisbors-0/+27
These commits perform a few high-level changes with the goal of enabling i686 MSVC unwinding: * LLVM is upgraded to pick up the new exception handling instructions and intrinsics for MSVC. This puts us somewhere along the 3.8 branch, but we should still be compatible with LLVM 3.7 for non-MSVC targets. * All unwinding for MSVC targets (both 32 and 64-bit) are implemented in terms of this new LLVM support. I would like to also extend this to Windows GNU targets to drop the runtime dependencies we have on MinGW, but I'd like to land this first. * Some tests were fixed up for i686 MSVC here and there where necessary. The full test suite should be passing now for that target. In terms of landing this I plan to have this go through first, then verify that i686 MSVC works, then I'll enable `make check` on the bots for that target instead of just `make` as-is today. Closes #25869
2016-01-29Get tests working on MSVC 32-bitAlex Crichton-0/+27
2016-01-26Implement the translation item collector.Michael Woerister-0/+103
The purpose of the translation item collector is to find all monomorphic instances of functions, methods and statics that need to be translated into LLVM IR in order to compile the current crate. So far these instances have been discovered lazily during the trans path. For incremental compilation we want to know the set of these instances in advance, and that is what the trans::collect module provides. In the future, incremental and regular translation will be driven by the collector implemented here.
2016-01-23Rollup merge of #31031 - brson:issue-30123, r=nikomatsakisSteve Klabnik-0/+33
This was fixed in passing. Adding a regression test.
2016-01-23Auto merge of #31126 - arielb1:remote-errors, r=eddybbors-0/+15
Also removed an unused and similarly buggy error path. Fixes #30535 r? @eddyb
2016-01-22astconv: don't use as_local_node_id for ids in a DefAriel Ben-Yehuda-0/+15
Fixes #30535
2016-01-21resolve: Fix variant namespacingVadim Petrochenkov-0/+15
2016-01-19Add test for #30123Brian Anderson-0/+33
2016-01-15Preserve struct/variant kinds in metadataVadim Petrochenkov-0/+19
Add tests for use of empty structs in cross-crate scenarios
2016-01-13Simplify some uses of cfg in test casesAnton Blanchard-2/+1
While adding PowerPC64 support it was noticed that some testcases should just use target_pointer_width, and others should select between x86 and !x86.
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-1/+2
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2016-01-12Add test case for #[thread_local] on extern staticsMichael Neumann-0/+2
2016-01-04Feature-gate defaulted type parameters outside of types.Niko Matsakis-0/+1
2015-12-18Auto merge of #30389 - nikomatsakis:rfc1214-error, r=arielb1bors-2/+2
Make RFC 1214 warnings into errors, and rip out the "warn or err" associated machinery. Future such attempts should go through lints anyhow. There is a fair amount of fallout in the compile-fail tests, as WF checking now occurs earlier in the process. r? @arielb1
2015-12-18Auto merge of #29973 - petrochenkov:privinpub, r=nikomatsakisbors-2/+2
Some notes: This patch enforces the rules from [RFC 136](https://github.com/rust-lang/rfcs/blob/master/text/0136-no-privates-in-public.md) and makes "private in public" a module-level concept and not crate-level. Only `pub` annotations are used by the new algorithm, crate-level exported node set produced by `EmbargoVisitor` is not used. The error messages are tweaked accordingly and don't use the word "exported" to avoid confusing people (https://github.com/rust-lang/rust/issues/29668). The old algorithm tried to be extra smart with impls, but it mostly led to unpredictable behavior and bugs like https://github.com/rust-lang/rust/issues/28325. The new algorithm tries to be as simple as possible - an impl is considered public iff its type is public and its trait is public (if presents). A type or trait is considered public if all its components are public, [complications](https://internals.rust-lang.org/t/limits-of-type-inference-smartness/2919) with private types leaking to other crates/modules through trait impls and type inference are deliberately ignored so far. The new algorithm is not recursive and uses the nice new facility `Crate::visit_all_items`! Obsolete pre-1.0 feature `visible_private_types` is removed. This is a [breaking-change]. The two main vectors of breakage are type aliases (https://github.com/rust-lang/rust/issues/28450) and impls (https://github.com/rust-lang/rust/issues/28325). I need some statistics from a crater run (cc @alexcrichton) to decide on the breakage mitigation strategy. UPDATE: All the new errors are reported as warnings controlled by a lint `private_in_public` and lint group `future_incompatible`, but the intent is to make them hard errors eventually. Closes https://github.com/rust-lang/rust/issues/28325 Closes https://github.com/rust-lang/rust/issues/28450 Closes https://github.com/rust-lang/rust/issues/29524 Closes https://github.com/rust-lang/rust/issues/29627 Closes https://github.com/rust-lang/rust/issues/29668 Closes https://github.com/rust-lang/rust/issues/30055 r? @nikomatsakis
2015-12-18Make RFC 1214 warnings into errors, and rip out the "warn or err"Niko Matsakis-2/+2
associated machinery. Future such attempts should go through lints anyhow. There is a fair amount of fallout in the compile-fail tests, as WF checking now occurs earlier in the process.
2015-12-18Fix the falloutVadim Petrochenkov-2/+2
2015-12-18Auto merge of #29907 - nagisa:mir-moar-constants, r=nikomatsakisbors-0/+28
Still will not translate references to items like `X` or `Y::V` where ``` struct X; enum Y { V } ``` but I must go work on university things so I’m PRing what I have. r? @nikomatsakis
2015-12-16Auto merge of #30300 - sanxiyn:syntax-ext, r=nikomatsakisbors-5/+7
This reduces iteration time (`make rustc-stage1`) for moved syntax extensions from 11 minutes to 3 minutes on my machine. Because of the signature change, this is a [breaking-change] for people directly calling `expand_crate`. I think it is rare: from GitHub search, only case I found is [glassful](https://github.com/kmcallister/glassful).
2015-12-15Implement references to functions and constantsSimonas Kazlauskas-0/+28