about summary refs log tree commit diff
path: root/src/test
AgeCommit message (Collapse)AuthorLines
2015-01-24Auto merge of #21079 - huonw:chained-cmp-tweaks, r=pnkfelixbors-6/+6
First commit is mindless groundwork for the second one, to make the spans (arguably) nicer. ### before ``` require-parens-for-chained-comparison.rs:14:20: 14:22 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:14 false == false == false; ^~ require-parens-for-chained-comparison.rs:17:16: 17:17 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:17 false == 0 < 2; ^ require-parens-for-chained-comparison.rs:20:8: 20:9 error: Chained comparison operators require parentheses require-parens-for-chained-comparison.rs:20 f<X>(); ^ require-parens-for-chained-comparison.rs:20:8: 20:9 help: Use ::< instead of < if you meant to specify type arguments. require-parens-for-chained-comparison.rs:20 f<X>(); ^ ``` ### after ``` require-parens-for-chained-comparison.rs:14:11: 14:22 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:14 false == false == false; ^~~~~~~~~~~ require-parens-for-chained-comparison.rs:17:11: 17:17 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:17 false == 0 < 2; ^~~~~~ require-parens-for-chained-comparison.rs:20:6: 20:9 error: chained comparison operators require parentheses require-parens-for-chained-comparison.rs:20 f<X>(); ^~~ require-parens-for-chained-comparison.rs:20:6: 20:9 help: use `::<...>` instead of `<...>` if you meant to specify type arguments require-parens-for-chained-comparison.rs:20 f<X>(); ^~~ ```
2015-01-25Tweak chained comparison errors.Huon Wilson-6/+6
Lower case and give a more precise span: from operator to operator, not just the last one.
2015-01-24Auto merge of #21542 - vadimcn:fix-exported-macro-paths, r=alexcrichtonbors-0/+46
... so that `super::foo` gets serialized as `super:: foo`, rather than `super :: foo`.
2015-01-23regex: Remove in-tree versionAlex Crichton-131/+1
The regex library was largely used for non-critical aspects of the compiler and various external tooling. The library at this point is duplicated with its out-of-tree counterpart and as such imposes a bit of a maintenance overhead as well as compile time hit for the compiler itself. The last major user of the regex library is the libtest library, using regexes for filters when running tests. This removal means that the filtering has gone back to substring matching rather than using regexes.
2015-01-23Fix tidy.Vadim Chugunov-1/+1
2015-01-22Added test.Vadim Chugunov-0/+46
2015-01-23Auto merge of #21374 - dgrunwald:range-notation-fixes, r=nikomatsakisbors-0/+39
This PR is intended as alternative to #20958. It fixes the same grammar inconsistencies, but does not increase the operator precedence of `..`, leaving it at the same level as the assignment operator. For previous discussion, see #20811 and #20958. Grammar changes: * allow `for _ in 1..i {}` (fixes #20241) * allow `for _ in 1.. {}` as infinite loop * prevent use of range notation in contexts where only operators of high precedence are expected (fixes #20811) Parser code cleanup: * remove `RESTRICTION_NO_DOTS` * make `AS_PREC` const and follow naming convention * make `min_prec` inclusive r? nikomatsakis
2015-01-22Rollup merge of #21471 - michaelwoerister:associated-types, r=alexcrichtonSteve Klabnik-0/+152
This should fix issue #20797 (but I don't want to close it automatically). As the actual fix is very small this would be a perfect candidate for a rollup.
2015-01-22Fix some grammar inconsistencies for the '..' range notation.Daniel Grunwald-0/+39
Grammar changes: * allow 'for _ in 1..i {}' (fixes #20241) * allow 'for _ in 1.. {}' as infinite loop * prevent use of range notation in contexts where only operators of high precedence are expected (fixes #20811) Parser code cleanup: * remove RESTRICTION_NO_DOTS * make AS_PREC const and follow naming convention * make min_prec inclusive
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-21debuginfo: Fix issue with associated types and struct fieldsMichael Woerister-0/+152
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