about summary refs log tree commit diff
path: root/src/test/auxiliary
AgeCommit message (Collapse)AuthorLines
2014-02-05auto merge of #12025 : lilac/rust/feature-gate-quote, r=brsonbors-1/+1
Closes #11630.
2014-02-04auto merge of #12023 : nick29581/rust/err_res, r=alexcrichtonbors-0/+15
closes #3512
2014-02-04auto merge of #12018 : alexcrichton/rust/triage, r=sfacklerbors-0/+15
Mostly just test suite modifications.
2014-02-04Adding tests for closed issuesAlex Crichton-0/+15
Closes #5521 Closes #9396 Closes #10714
2014-02-05Check for trait impl conflicts across cratesNick Cameron-0/+15
2014-02-04Replaced with a single "quote" feature gate.James Deng-1/+1
2014-02-04Feature gate all quasi-quoting macros.James Deng-1/+1
2014-02-03Add an AtomicU64 type to std::sync::atomicsAlex Crichton-12/+12
This also generalizes all atomic intrinsics over T so we'll be able to add u8 atomics if we really feel the need to (do we really want to?)
2014-02-01auto merge of #11932 : dmanescu/rust/11741-stability-cross-crate, r=alexcrichtonbors-0/+14
Fixes #11741 Added tests and removed xfail-fast from run-pass/simd-experimental which is now fixed (see #11738).
2014-01-31Handle attributes on cross-crate tuple-structs correctlyDavid Manescu-0/+14
Fixes #11741
2014-01-30Implement default type parameters in generics.Eduard Burtescu-0/+17
2014-01-29Remove do keyword from test/Scott Lawrence-2/+2
2014-01-27test case for issue #10031.Felix S. Klock II-0/+11
2014-01-26Fix privacy fallout from previous changeAlex Crichton-1/+1
2014-01-26Change private structs to have private fields by defaultAlex Crichton-0/+19
This was the original intention of the privacy of structs, and it was erroneously implemented before. A pub struct will now have default-pub fields, and a non-pub struct will have default-priv fields. This essentially brings struct fields in line with enum variants in terms of inheriting visibility. As usual, extraneous modifiers to visibility are disallowed depend on the case that you're dealing with. Closes #11522
2014-01-25Simplify and rename macro APISteven Fackler-2/+2
Now that procedural macros can be implemented outside of the compiler, it's more important to have a reasonable API to work with. Here are the basic changes: * Rename SyntaxExpanderTTTrait to MacroExpander, SyntaxExpanderTT to BasicMacroExpander, etc. I think "procedural macro" is the right term for these now, right? The other option would be SynExtExpander or something like that. * Stop passing the SyntaxContext to extensions. This was only ever used by macro_rules, which doesn't even use it anymore. I can't think of a context in which an external extension would need it, and removal allows the API to be significantly simpler - no more SyntaxExpanderTTItemExpanderWithoutContext wrappers to worry about.
2014-01-20Scan the entire crate for exported macrosSteven Fackler-0/+18
It previously missed anything in an inner module.
2014-01-19auto merge of #11628 : alexcrichton/rust/issue-11593, r=brsonbors-8/+19
Turns out we were just forgetting to encode the privacy for trais, and everything without privacy defaults to public! Closes #11593
2014-01-18Disallow implementation of cross-crate priv traitsAlex Crichton-8/+19
Turns out we were just forgetting to encode the privacy for trais, and everything without privacy defaults to public! Closes #11593
2014-01-17test: Add the ability to force a host targetAlex Crichton-0/+2
The new macro loading infrastructure needs the ability to force a procedural-macro crate to be built with the host architecture rather than the target architecture (because the compiler is just about to dlopen it).
2014-01-16Load macros from external modulesSteven Fackler-0/+58
2014-01-11Remove re-exports of std::io::stdio::{print, println} in the prelude.Brendan Zabarauskas-2/+2
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-03test: De-`@mut` the test suitePatrick Walton-7/+18
2013-12-31Conservatively export all trait methods and implsAlex Crichton-0/+81
The comments have more information as to why this is done, but the basic idea is that finding an exported trait is actually a fairly difficult problem. The true answer lies in whether a trait is ever referenced from another exported method, and right now this kind of analysis doesn't exist, so the conservative answer of "yes" is always returned to answer whether a trait is exported. Closes #11224 Closes #11225
2013-12-23rustc: Add a lint for the obsolete crate-level link attributeBrian Anderson-95/+0
2013-12-19librustc: Add missing case for the `Pod` bound in `tydecode`.Patrick Walton-0/+10
2013-12-19Rename pkgid to crate_idCorey Richardson-41/+41
Closes #11035
2013-12-18auto merge of #11012 : alexcrichton/rust/needstest, r=alexcrichtonbors-0/+32
Closes #5806 Closes #8259 Closes #8578 Closes #8851 Closes #10412
2013-12-18Adding tests for closed issuesAlex Crichton-0/+32
Closes #5806 Closes #5950 Closes #7178 Closes #8259 Closes #8578 Closes #8851 Closes #9129 Closes #10412
2013-12-16Fallout of rewriting std::commAlex Crichton-1/+1
2013-12-11Make 'self lifetime illegal.Erik Price-2/+2
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-10Make crate hash stable and externally computable.Jack Moffitt-7/+84
This replaces the link meta attributes with a pkgid attribute and uses a hash of this as the crate hash. This makes the crate hash computable by things other than the Rust compiler. It also switches the hash function ot SHA1 since that is much more likely to be available in shell, Python, etc than SipHash. Fixes #10188, #8523.
2013-12-08encode trait lifetime params in metadata to allow cross-crate usageDavid Renshaw-0/+13
2013-12-03Fix a bug in exporting trait implementationsAlex Crichton-0/+19
I used the wrong condition where I was looking for "is this method public or is this implementation a trait" rather than what was being checked.
2013-12-03Resume propagation of linking to native dylibsAlex Crichton-1/+1
The reasons for this are outlined in issue #10743 as well as the comment I have now placed in the code. Closes #10743
2013-11-30auto merge of #10528 : alexcrichton/rust/static-linking-v2, r=pcwaltonbors-3/+4
In this series of commits, I've implemented static linking for rust. The scheme I implemented was the same as my [mailing list post](https://mail.mozilla.org/pipermail/rust-dev/2013-November/006686.html). The commits have more details to the nitty gritty of what went on. I've rebased this on top of my native mutex pull request (#10479), but I imagine that it will land before this lands, I just wanted to pre-emptively get all the rebase conflicts out of the way (becuase this is reorganizing building librustrt as well). Some contentious points I want to make sure are all good: * I've added more "compiler chooses a default" behavior than I would like, I want to make sure that this is all very clearly outlined in the code, and if not I would like to remove behavior or make it clearer. * I want to make sure that the new "fancy suite" tests are ok (using make/python instead of another rust crate) If we do indeed pursue this, I would be more than willing to write up a document describing how linking in rust works. I believe that this behavior should be very understandable, and the compiler should never hinder someone just because linking is a little fuzzy.
2013-11-30Wrap the return value of the type_id intrinsic in an opaque boxCorey Richardson-18/+20
Closes #10594
2013-11-29Statically link librustrt to libstdAlex Crichton-3/+4
This commit alters the build process of the compiler to build a static librustrt.a instead of a dynamic version. This means that we can stop distributing librustrt as well as default linking against it in the compiler. This also means that if you attempt to build rust code without libstd, it will no longer work if there are any landing pads in play. The reason for this is that LLVM and rustc will emit calls to the various upcalls in librustrt used to manage exception handling. In theory we could split librustrt into librustrt and librustupcall. We would then distribute librustupcall and link to it for all programs using landing pads, but I would rather see just one librustrt artifact and simplify the build process. The major benefit of doing this is that building a static rust library for use in embedded situations all of a sudden just became a whole lot more feasible. Closes #3361
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-2/+2
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26librustc: Remove remaining uses of `&fn()` in favor of `||`.Patrick Walton-1/+1
2013-11-26test: Remove most uses of `&fn()` from the tests.Patrick Walton-4/+4
2013-11-22auto merge of #10583 : alexcrichton/rust/privacy-reexport, r=pcwaltonbors-0/+15
I added a test case which does not compile today, and required changes on privacy's side of things to get right. Additionally, this moves a good bit of logic which did not belong in reachability into privacy. All of reachability should solely be responsible for determining what the reachable surface area of a crate is given the exported surface area (where the exported surface area is that which is usable by external crates). Privacy will now correctly figure out what's exported by deeply looking through reexports. Previously if a module were reexported under another name, nothing in the module would actually get exported in the executable. I also consolidated the phases of privacy to be clearer about what's an input to what. The privacy checking pass no longer uses the notion of an "all public" path, and the embargo visitor is no longer an input to the checking pass. Currently the embargo visitor is built as a saturating analysis because it's unknown what portions of the AST are going to get re-exported. This also cracks down on exported methods from impl blocks and trait blocks. If you implement a private trait, none of the symbols are exported, and if you have an impl for a private type none of the symbols are exported either. On the other hand, if you implement a public trait for a private type, the symbols are still exported. I'm unclear on whether this last part is correct, but librustc will fail to link unless it's in place.
2013-11-22Move more of the exportation burden into privacyAlex Crichton-0/+15
I added a test case which does not compile today, and required changes on privacy's side of things to get right. Additionally, this moves a good bit of logic which did not belong in reachability into privacy. All of reachability should solely be responsible for determining what the reachable surface area of a crate is given the exported surface area (where the exported surface area is that which is usable by external crates). Privacy will now correctly figure out what's exported by deeply looking through reexports. Previously if a module were reexported under another name, nothing in the module would actually get exported in the executable. I also consolidated the phases of privacy to be clearer about what's an input to what. The privacy checking pass no longer uses the notion of an "all public" path, and the embargo visitor is no longer an input to the checking pass. Currently the embargo visitor is built as a saturating analysis because it's unknown what portions of the AST are going to get re-exported.
2013-11-19Don't use win64 calling convention on 32-bit machines.Eric Holk-3/+13
2013-11-18Add Win64 calling convention.Eric Holk-0/+27
2013-11-11Remove #[fixed_stack_segment] and #[rust_stack]Alex Crichton-1/+0
These two attributes are no longer useful now that Rust has decided to leave segmented stacks behind. It is assumed that the rust task's stack is always large enough to make an FFI call (due to the stack being very large). There's always the case of stack overflow, however, to consider. This does not change the behavior of stack overflow in Rust. This is still normally triggered by the __morestack function and aborts the whole process. C stack overflow will continue to corrupt the stack, however (as it did before this commit as well). The future improvement of a guard page at the end of every rust stack is still unimplemented and is intended to be the mechanism through which we attempt to detect C stack overflow. Closes #8822 Closes #10155
2013-11-08Added tests for default generation of package_id meta attributeAndrei Formiga-0/+17
2013-11-04auto merge of #10182 : alexcrichton/rust/typeid-intrinsic, r=nikomatsakisbors-0/+64
This isn't quite as fancy as the struct in #9913, but I'm not sure we should be exposing crate names/hashes of the types. That being said, it'd be pretty easy to extend this (the deterministic hashing regardless of what crate you're in was the hard part).
2013-11-02auto merge of #10242 : thestinger/rust/inline_dtor, r=alexcrichtonbors-0/+18
Closes #7793
2013-11-02fix cross-crate destructor inliningDaniel Micay-0/+18
Closes #7793