about summary refs log tree commit diff
path: root/src/test/auxiliary
AgeCommit message (Collapse)AuthorLines
2015-04-30Merge branch 'master' into mulit-decorNick Cameron-5/+111
2015-04-29Auto merge of #24932 - pnkfelix:fix-issue-24687, r=huonwbors-0/+57
metdata: Fix zero-normalization of the pos of a `MultiByteChar` Fix #24687 The source byte/character mappings for every crate track the collection of multi-characters from its source files specially. When we import the source information for another file into the current compilation unit, we assign its byte-positions unique values by shifting them all by a fixed adjustment, tracked in the `start_pos` field. But when we pull out the source span information for one function from one crate and into our own crate, we need to re-normalize the byte positions: subtracting the old `start_pos` and adding the new `start_pos`. The `new_imported_filemap(..)` method handles adding the new `start_pos`, so all `creader` needs to do is re-normalize each `pos` to zero. It seems like it was indeed trying to do this, but it mistakenly added the old `start_pos` instead of subtracting it.
2015-04-29Regression test for issue 24687.Felix S. Klock II-0/+57
use visible characters for the multibyte character filler.
2015-04-29Auto merge of #24681 - tamird:unignore-android, r=alexcrichtonbors-0/+7
There are still quite a few ignored Android tests kicking around, most of which were added in 445faca8441aae34c91318b6ad9e2049885af8dc, which has a pretty unfortunate commit message. r? @alexcrichton
2015-04-28#10356: WarningsTamir Duberstein-0/+5
2015-04-28#10381: WarningsTamir Duberstein-0/+2
2015-04-28Register new snapshotsTamir Duberstein-3/+0
2015-04-27Auto merge of #23606 - quantheory:associated_const, r=nikomatsakisbors-0/+46
Closes #17841. The majority of the work should be done, e.g. trait and inherent impls, different forms of UFCS syntax, defaults, and cross-crate usage. It's probably enough to replace the constants in `f32`, `i8`, and so on, or close to good enough. There is still some significant functionality missing from this commit: - ~~Associated consts can't be used in match patterns at all. This is simply because I haven't updated the relevant bits in the parser or `resolve`, but it's *probably* not hard to get working.~~ - Since you can't select an impl for trait-associated consts until partway through type-checking, there are some problems with code that assumes that you can check constants earlier. Associated consts that are not in inherent impls cause ICEs if you try to use them in array sizes or match ranges. For similar reasons, `check_static_recursion` doesn't check them properly, so the stack goes ka-blooey if you use an associated constant that's recursively defined. That's a bit trickier to solve; I'm not entirely sure what the best approach is yet. - Dealing with consts associated with type parameters will raise some new issues (e.g. if you have a `T: Int` type parameter and want to use `<T>::ZERO`). See rust-lang/rfcs#865. - ~~Unused associated consts don't seem to trigger the `dead_code` lint when they should. Probably easy to fix.~~ Also, this is the first time I've been spelunking in rustc to such a large extent, so I've probably done some silly things in a couple of places.
2015-04-25Remove remaining tests for hygiene-encoded identifiers.Geoffry Song-26/+0
Such things no longer exist.
2015-04-24Remove obsolete "MarkerTrait" from tests.Sean Patrick Santos-4/+2
2015-04-25Merge branch 'syntax' of https://github.com/aochagavia/rust into mulit-decorNick Cameron-2/+81
Conflicts: src/librustc/plugin/registry.rs src/libsyntax/ext/base.rs src/libsyntax/ext/cfg_attr.rs src/libsyntax/ext/deriving/mod.rs src/libsyntax/ext/expand.rs src/libsyntax/print/pprust.rs src/test/auxiliary/macro_crate_test.rs
2015-04-23Feature-gate associated constants.Sean Patrick Santos-0/+2
2015-04-23Fix a number of bugs that interfered with cross-crate usage of associated ↵Sean Patrick Santos-0/+46
consts.
2015-04-21rollup merge of #24636: alexcrichton/remove-deprecatedAlex Crichton-79/+31
Conflicts: src/libcore/result.rs
2015-04-21test: Fix fallout in testsAlex Crichton-79/+31
2015-04-21Remove references to `old_{path,io}`Tamir Duberstein-1/+1
2015-04-18Auto merge of #23985 - erickt:derive-cleanup, r=ericktbors-1/+1
This extracts some of the minor cleanup patches from #23905.
2015-04-16rustdoc: Inline methods inhereted through DerefAlex Crichton-0/+30
Whenever a type implements Deref, rustdoc will now add a section to the "methods available" sections for "Methods from Deref<Target=Foo>", listing all the inherent methods of the type `Foo`. Closes #19190
2015-04-15syntax: Change deriving methods to take a `&mut FnMut(P<Item>)`Erick Tryzelaar-1/+1
This allows #[derive(...)]` to create more than one impl
2015-04-15Forbid is/us suffixes. Fixes #22496Brian Anderson-1/+1
It was an oversight that this was not done in the great int upheaval. [breaking-change]
2015-04-11Expand internal-unstable to handle named field accesses and method calls.Ryan Prichard-0/+33
2015-04-10Auto merge of #24177 - alexcrichton:rustdoc, r=aturonbors-0/+288
This commit series starts out with more official test harness support for rustdoc tests, and then each commit afterwards adds a test (where appropriate). Each commit should also test and finish independently of all others (they're all pretty separable). I've uploaded a [copy of the documentation](http://people.mozilla.org/~acrichton/doc/std/) generated after all these commits were applied, and a double check on issues being closed would be greatly appreciated! I'll also browse the docs a bit and make sure nothing regressed too horribly.
2015-04-08Allow plugins to register LLVM passesKeegan McAllister-0/+28
2015-04-07rustdoc: Handle duplicate reexports listedAlex Crichton-0/+29
This ends up causing duplicate output in rustdoc. The source of these duplicates is that the item is defined in both resolve namespaces, so it's listed twice. Closes #23207
2015-04-07rustdoc: Encode ABI in all methodsAlex Crichton-0/+18
This commit ensures that the ABI of functions is propagated all the way through to the documentation. Closes #22038
2015-04-07rustdoc: Simplify predicates with paren notationAlex Crichton-0/+17
This change is aimed at improving cross-crate (inlined) notation of generic closures. The change modifies `simplify::where_predicates` to handle parenthesized notation as well as starting to handle supertrait bounds as well. This was necessary because all output constraints of closures are bound to `FnOnce` but most trait bounds are that of `FnMut`. Close #21801
2015-04-07rustdoc: Detect provided methods on inlined traitsAlex Crichton-0/+14
Closes #23864
2015-04-07rustdoc: Add a test for #21092Alex Crichton-0/+20
Close #21092
2015-04-07rustdoc: Improve handling inlined associated typesAlex Crichton-0/+38
* All bounds are now discovered through the trait to be inlined. * The `?Sized` bound now renders correctly for inlined associated types. * All `QPath`s (`<A as B>::C`) instances are rendered as `A::C` where `C` is a hyperlink to the trait `B`. This should improve at least how the docs look at least. * Supertrait bounds are now separated and display as the source lists them. Closes #20727 Closes #21145
2015-04-07rustdoc: Simplify cross-crate where clausesAlex Crichton-0/+15
Add a custom module to rustdoc which simplifies the output of `middle::ty` into a more readable form which tends to be written down anyway! Closes #20646
2015-04-07rustdoc: Link "Trait Implementations" to sourcesAlex Crichton-0/+16
All methods listed in "Trait Implementations" now hyperlink to the source trait instead of themselves, allowing easy browsing of the documentation of a trait method. Closes #17476
2015-04-07rustdoc: Add a primitive page for raw pointersAlex Crichton-0/+15
Closes #15318
2015-04-07rustdoc: Run external traits through filtersAlex Crichton-0/+16
This ensures that all external traits are run through the same filters that the rest of the AST goes through, stripping hidden function as necessary. Closes #13698
2015-04-07test: Move all run-make rustdoc tests to test/rustdocAlex Crichton-0/+90
2015-04-02Merge conflictsNiko Matsakis-3/+1
2015-04-02Fallout in testsNiko Matsakis-7/+3
2015-04-01rollup merge of #23860: nikomatsakis/copy-requires-cloneAlex Crichton-11/+11
Conflicts: src/test/compile-fail/coherence-impls-copy.rs
2015-04-01Fallout in testsNiko Matsakis-11/+11
2015-04-01Update tests for new coherence rules, and add a swatch of new testsNiko Matsakis-0/+22
probing the specifics of `Fundamental`. Fixes #23086. Fixes #23516.
2015-03-30Fallout in tests: largely changes to error messages.Niko Matsakis-8/+9
2015-03-30Fallout where types must be specified.Niko Matsakis-0/+18
This is due to a [breaking-change] to operators. The primary affected code is uses of the `Rng` trait where we used to (incorrectly) infer the right-hand-side type from the left-hand-side, in the case that the LHS type was a scalar like `i32`. The fix is to add a type annotation like `x + rng.gen::<i32>()`.
2015-03-27rollup merge of #23786: alexcrichton/less-quotesAlex Crichton-12/+9
Conflicts: src/test/auxiliary/static-function-pointer-aux.rs src/test/auxiliary/trait_default_method_xc_aux.rs src/test/run-pass/issue-4545.rs
2015-03-27rollup merge of #23794: brson/slicegateAlex Crichton-0/+1
Conflicts: src/test/run-pass/issue-13027.rs
2015-03-27Feature gate *all* slice patterns. #23121Brian Anderson-0/+1
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
2015-03-27Fix fallout of removing quotes in crate namesAlex Crichton-11/+7
2015-03-27Unquote all crate names without underscoresRicho Healey-2/+2
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-318/+318
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs
2015-03-27rollup merge of #23712: nikomatsakis/reflect-traitAlex Crichton-4/+4
This PR introduces a `Reflect` marker trait which is a supertrait of `Any`. The idea is that `Reflect` is defined for all concrete types, but is not defined for type parameters unless there is a `T:Reflect` bound. This is intended to preserve the parametricity property. This allows the `Any` interface to be stabilized without committing us to unbounded reflection that is not easily detectable by the caller. The implementation of `Reflect` relies on an experimental variant of OIBIT. This variant behaves differently for objects, since it requires that all types exposed as part of the object's *interface* are `Reflect`, but isn't concerned about other types that may be closed over. In other words, you don't have to write `Foo+Reflect` in order for `Foo: Reflect` to hold (where `Foo` is a trait). Given that `Any` is slated to stabilization and hence that we are committed to some form of reflection, the goal of this PR is to leave our options open with respect to parametricity. I see the options for full stabilization as follows (I think an RFC would be an appropriate way to confirm whichever of these three routes we take): 1. We make `Reflect` a lang-item. 2. We stabilize some version of the OIBIT variation I implemented as a general mechanism that may be appropriate for other use cases. 3. We give up on preserving parametricity here and just have `impl<T> Reflect for T` instead. In that case, `Reflect` is a harmless but not especially useful trait going forward. cc @aturon cc @alexcrichton cc @glaebhoerl (this is more-or-less your proposal, as I understood it) cc @reem (this is more-or-less what we discussed on IRC at some point) cc @FlaPer87 (vaguely pertains to OIBIT)
2015-03-26Implement `Reflect` trait with a variant on the standard OIBITNiko Matsakis-4/+4
semantics that tests the *interface* of trait objects, rather than what they close over.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-318/+318
Now that support has been removed, all lingering use cases are renamed.