about summary refs log tree commit diff
path: root/src/test/pretty
AgeCommit message (Collapse)AuthorLines
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]
2014-05-14test: Remove all uses of `~str` from the test suite.Patrick Walton-1/+1
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-3/+4
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-04-18Replace all ~"" with "".to_owned()Richo Healey-6/+14
2014-04-14Use new attribute syntax in python files in src/etc too (#13478)Manish Goregaokar-1/+1
2014-04-06Remove check-fast. Closes #4193, #8844, #6330, #7416Brian Anderson-1/+0
2014-04-04Test fixes from rollupAlex Crichton-2/+2
2014-04-04Fix inner attribute syntax from `#[foo];` to `#![foo]`Timothée Ravier-1/+1
From the 0.10 changelog: * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
2014-03-22test: Remove Freeze / NoFreeze from testsFlavio Percoco-3/+3
2014-03-22Remove outdated and unnecessary std::vec_ng::Vec imports.Huon Wilson-1/+0
(And fix some tests.)
2014-03-21test: Make manual changes to deal with the fallout from removal ofPatrick Walton-73/+44
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
2014-03-21test: Automatically remove all `~[T]` from tests.Patrick Walton-14/+14
2014-02-27Fix a pretty printer crash on `/***`.Chris Morgan-0/+14
The pretty printer was treating block comments with more than two asterisks after the first slash (e.g. `/***`) as doc comments (which are attributes), whereas in actual fact they are just regular comments.
2014-02-14extern mod => extern crateAlex Crichton-1/+1
This was previously implemented, and it just needed a snapshot to go through
2014-02-11Change `xfail` directives in compiletests to `ignore`, closes #11363Florian Hahn-10/+10
2014-02-07Added tests to make tidyDerek Guenther-2/+44
2014-01-03test: De-`@mut` the test suitePatrick Walton-4/+9
2013-12-14Handle more cases in the heap lintsAlex Crichton-0/+2
2013-11-27Fix handling of upper/lowercase, and whitespaceFlorian Zeitz-9/+7
2013-11-27Update Unicode data to version 6.3Florian Zeitz-44/+44
2013-11-26librustc: Fix merge fallout.Patrick Walton-2/+2
2013-11-18librustc: Convert `~fn()` to `proc()` everywhere.Patrick Walton-1/+1
2013-10-31librustc: Implement `|A| -> B` syntax for closures and make bare `fn`Patrick Walton-4/+21
work
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-10-22Activate checking code for ASM feature gate. Fix testsLéo Testard-0/+3
2013-10-08pp: add test for raw strs in non-expression positionsBenjamin Herr-0/+16
2013-09-30pretty: Remove usage of fmt!Alex Crichton-3/+3
2013-09-24auto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphismbors-5/+5
Progress on #7981 This doesn't completely close the issue because `struct A;` is still allowed, and it's a much larger change to disallow that. I'm also not entirely sure that we want to disallow that. Regardless, punting that discussion to the issue instead.
2013-09-24Stop accepting 'impl ...;', require {} insteadAlex Crichton-5/+5
Progress on #7981
2013-09-23test: Fix rustdoc and tests.Patrick Walton-14/+1
2013-09-17pp: also print bounds in paths with no generic paramsBenjamin Herr-0/+13
Since 3b6314c3 the pretty printer seems to only print trait bounds for `ast::ty_path(...)`s that have a generics arguments list. That seems wrong, so let's always print them. Closes #9253, un-xfails test for #7673.
2013-09-11Fix the empty-impl testsJakub-4/+4
Use an existing type so that it compiles.
2013-09-08Fix pretty-printing of empty impl itemsJakub-0/+10