about summary refs log tree commit diff
path: root/src/test/run-pass
AgeCommit message (Collapse)AuthorLines
2015-01-22Added test.Vadim Chugunov-0/+20
2015-01-21Make diagnostic ordering deterministicAlex Crichton-0/+3
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-0/+60
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21rollup merge of #21258: aturon/stab-3-indexAlex Crichton-1/+6
Conflicts: src/libcore/ops.rs src/librustc_typeck/astconv.rs src/libstd/io/mem.rs src/libsyntax/parse/lexer/mod.rs
2015-01-21rollup merge of #21252: nikomatsakis/assoc-type-ice-hunt-take-2Alex Crichton-0/+200
Project region bounds out of the trait when deciding whether a projection type outlives a given regions. Fixes #20890. Fixes #21150.
2015-01-21Move regression test for #20971 into run-fail, since it panics.Niko Matsakis-32/+0
2015-01-21Deny imports after non-item statements.Eduard Burtescu-19/+0
2015-01-21Added another test with success local-item shadowingEduard Burtescu-0/+19
2015-01-21Added some tests for arbitrary ordered view itemsMarvin Löbel-0/+60
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-119/+119
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21447: cmr/masterAlex Crichton-27/+17
Closes #13971
2015-01-21rollup merge of #21441: alexcrichton/rustc-optsAlex Crichton-3/+3
This is a bit of cleanup work to clean out some old deprecated flags and deprecated lint names from the compiler (they've been deprecated for quite awhile now). This also notably puts `--pretty` behind the `-Z unstable-options` flag (where it was supposed to be previously).
2015-01-21rollup merge of #21392: japaric/iterAlex Crichton-0/+38
closes #20953 closes #21361 --- In the future, we will likely derive these `impl`s via syntax extensions or using compiler magic (see #20617). For the time being we can use these manual `impl`s. r? @aturon cc @burntsushi @Kroisse
2015-01-21rollup merge of #21354: eddyb/vec-ufcsAlex Crichton-0/+23
There are two limitations to the macro that this addresses: 1. the expected type is not propagated, coercions don't trigger 2. references inside element expressions don't outlive the `Vec` Both of these limitations are caused by the block in the macro expansion, previously needed to trigger a coercion from `Box<[T; N]>` to `Box<[T]>`, now possible with UFCS.
2015-01-21Change init-large-type to use child threadAaron Turon-1/+6
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-119/+119
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-20tests: uncomment regression tests for 13970, 13971, 13972Corey Richardson-27/+17
Closes #13971
2015-01-20rustc: Remove deprecated lint namesAlex Crichton-3/+3
These were all renamed quite some time ago, so remove their old names from the compiler.
2015-01-21Rollup merge of #21404 - japaric:hash, r=alexcrichtonBarosl LEE-0/+18
closes #21402 cc #15294 r? @alexcrichton or @aturon cc @ExpHP (btw, this only covers arrays with arity up to 32)
2015-01-21Rollup merge of #21386 - Diggsey:issue-21384, r=alexcrichtonBarosl LEE-0/+27
Fixes #21384
2015-01-20Auto merge of #21364 - cmr:fix-ttseq-ice, r=alexcrichtonbors-0/+17
Closes #21350
2015-01-20Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelixbors-7/+16
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-19Auto merge of #21165 - alexcrichton:second-pass-type-id, r=aturonbors-24/+23
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-19impl Hash for arraysJorge Aparicio-0/+18
closes #21402 cc #15294
2015-01-19Auto merge of #21278 - thchittenden:issue-21033-struct-var-pattern-fix, ↵bors-0/+52
r=alexcrichton Closes #21033. The new strategy for parsing a field pattern is to look 1 token ahead and if it's a colon, parse as "fieldname: pat", otherwise parse the shorthand form "(box) (ref) (mut) fieldname)". The previous strategy was to parse "(ref) (mut) fieldname" then if we encounter a colon, throw an error if either "ref" or "mut" were encountered.
2015-01-19Fixes #21033 with accompanying test.Tom Chittenden-0/+52
2015-01-19impl Iterator for &mut Iterator and Box<Iterator>Jorge Aparicio-0/+38
closes #20953 closes #21361
2015-01-19Ranges implement Clone where possibleDiggory Blake-0/+27
2015-01-18std: Stabilize TypeId and tweak BoxAnyAlex Crichton-24/+23
This commit aims to stabilize the `TypeId` abstraction by moving it out of the `intrinsics` module into the `any` module of the standard library. Specifically, * `TypeId` is now defined at `std::any::TypeId` * `TypeId::hash` has been removed in favor of an implementation of `Hash`. This commit also performs a final pass over the `any` module, confirming the following: * `Any::get_type_id` remains unstable as *usage* of the `Any` trait will likely never require this, and the `Any` trait does not need to be implemented for any other types. As a result, this implementation detail can remain unstable until associated statics are implemented. * `Any::downcast_ref` is now stable * `Any::downcast_mut` is now stable * `BoxAny` remains unstable. While a direct impl on `Box<Any>` is allowed today it does not allow downcasting of trait objects like `Box<Any + Send>` (those returned from `Thread::join`). This is covered by #18737. * `BoxAny::downcast` is now stable.
2015-01-19Reduce size of array in test case to 1MBJames Miller-1/+1
2015-01-19Add test to catch performance regressionsJames Miller-0/+25
2015-01-18syntax: allow bare sequences in lhs for follow checkingCorey Richardson-0/+17
Closes #21350
2015-01-18auto merge of #20901 : dgrunwald/rust/update-token-can-begin-expr, r=sanxiynbors-0/+3
* add `Token::AndAnd` (double borrow) * add `Token::DotDot` (range notation) * remove `Token::Pound` and `Token::At` This fixes a syntax error when parsing `fn f() -> RangeTo<i32> { return ..1; }`. Also, remove `fn_expr_lookahead`. It's from the `fn~` days and seems to no longer be necessary.
2015-01-18Improve the vec![...] macro with UFCS.Eduard Burtescu-0/+23
There are two limitations to the macro that this addresses: 1. the expected type is not propagated, coercions don't trigger 2. references inside element expressions don't outlive the `Vec` Both of these limitations are caused by the block in the macro expansion, previously needed to trigger a coercion from `Box<[T; N]>` to `Box<[T]>`, now possible with UFCS.
2015-01-17Add allow(unstable) to more testsBrian Anderson-0/+3
2015-01-17Register new snapshots.Eduard Burtescu-2/+2
2015-01-16syntax: Feature gate #[start] and #[main]Alex Crichton-7/+16
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-16Add regression tests for #20763. Fixes #20763.Niko Matsakis-0/+59
2015-01-16Add regression test for #20797. Fixes #20797.Niko Matsakis-0/+91
2015-01-16Add regression test for #20971. Fixes #20791.Niko Matsakis-0/+32
2015-01-16Project region bounds out of the trait when deciding whether aNiko Matsakis-0/+50
projection type outlives a given region. Fixes #20890.
2015-01-16auto merge of #21162 : apasel422/rust/issue-16530, r=huonwbors-0/+18
This fixes #16530 by hashing nullary structs [the same way as the empty tuple] (https://github.com/rust-lang/rust/blob/master/src/libcore/hash/mod.rs#L185). Other approaches are possible, but this was the simplest.
2015-01-16fix latest changes falloutFlavio Percoco-2/+0
2015-01-16Don't use NoSend/NoSync in testsFlavio Percoco-4/+2
2015-01-16add a run-pass test that used to failFlavio Percoco-0/+29
2015-01-16Negative impls are considered safeFlavio Percoco-0/+21
2015-01-15rollup merge of #21170: Diggsey/issue-21058Alex Crichton-0/+30
While it's unstable and will probably be replaced or "reformed" at some point, it's useful in the mean time to be able to introspect the type system when debugging, and not be limited to sized types. Fixes #21058
2015-01-15rollup merge of #21115: dotdash/iter_vecAlex Crichton-0/+19
There are two places left where we used to only know the byte size of/offset into an array and had to cast to i8 and back to get the right addresses. But by now, we always know the sizes in terms of the number of elements in the array. In fact we have to add an extra Mul instruction so we can use the weird cast-to-u8 code. So we should really just embrace our new knowledge and use simple GEPs to do the address calculations. Fixes #3729
2015-01-15rollup merge of #21107: nikomatsakis/assoc-type-ice-hunt-take-1Alex Crichton-0/+100
Fixes for #20831 and #21010 r? @nick29581
2015-01-15rollup merge of #21089: nikomatsakis/issue-20676-invalid-vtable-for-objectAlex Crichton-0/+45
Support UFCS style calls to a method defined in `Trait` where `Self` is bound to a trait object. Fixes #20676. r? @alexcrichton