about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2015-01-23Fix tidy.Vadim Chugunov-1/+1
2015-01-22Added test.Vadim Chugunov-0/+46
2015-01-22Auto merge of #21187 - oli-obk:feature/hint_struct_field_access, r=alexcrichtonbors-0/+71
rebase and fix of #19267
2015-01-21Make diagnostic ordering deterministicAlex Crichton-0/+4
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-18/+143
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-16/+23
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/+291
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-1/+3
2015-01-21Fix type inference problems in tests and docsAaron Turon-15/+17
2015-01-21Test fixes and rebase conflictsAlex Crichton-23/+0
2015-01-21Deny imports after non-item statements.Eduard Burtescu-3/+5
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/+138
2015-01-21tests: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-39/+5
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-131/+131
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-113/+32
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 #21429: GuillaumeGomez/macro-fixAlex Crichton-0/+14
This is little clean code of this PR: #21366. I patched the same thing as aochagavia but too slowly obviously. This is a merge of our two codes, more "rust-like".
2015-01-21rollup merge of #21421: huonw/one-suggestion-per-traitAlex Crichton-0/+22
This is clearly useless, the user doesn't need to know that they could implement/import `foo::bar::Baz` 4 times. Fixes #21405.
2015-01-21rollup merge of #21411: P1start/help-tweaksAlex Crichton-9/+9
Conflicts: src/librustc_typeck/check/closure.rs
2015-01-21rollup merge of #21396: japaric/no-parens-in-rangeAlex Crichton-6/+6
Conflicts: src/libsyntax/parse/lexer/comments.rs
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-21rollup merge of #21342: Diggsey/issue-21310Alex Crichton-0/+28
Fixes #21310
2015-01-21rollup merge of #21340: pshc/libsyntax-no-more-intsAlex Crichton-2/+2
Collaboration with @rylev! I didn't change `int` in the [quasi-quoter](https://github.com/pshc/rust/blob/99ae1a30f3ca28c0f7e431620560d30e44627124/src/libsyntax/ext/quote.rs#L328), because I'm not sure if there will be adverse effects. Addresses #21095.
2015-01-21rollup merge of #21289: brson/errorcodesAlex Crichton-1/+1
This does the bare minimum to make registration of error codes work again. After this patch, every call to `span_err!` with an error code gets that error code validated against a list in that crate and a new tidy script `errorck.py` validates that no error codes are duplicated globally. There are further improvements to be made yet, detailed in #19624. r? @nikomatsakis
2015-01-21Change init-large-type to use child threadAaron Turon-1/+6
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-131/+131
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-21Display negative trait implementations correctly in rustdocDiggory Blake-0/+28
Added doc test
2015-01-20tests: uncomment regression tests for 13970, 13971, 13972Corey Richardson-27/+17
Closes #13971
2015-01-20rustc: Remove deprecated lint namesAlex Crichton-21/+5
These were all renamed quite some time ago, so remove their old names from the compiler.
2015-01-20Make error code registration work again. #19624Brian Anderson-1/+1
2015-01-20rustc: Remove deprecated flagsAlex Crichton-92/+27
This commit removes a number of deprecated flags from the compiler: * opt-level => -C opt-level * debuginfo => -C debuginfo * print-crate-name => --print crate-name * print-file-name => --print file-names * no-trans => -Z no-trans * no-analysis => -Z no-analysis * parse-only => -Z parse-only * dep-info => --emit dep-info This commit also moves the --pretty flag behind `-Z unstable-options` as the pretty printer will likely not be stable for 1.0 cc #19051
2015-01-21Rollup merge of #21424 - sanxiyn:coerce-mut, r=nikomatsakisBarosl LEE-4/+29
This is caught in borrowck now, but catching in typeck is faster and improves diagnostics. CC #17561. r? @nikomatsakis
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-20Forbid coercing &T to &mut TSeo Sanghyeon-4/+29
2015-01-20Auto merge of #21364 - cmr:fix-ttseq-ice, r=alexcrichtonbors-0/+17
Closes #21350
2015-01-20Avoid suggesting traits multiple times.Huon Wilson-0/+22
This is clearly useless, the user doesn't need to know that they could implement/import `foo::bar::Baz` 4 times. Fixes #21405.
2015-01-20librustc: hint close matches on accessing nonexisting fieldsOliver Schneider-0/+71
2015-01-20Fix up some ‘help’ messagesP1start-9/+9
2015-01-20Auto merge of #21304 - lifthrasiir:htmldocck, r=alexcrichtonbors-98/+34
The script is intended as a tool for doing every sort of verifications amenable to Rustdoc's HTML output. For example, link checkers would go to this script. It already parses HTML into a document tree form (with a slight caveat), so future tests can make use of it. As an example, relevant `rustdoc-*` run-make tests have been updated to use `htmldocck.py` and got their `verify.sh` removed. In the future they may go to a dedicated directory with htmldocck running by default. The detailed explanation of test scripts is provided as a docstring of htmldocck. cc #19723
2015-01-20Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelixbors-9/+53
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-51/+46
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-1/+53
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-19remove unnecessary parentheses from range notationJorge Aparicio-6/+6
2015-01-19Fixes #21033 with accompanying test.Tom Chittenden-1/+53
2015-01-19Auto merge of #21269 - alexcrichton:issue-6936, r=pnkfelixbors-0/+44
This commit modifies resolve to prevent conflicts with typedef names in the same method that conflits are prevented with enum names. This is a breaking change due to the differing semantics in resolve, and any errors generated on behalf of this change require that a conflicting typedef, module, or structure to be renamed so they do not conflict. [breaking-change] Closes #6936
2015-01-19impl Iterator for &mut Iterator and Box<Iterator>Jorge Aparicio-0/+38
closes #20953 closes #21361