summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2015-02-18Round 4 test fixes and rebase conflictsAlex Crichton-1/+1
2015-02-18Round 3 test fixes and conflictsAlex Crichton-4/+5
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-238/+497
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-4/+4
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18rollup merge of #22210: aturon/stab-final-borrowAlex Crichton-7/+7
Conflicts: src/libcollections/btree/map.rs src/libcollections/str.rs src/libcollections/vec.rs src/libcore/borrow.rs src/libcore/hash/mod.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs
2015-02-18Round 1 fixes and rebase conflictsAlex Crichton-20/+20
2015-02-18Stabilize std::borrowAaron Turon-7/+7
This commit stabilizes `std::borrow`, making the following modifications to catch up the API with language changes: * It renames `BorrowFrom` to `Borrow`, as was originally intended (but blocked for technical reasons), and reorders the parameters accordingly. * It moves the type parameter of `ToOwned` to an associated type. This is somewhat less flexible, in that each borrowed type must have a unique owned type, but leads to a significant simplification for `Cow`. Flexibility can be regained by using newtyped slices, which is advisable for other reasons anyway. * It removes the owned type parameter from `Cow`, making the type much less verbose. * Deprecates the `is_owned` and `is_borrowed` predicates in favor of direct matching. The above API changes are relatively minor; the basic functionality remains the same, and essentially the whole module is now marked `#[stable]`. [breaking-change]
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-4/+4
2015-02-18rollup merge of #22497: nikomatsakis/suffixesAlex Crichton-457/+459
Conflicts: src/librustc_trans/trans/tvec.rs
2015-02-18rollup merge of #22482: alexcrichton/cstr-changesAlex Crichton-10/+10
This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type to the module. [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md The new `CStr` type is only constructable via two methods: 1. By `deref`'ing from a `CString` 2. Unsafely via `CStr::from_ptr` The purpose of `CStr` is to be an unsized type which is a thin pointer to a `libc::c_char` (currently it is a fat pointer slice due to implementation limitations). Strings from C can be safely represented with a `CStr` and an appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr` instead to allow producers to pass in C-originating strings instead of just Rust-allocated strings. A new constructor was added to `CString`, `new`, which takes `T: IntoBytes` instead of separate `from_slice` and `from_vec` methods (both have been deprecated in favor of `new`). The `new` method returns a `Result` instead of panicking. The error variant contains the relevant information about where the error happened and bytes (if present). Conversions are provided to the `io::Error` and `old_io::IoError` types via the `FromError` trait which translate to `InvalidInput`. This is a breaking change due to the modification of existing `#[unstable]` APIs and new deprecation, and more detailed information can be found in the two RFCs. Notable breakage includes: * All construction of `CString` now needs to use `new` and handle the outgoing `Result`. * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call. * The `as_slice*` methods have been removed in favor of just having the `as_bytes*` methods. Closes #22469 Closes #22470 [breaking-change]
2015-02-18rollup merge of #22480: alexcrichton/hashv3Alex Crichton-3/+3
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18std: Implement CString-related RFCsAlex Crichton-10/+10
This commit is an implementation of [RFC 592][r592] and [RFC 840][r840]. These two RFCs tweak the behavior of `CString` and add a new `CStr` unsized slice type to the module. [r592]: https://github.com/rust-lang/rfcs/blob/master/text/0592-c-str-deref.md [r840]: https://github.com/rust-lang/rfcs/blob/master/text/0840-no-panic-in-c-string.md The new `CStr` type is only constructable via two methods: 1. By `deref`'ing from a `CString` 2. Unsafely via `CStr::from_ptr` The purpose of `CStr` is to be an unsized type which is a thin pointer to a `libc::c_char` (currently it is a fat pointer slice due to implementation limitations). Strings from C can be safely represented with a `CStr` and an appropriate lifetime as well. Consumers of `&CString` should now consume `&CStr` instead to allow producers to pass in C-originating strings instead of just Rust-allocated strings. A new constructor was added to `CString`, `new`, which takes `T: IntoBytes` instead of separate `from_slice` and `from_vec` methods (both have been deprecated in favor of `new`). The `new` method returns a `Result` instead of panicking. The error variant contains the relevant information about where the error happened and bytes (if present). Conversions are provided to the `io::Error` and `old_io::IoError` types via the `FromError` trait which translate to `InvalidInput`. This is a breaking change due to the modification of existing `#[unstable]` APIs and new deprecation, and more detailed information can be found in the two RFCs. Notable breakage includes: * All construction of `CString` now needs to use `new` and handle the outgoing `Result`. * Usage of `CString` as a byte slice now explicitly needs a `.as_bytes()` call. * The `as_slice*` methods have been removed in favor of just having the `as_bytes*` methods. Closes #22469 Closes #22470 [breaking-change]
2015-02-18Always prefer where-clauses over impls in trait selection. Fixes #22110.Niko Matsakis-0/+34
2015-02-18Extend the implicator so it produces general obligations and also soNiko Matsakis-0/+35
that it produces "outlives" relations for associated types. Add several tests relating to #22246.
2015-02-18std: Stabilize the `hash` moduleAlex Crichton-3/+3
This commit is an implementation of [RFC 823][rfc] which is another pass over the `std::hash` module for stabilization. The contents of the module were not entirely marked stable, but some portions which remained quite similar to the previous incarnation are now marked `#[stable]`. Specifically: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0823-hash-simplification.md * `std::hash` is now stable (the name) * `Hash` is now stable * `Hash::hash` is now stable * `Hasher` is now stable * `SipHasher` is now stable * `SipHasher::new` and `new_with_keys` are now stable * `Hasher for SipHasher` is now stable * Many `Hash` implementations are now stable All other portions of the `hash` module remain `#[unstable]` as they are less commonly used and were recently redesigned. This commit is a breaking change due to the modifications to the `std::hash` API and more details can be found on the [RFC][rfc]. Closes #22467 [breaking-change]
2015-02-18Fallout: tests. As tests frequently elide things, lots of changesNiko Matsakis-238/+361
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
2015-02-18Constrain operands to outlive the operation. Fixes #21422.Niko Matsakis-0/+25
2015-02-18Introduce the new phantomdata/phantomfn markers and integrate themNiko Matsakis-0/+111
into variance inference; fix various bugs in variance inference so that it considers the correct set of constraints; modify infer to consider the results of variance inference for type arguments.
2015-02-18Fix remaining bench/debuginfo tests (and a few stragglers)Niko Matsakis-1/+3
2015-02-18Update suffixes en masse in tests using `perl -p -i -e`Niko Matsakis-445/+445
2015-02-18Convert required suffixes into a use of `as`.Niko Matsakis-12/+12
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-1/+1
2015-02-18 Manual merge of #22475 - alexcrichton:rollup, r=alexcrichtonHuon Wilson-176/+255
One windows bot failed spuriously.
2015-02-17Register new snapshotsAlex Crichton-4/+4
2015-02-17Test fixes and rebase conflictsAlex Crichton-4/+6
2015-02-17rollup merge of #22319: huonw/send-is-not-staticAlex Crichton-15/+62
Conflicts: src/libstd/sync/task_pool.rs src/libstd/thread.rs src/libtest/lib.rs src/test/bench/shootout-reverse-complement.rs src/test/bench/shootout-spectralnorm.rs
2015-02-17Test fixes and rebase conflictsAlex Crichton-66/+67
2015-02-17rollup merge of #22435: aturon/final-stab-threadAlex Crichton-22/+22
Conflicts: src/test/bench/rt-messaging-ping-pong.rs src/test/bench/rt-parfib.rs src/test/bench/task-perf-spawnalot.rs
2015-02-17rollup merge of #22455: msiemens/add-vec-from_elemAlex Crichton-0/+5
Implement `Vec::from_elem` by making the `vec![element; len]` macro more powerful (see rust-lang/rfcs#832). Closes #22414 r? @Gankro
2015-02-18Update tests for the Send - 'static change.Huon Wilson-15/+15
2015-02-17Fallout from stabilizationAaron Turon-22/+22
2015-02-18Add tests for the removal of the 'static superbound from Send.Huon Wilson-0/+47
2015-02-17Implement `Vec::from_elem` (RFC 832)Markus Siemens-0/+5
Implement `Vec::from_elem` by making the `vec![element; len]` macro more powerful (see RFC 832). Closes #22414
2015-02-17Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichtonbors-9/+5
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773) - Fix & enable debuginfo tests for android (#10381) - Fix & enable more tests for android (both for arm/aarch64) - Enable many already-pass tests on android (both for arm/aarch64)
2015-02-17Auto merge of #22311 - lfairy:consistent-fmt, r=alexcrichtonbors-5/+5
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
2015-02-17Rollup merge of #22311 - lfairy:consistent-fmt, r=alexcrichtonManish Goregaokar-5/+5
This brings it in line with its namesake in `std::io`. [breaking-change] r? @aturon
2015-02-17Rollup merge of #22364 - Manishearth:rfc-572-forbid-attr, r=nikomatsakisManish Goregaokar-0/+14
fixes #22203 r? @nikomatsakis This breaks code that might be using attributes randomly, so it's technically a [breaking-change]
2015-02-17Rollup merge of #22402 - nagisa:spring-cleanup-2, r=nikomatsakisManish Goregaokar-65/+57
This commit mostly replaces some of the uses of os::args with env::args. This, for obvious reasons is based on top of #22400. Do not r+ before that lands.
2015-02-17Rollup merge of #22385 - dotdash:slice_by_val_copy, r=nikomatsakisManish Goregaokar-0/+18
When matching against strings/slices, we call the comparison function for strings, which takes two string slices by value. The slices are passed in memory, and currently we just pass in a pointer to the original slice. That can cause misoptimizations because we emit a call to llvm.lifetime.end for all by-value arguments at the end of a function, which in this case marks the original slice as dead. So we need to properly create copies of the slices to pass them to the comparison function. Fixes #22008
2015-02-17Rollup merge of #22366 - dotdash:ret_adjust, r=alexcrichtonManish Goregaokar-0/+17
Without the adjustments the retslot might have the wrong type, e.g. when the return value is implicitly coerced to a trait object. Fixes #22346
2015-02-16Auto merge of #22230 - nikomatsakis:object-lifetime-defaults-2, r=pnkfelixbors-0/+263
Implement rules described in rust-lang/rfcs#599. Fixes https://github.com/rust-lang/rust/issues/22211. ~~Based atop PR https://github.com/rust-lang/rust/pull/22182, so the first few commits (up to and including "Pacify the mercilous nrc") have already been reviewed.~~
2015-02-16Implement the rules for RFC 599, and add various tests.Niko Matsakis-0/+47
Fixes #22211.
2015-02-16Implement the basic rules of RFC 599, but do not yet support custom types.Niko Matsakis-0/+216
2015-02-16rustc_trans: correctly round up the largest variant to the enum's alignment.Eduard Burtescu-0/+28
2015-02-16rustc_trans: promote constant rvalues in functions as an optimization.Eduard Burtescu-22/+28
2015-02-16Replace some uses of deprecated os functionsSimonas Kazlauskas-65/+57
This commit mostly replaces some of the uses of os::args with env::args.
2015-02-16Add custom_attribute gate to tests which need themManish Goregaokar-0/+14
2015-02-16Fix misoptimizations when matching against strings/slicesBjörn Steinbrink-0/+18
When matching against strings/slices, we call the comparison function for strings, which takes two string slices by value. The slices are passed in memory, and currently we just pass in a pointer to the original slice. That can cause misoptimizations because we emit a call to llvm.lifetime.end for all by-value arguments at the end of a function, which in this case marks the original slice as dead. So we need to properly create copies of the slices to pass them to the comparison function. Fixes #22008
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+0
2015-02-15Rollup merge of #22285 - kmcallister:pub-macro, r=nick29581Manish Goregaokar-0/+25
It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a [breaking-change] but is landing without an RFC. The `pub` keyword previously had no effect, which seems quite unintended. Fixes #18317. Fixes #14660.