summary refs log tree commit diff
path: root/src/test/pretty
AgeCommit message (Collapse)AuthorLines
2017-09-10Use rvalue promotion to 'static instead of static items.Eduard-Mihai Burtescu-16/+6
2017-02-05Update pretty test for derive attributesJosh Driver-51/+65
Remove attr-variant-data.rs since it relies on quirks in legacy custom derive resolution (undefined derives only print a warning). Add a new test which uses a defined proc macro derive, and tests pretty printing of proc macro derive attributes.
2017-01-17AST/HIR: Merge ObjectSum and PolyTraitRefVadim Petrochenkov-3/+3
2016-12-22Pretty-print `$crate::foo::bar` as `::foo::bar`.Jeffrey Seyfried-1/+1
2016-11-28rustc: desugar UFCS as much as possible during HIR lowering.Eduard Burtescu-1/+1
2016-11-10tests: fix fallout in pretty-printing output exact-match tests.Eduard Burtescu-66/+80
2016-10-31Changed most vec! invocations to use square bracesiirelu-2/+2
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-19Improve `$crate`.Jeffrey Seyfried-1/+1
2016-10-18Fix some pretty printing testsVadim Petrochenkov-1/+0
2016-08-25Implement RFC#1559: allow all literals in attributes.Sergio Benitez-0/+23
2016-06-29Fix pretty-printing of lifetime boundSeo Sanghyeon-1/+16
2016-06-17Pretty-print attributes on tuple structs and add testsErick Tryzelaar-0/+51
This adds support to the pretty printer to print attributes added to tuple struct elements. Furthermore, it adds a test that makes sure we will print attributes on all variant data types.
2016-03-30Fix fallout in testsJeffrey Seyfried-36/+36
2016-03-25Fix accursed issue-4264.ppNiko Matsakis-29/+29
2016-03-18Update the not-at-all-pretty pain-o-tron-4000+264 test.Eduard Burtescu-29/+29
2016-03-16Auto merge of #31746 - erickt:newline, r=sfacklerbors-0/+20
syntax: Always pretty print a newline after doc comments Before this patch, code that had a doc comment as the first line, as in: ```rust /// Foo struct Foo; ``` Was pretty printed into: ```rust ///Foostruct Foo; ``` This makes sure that that there is always a trailing newline after a doc comment. Closes #31722
2016-03-09Print fn type parameters for TyFnDef.Eduard Burtescu-2/+4
2016-03-07syntax: Always pretty print a newline after doc commentsErick Tryzelaar-0/+20
Before this patch, code that had a doc comment as the first line, as in: ```rust /// Foo struct Foo; ``` Was pretty printed into: ```rust ///Foostruct Foo; ``` This makes sure that that there is always a trailing newline after a doc comment. Closes #31722
2016-01-28libsyntax: fix pretty printing of macro with bracesTomasz Miąsko-0/+17
Pretty printing of macro with braces but without terminated semicolon removed more boxes from stack than it put there, resulting in panic. This fixes the issue #30731.
2016-01-25Fix pretty_printer to print omitted type `_` markernxnfufunezn-0/+34
2015-11-26Added stmt_expr_attribute feature gateMarvin Löbel-0/+1
2015-11-26Add syntax support for attributes on expressions and all syntaxMarvin Löbel-0/+281
nodes in statement position. Extended #[cfg] folder to allow removal of statements, and of expressions in optional positions like expression lists and trailing block expressions. Extended lint checker to recognize lint levels on expressions and locals.
2015-09-17Changes to testsNick Cameron-4/+3
2015-09-03Add an intital HIR and lowering stepNick Cameron-4/+2
2015-08-11Fix #27567: remove --crate-type=lib from pretty testTim Neumann-0/+22
2015-08-11remove unused file in test/prettyTim Neumann-5/+0
2015-08-08rustc: rename multiple imports in a listSean McArthur-0/+14
2015-07-05Feature-gate #[prelude_import].Eduard Burtescu-1/+1
2015-06-13Use `assert_eq!` instead of `assert!` in testspetrochenkov-1/+1
2015-06-12ignore-test cleanupSteve Klabnik-22/+0
Most of these are old, but some specific messages for specific tests: * trait-contravariant-self.rs: failed due to a soundess hole: https://github.com/rust-lang/rust/commit/05e3248a7974f55b64f75a2483b37ff8c001a4ff * process-detatch: https://github.com/rust-lang/rust/commit/15966c3c1f99810ac81053769651776a67181dae says "this test is being ignored until signals are implemented" That's not happening for a long time, and when it is, we'll write tests for it. * deep-vector{,2}.rs: "too big for our poor macro infrastructure", and has been ignored over a year. * borrowck-nested-calls.rs's FIXME #6268 was closed in favor of rust-lang/rfcs#811 * issue-15167.rs works properly now * issue-9737.rs works properly now * match-var-hygiene.rs works properly now Addresses a chunk of #3965
2015-05-04Correct pretty-printing of `type Foo<T> where T: Bound = ...;`Felix S. Klock II-0/+17
Fix #25031
2015-04-21std: Bring back f32::from_str_radix as an unstable APIAlex Crichton-4/+2
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types.
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-2/+0
2015-04-01Fallout in testsNiko Matsakis-1/+1
2015-03-30Fallout in tests: largely changes to error messages.Niko Matsakis-13/+0
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-32/+32
Now that support has been removed, all lingering use cases are renamed.
2015-03-24rollup merge of #23546: alexcrichton/hyphensAlex Crichton-2/+2
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
2015-03-24rustc: Add support for `extern crate foo as bar`Alex Crichton-2/+2
The compiler will now issue a warning for crates that have syntax of the form `extern crate "foo" as bar`, but it will still continue to accept this syntax. Additionally, the string `foo-bar` will match the crate name `foo_bar` to assist in the transition period as well. This patch will land hopefully in tandem with a Cargo patch that will start translating all crate names to have underscores instead of hyphens. cc #23533
2015-03-25Add trivial cast lints.Nick Cameron-1/+1
This permits all coercions to be performed in casts, but adds lints to warn in those cases. Part of this patch moves cast checking to a later stage of type checking. We acquire obligations to check casts as part of type checking where we previously checked them. Once we have type checked a function or module, then we check any cast obligations which have been acquired. That means we have more type information available to check casts (this was crucial to making coercions work properly in place of some casts), but it means that casts cannot feed input into type inference. [breaking change] * Adds two new lints for trivial casts and trivial numeric casts, these are warn by default, but can cause errors if you build with warnings as errors. Previously, trivial numeric casts and casts to trait objects were allowed. * The unused casts lint has gone. * Interactions between casting and type inference have changed in subtle ways. Two ways this might manifest are: - You may need to 'direct' casts more with extra type information, for example, in some cases where `foo as _ as T` succeeded, you may now need to specify the type for `_` - Casts do not influence inference of integer types. E.g., the following used to type check: ``` let x = 42; let y = &x as *const u32; ``` Because the cast would inform inference that `x` must have type `u32`. This no longer applies and the compiler will fallback to `i32` for `x` and thus there will be a type error in the cast. The solution is to add more type information: ``` let x: u32 = 42; let y = &x as *const u32; ```
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-1/+1
2015-03-15Strip all leading/trailing newlinesTamir Duberstein-4/+0
2015-03-06syntax: Remove deprecated unicode escapesAlex Crichton-8/+10
These have been deprecated for quite some time, so we should be good to remove them now.
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-5/+5
2015-02-22Fix test falloutsFlavio Percoco-1/+3
2015-02-22Test all the thingsFlavio Percoco-0/+19
2015-02-18rollup merge of #22286: nikomatsakis/variance-4bAlex Crichton-3/+5
Conflicts: src/librustc/middle/infer/combine.rs src/librustc_typeck/check/wf.rs
2015-02-18Fallout: tests. As tests frequently elide things, lots of changesNiko Matsakis-3/+5
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
2015-02-18Fix remaining bench/debuginfo tests (and a few stragglers)Niko Matsakis-9/+9
2015-02-18Convert required suffixes into a use of `as`.Niko Matsakis-1/+1
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-8/+8