about summary refs log tree commit diff
path: root/src/test/pretty
AgeCommit message (Collapse)AuthorLines
2014-12-27Fallout of changing format_args!(f, args) to f(format_args!(args)).Eduard Burtescu-25/+39
2014-12-22rollup merge of #19891: nikomatsakis/unique-fn-types-3Alex Crichton-16/+17
Conflicts: src/libcore/str.rs src/librustc_trans/trans/closure.rs src/librustc_typeck/collect.rs src/libstd/path/posix.rs src/libstd/path/windows.rs
2014-12-22Fix fallout from changes. In cases where stage0 compiler is needed, weNiko Matsakis-16/+17
cannot use an `as` expression to coerce, so I used a one-off function instead (this is a no-op in stage0, but in stage1+ it triggers coercion from the fn pointer to the fn item type).
2014-12-22pprust: Fix asm optionsklutzy-0/+21
2014-12-21rollup merge of #20057: nick29581/array-syntaxAlex Crichton-19/+18
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported. Part of #19999 r? @nikomatsakis
2014-12-20patch up pretty-printing testNiko Matsakis-3/+4
2014-12-20Add parser support for generalized where clausesJared Roesch-0/+15
Implement support in the parser for generalized where clauses, as well as the conversion of ast::WherePredicates to ty::Predicate in `collect.rs`.
2014-12-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-19/+18
This does NOT break any existing programs because the `[_, ..n]` syntax is also supported.
2014-12-15Remove all shadowed lifetimes.Niko Matsakis-8/+8
2014-12-14Parse `unsafe impl` but don't do anything particularly interesting with the ↵Niko Matsakis-0/+4
results.
2014-12-14Parse `unsafe trait` but do not do anything with it beyond parsing and ↵Niko Matsakis-0/+21
integrating into rustdoc etc.
2014-12-14Mostly rote conversion of `proc()` to `move||` (and occasionally `Thunk::new`)Niko Matsakis-2/+1
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-0/+2
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-08test: adjust pretty/issue-4264 for formatting changes.Eduard Burtescu-15/+10
2014-11-30syntax: Make `asm!` clobbers a proper vector.Kang Seonghoon-0/+14
Otherwise `--pretty expanded` diverges.
2014-11-23Fixes to the roll-upJakub Bukaj-1/+1
2014-11-22Add testAdolfo Ochagavía-0/+20
2014-11-20Fallout from libgreen and libnative removalAaron Turon-1/+0
2014-11-17Fix fallout from coercion removalNick Cameron-3/+4
2014-11-04libsyntax: Forbid escapes in the inclusive range `\x80`-`\xff` inPatrick Walton-5/+5
Unicode characters and strings. Use `\u0080`-`\u00ff` instead. ASCII/byte literals are unaffected. This PR introduces a new function, `escape_default`, into the ASCII module. This was necessary for the pretty printer to continue to function. RFC #326. Closes #18062. [breaking-change]
2014-10-29Rename fail! to panic!Steve Klabnik-1/+1
https://github.com/rust-lang/rfcs/pull/221 The current terminology of "task failure" often causes problems when writing or speaking about code. You often want to talk about the possibility of an operation that returns a Result "failing", but cannot because of the ambiguity with task failure. Instead, you have to speak of "the failing case" or "when the operation does not succeed" or other circumlocutions. Likewise, we use a "Failure" header in rustdoc to describe when operations may fail the task, but it would often be helpful to separate out a section describing the "Err-producing" case. We have been steadily moving away from task failure and toward Result as an error-handling mechanism, so we should optimize our terminology accordingly: Result-producing functions should be easy to describe. To update your code, rename any call to `fail!` to `panic!` instead. Assuming you have not created your own macro named `panic!`, this will work on UNIX based systems: grep -lZR 'fail!' . | xargs -0 -l sed -i -e 's/fail!/panic!/g' You can of course also do this by hand. [breaking-change]
2014-10-27Preserve struct field pattern shorthand in the prettyprinter.Kevin Mehall-0/+15
Use the `is_shorthand` field introduced by #17813 (ead6c4b) to make the prettyprinter output the shorthand form. Fixes a few places that set `is_shorthand: true` when the pattern is not a PatIdent with the same name as the field.
2014-10-09test: Convert statics to constantsAlex Crichton-2/+2
Additionally, add lots of tests for new functionality around statics and `static mut`.
2014-10-03Test fixes from the rollupAlex Crichton-14/+14
2014-10-02Test fixes from the rollupAlex Crichton-1/+1
2014-10-02tests: remove uses of Gc.Eduard Burtescu-9/+8
2014-09-27Convert cfg syntax to new systemSteven Fackler-1/+1
This removes the ability to use `foo(bar)` style cfgs. Switch them to `foo_bar` or `foo="bar"` instead. [breaking-change]
2014-09-19Add enum variants to the type namespaceNick Cameron-2/+2
Change to resolve and update compiler and libs for uses. [breaking-change] Enum variants are now in both the value and type namespaces. This means that if you have a variant with the same name as a type in scope in a module, you will get a name clash and thus an error. The solution is to either rename the type or the variant.
2014-09-09Decouple string and argument piecesPiotr Czarnecki-14/+8
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-9/+9
2014-08-27auto merge of #16689 : wickerwaka/rust/crate-as, r=pcwaltonbors-3/+3
For review. Not sure about the link_attrs stuff. Will work on converting all the tests. extern crate "foobar" as foo; extern crate foobar as foo; Implements remaining part of RFC #47. Addresses issue #16461. Removed link_attrs from rust.md, they don't appear to be supported by the parser.
2014-08-26Rebasing changesNick Cameron-3/+3
2014-08-23extern crate foobar as foo;wickerwaka-3/+3
Implements remaining part of RFC #47. Addresses issue #16461. Removed link_attrs from rust.md, they don't appear to be supported by the parser. Changed all the tests to use the new extern crate syntax Change pretty printer to use 'as' syntax
2014-08-16librustc: Forbid external crates, imports, and/or items from beingPatrick Walton-0/+1
declared with the same name in the same scope. This breaks several common patterns. First are unused imports: use foo::bar; use baz::bar; Change this code to the following: use baz::bar; Second, this patch breaks globs that import names that are shadowed by subsequent imports. For example: use foo::*; // including `bar` use baz::bar; Change this code to remove the glob: use foo::{boo, quux}; use baz::bar; Or qualify all uses of `bar`: use foo::{boo, quux}; use baz; ... baz::bar ... Finally, this patch breaks code that, at top level, explicitly imports `std` and doesn't disable the prelude. extern crate std; Because the prelude imports `std` implicitly, there is no need to explicitly import it; just remove such directives. The old behavior can be opted into via the `import_shadowing` feature gate. Use of this feature gate is discouraged. This implements RFC #116. Closes #16464. [breaking-change]
2014-08-07Rename `Share` to `Sync`Alex Crichton-3/+3
This leaves the `Share` trait at `std::kinds` via a `#[deprecated]` `pub use` statement, but the `NoShare` struct is no longer part of `std::kinds::marker` due to #12660 (the build cannot bootstrap otherwise). All code referencing the `Share` trait should now reference the `Sync` trait, and all code referencing the `NoShare` type should now reference the `NoSync` type. The functionality and meaning of this trait have not changed, only the naming. Closes #16281 [breaking-change]
2014-07-30auto merge of #16037 : erickt/rust/quote_arm, r=acrichtobors-2/+18
This adds support for `quote_arm!(cx, $pat => $expr)`, and `macro_rules!(($a:arm) => (...))`. It also fixes a bug in pretty printing, where this would generate invalid code: ``` match { 5i } { 1 => 2, _ => 3, } ``` It would generate this code: ``` match { 5i } { 1 => 2 _ => 3 } ``` Finally, it adds a couple helper methods to `ExtCtxt`.
2014-07-29Test fixes from the rollupAlex Crichton-1/+1
Closes #15296 (Update disclaimer to improve clarity and intent) Closes #15804 (Don't ICE when dealing with the count expr for fixed array types in various places.) Closes #15893 (lint: Improve ffi-unsafe enum lint warning) Closes #16045 (Rename Integer divides to is_multiple_of.) Closes #16055 (manual: update list of feature gates, add phase attribute) Closes #16056 (Improve documentation of rounding functions) Closes #16061 (Remove references to non-existant functions in the std::path documentation) Closes #16062 (Fix documentation error in MutableVectorAllocating::move_from) Closes #16063 (adding discuss.rust-lang to community) Closes #16064 (rustc: Switch dsymutil status => output) Closes #16066 (making raw source display better) Closes #16079 (doc: add missing word) Closes #16080 (Update LLVM to fix miscompilations due to wrongfully removed lifetime intrinsics) Closes #16084 (Elide lifetimes around Arc<T>.) Closes #16085 (Gedit/gtksourceview language spec: add raw strings) Closes #16086 (Implement Hash for DList)
2014-07-29Fix a bug pretty printing `match { 5i } { _ => { } }`Erick Tryzelaar-2/+18
This also always puts a trailing comma on the last non-block expr.
2014-07-29Add pretty=typed test support to compiletest and add a test for fixed size ↵Luqman Aden-0/+144
arrays.
2014-07-26Remove managed_box gate from testsBrian Anderson-1/+0
No longer does anything.
2014-07-21Fix pretty testCorey Richardson-0/+1
2014-07-21Add a ton of ignore-lexer-testCorey Richardson-0/+1
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-35/+35
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-24librustc: Remove the fallback to `int` from typechecking.Niko Matsakis-1/+1
This breaks a fair amount of code. The typical patterns are: * `for _ in range(0, 10)`: change to `for _ in range(0u, 10)`; * `println!("{}", 3)`: change to `println!("{}", 3i)`; * `[1, 2, 3].len()`: change to `[1i, 2, 3].len()`. RFC #30. Closes #6023. [breaking-change]
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-8/+9
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-13Rolling up PRs in the queueAlex Crichton-3/+3
Closes #14797 (librustc: Fix the issue with labels shadowing variable names by making) Closes #14823 (Improve error messages for io::fs) Closes #14827 (libsyntax: Allow `+` to separate trait bounds from objects.) Closes #14834 (configure: Don't sync unused submodules) Closes #14838 (Remove typo on collections::treemap::UnionItems) Closes #14839 (Fix the unused struct field lint for struct variants) Closes #14840 (Clarify `Any` docs) Closes #14846 (rustc: [T, ..N] and [T, ..N+1] are not the same) Closes #14847 (Audit usage of NativeMutex) Closes #14850 (remove unnecessary PaX detection) Closes #14856 (librustc: Take in account mutability when casting array to raw ptr.) Closes #14859 (librustc: Forbid `transmute` from being called on types whose size is) Closes #14860 (Fix `quote_pat!` & parse outer attributes in `quote_item!`)
2014-05-27Move std::{reflect,repr,Poly} to a libdebug crateAlex Crichton-2/+2
This commit moves reflection (as well as the {:?} format modifier) to a new libdebug crate, all of which is marked experimental. This is a breaking change because it now requires the debug crate to be explicitly linked if the :? format qualifier is used. This means that any code using this feature will have to add `extern crate debug;` to the top of the crate. Any code relying on reflection will also need to do this. Closes #12019 [breaking-change]
2014-05-27std: Remove String's to_ownedRicho Healey-6/+6
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-05-22libcore: Remove all uses of `~str` from `libcore`.Patrick Walton-25/+0
[breaking-change]