summary refs log tree commit diff
path: root/src/test/auxiliary
AgeCommit message (Collapse)AuthorLines
2016-05-04trans: always register an item's symbol, even if duplicated.Eduard Burtescu-0/+27
2016-04-06rustc: move rustc_front to rustc::hir.Eduard Burtescu-6/+2
2016-04-02Make the rendering process less pass-awaremitaa-0/+21
Instead of hardcoding knowledge about the strip-private pass into the rendering process we represent (some) stripped items as `ItemEnum::StrippedItem`. Rustdoc will, for example, generate redirect pages for public items contained in private modules which have been re-exported to somewhere externally reachable - this will now not only work for the `strip-private` pass, but for other passes as well, such as the `strip-hidden` pass.
2016-03-30move `const_eval` and `check_match` out of `librustc`Oliver Schneider-1/+1
2016-03-30rename `rustc_const_eval` to `rustc_const_math`Oliver Schneider-2/+2
2016-03-29Use weak_odr linkage when reusing definitions across codegen unitsBjörn Steinbrink-0/+66
When reuing a definition across codegen units, we obviously cannot use internal linkage, but using external linkage means that we can end up with multiple conflicting definitions of a single symbol across multiple crates. Since the definitions should all be equal semantically, we can use weak_odr linkage to resolve the situation. Fixes #32518
2016-03-27rustc: move cfg, infer, traits and ty from middle to top-level.Eduard Burtescu-1/+1
2016-03-25Make the compiler emit an error if the crate graph contains two crates with ↵Michael Woerister-0/+23
the same crate-name and crate-salt but different SVHs.
2016-03-25Use new symbol names for items of various kinds.Michael Woerister-0/+0
2016-03-25Make monomorphized functions use stable symbol names.Michael Woerister-0/+0
2016-03-22Omit `pub` for inlined variant-struct fieldsmitaa-0/+15
2016-03-15Auto merge of #32250 - durka:derive-31574, r=alexcrichtonbors-0/+40
derive: use intrinsics::unreachable over unreachable!() derive: use intrinsics::unreachable over unreachable!() Fixes #31574. Spawned from #32139. r? @alexcrichton
2016-03-14Test fixes, added README for testsAaron Turon-4/+8
2016-03-14Adjust tests for feature gate, and add tests for the gate itselfAaron Turon-0/+4
2016-03-14Add basic specialization tests, including for default itemAaron Turon-2/+131
inheritance. Updates some of the coherence tests as well.
2016-03-14refactor derive-no-std test, add empty struct/enumAlex Burka-0/+40
2016-03-14Auto merge of #30587 - oli-obk:eager_const_eval2, r=nikomatsakisbors-2/+6
typestrong const integers ~~It would be great if someone could run crater on this PR, as this has a high danger of breaking valid code~~ Crater ran. Good to go. ---- So this PR does a few things: 1. ~~const eval array values when const evaluating an array expression~~ 2. ~~const eval repeat value when const evaluating a repeat expression~~ 3. ~~const eval all struct and tuple fields when evaluating a struct/tuple expression~~ 4. remove the `ConstVal::Int` and `ConstVal::Uint` variants and replace them with a single enum (`ConstInt`) which has variants for all integral types * `usize`/`isize` are also enums with variants for 32 and 64 bit. At creation and various usage steps there are assertions in place checking if the target bitwidth matches with the chosen enum variant 5. enum discriminants (`ty::Disr`) are now `ConstInt` 6. trans has its own `Disr` type now (newtype around `u64`) This obviously can't be done without breaking changes (the ones that are noticable in stable) We could probably write lints that find those situations and error on it for a cycle or two. But then again, those situations are rare and really bugs imo anyway: ```rust let v10 = 10 as i8; let v4 = 4 as isize; assert_eq!(v10 << v4 as usize, 160 as i8); ``` stops compiling because 160 is not a valid i8 ```rust struct S<T, S> { a: T, b: u8, c: S } let s = S { a: 0xff_ff_ff_ffu32, b: 1, c: 0xaa_aa_aa_aa as i32 }; ``` stops compiling because `0xaa_aa_aa_aa` is not a valid i32 ---- cc @eddyb @pnkfelix related: https://github.com/rust-lang/rfcs/issues/1071
2016-03-13Auto merge of #31916 - nagisa:mir-passmgr-2, r=arielb1bors-4/+7
Add Pass manager for MIR A new PR, since rebasing the original one (https://github.com/rust-lang/rust/pull/31448) properly was a pain. Since then there has been several changes most notable of which: 1. Removed the pretty-printing with `#[rustc_mir(graphviz/pretty)]`, mostly because we now have `--unpretty=mir`, IMHO that’s the direction we should expand this functionality into; 2. Reverted the infercx change done for typeck, because typeck can make an infercx for itself by being a `MirMapPass` r? @nikomatsakis
2016-03-12std: Clean out deprecated APIsAlex Crichton-2/+4
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that are deprecated in the 1.8 release are sticking around for the rest of this cycle. Some notable changes are: * The `dynamic_lib` module was moved into `rustc_back` as the compiler still relies on a few bits and pieces. * The `DebugTuple` formatter now special-cases an empty struct name with only one field to append a trailing comma.
2016-03-10typestrong constant integersOliver Schneider-2/+6
2016-03-09Split TyBareFn into TyFnDef and TyFnPtr.Eli Friedman-34/+38
There's a lot of stuff wrong with the representation of these types: TyFnDef doesn't actually uniquely identify a function, TyFnPtr is used to represent method calls, TyFnDef in the sub-expression of a cast isn't correctly reified, and probably some other stuff I haven't discovered yet. Splitting them seems like the right first step, though.
2016-03-07Change MirPass to also take NodeIdSimonas Kazlauskas-1/+3
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