about summary refs log tree commit diff
path: root/src/test/pretty
AgeCommit message (Collapse)AuthorLines
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
2015-02-17Test fixes and rebase conflictsAlex Crichton-0/+2
2015-02-07Feature-gate #![no_std]Keegan McAllister-0/+1
Fixes #21833. [breaking-change]
2015-02-07Don't use std:: paths in syntax extensions when compiling a #![no_std] crateKeegan McAllister-34/+34
Fixes #16803. Fixes #14342. Fixes half of #21827 -- slice syntax is still broken.
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-3/+3
2015-01-31Kill more `isize`sTobias Bucher-20/+19
2015-01-30rollup merge of #21631: tbu-/isize_policeAlex Crichton-37/+37
Conflicts: src/libcoretest/iter.rs
2015-01-30std: Stabilize the std::fmt moduleAlex Crichton-32/+30
This commit performs a final stabilization pass over the std::fmt module, marking all necessary APIs as stable. One of the more interesting aspects of this module is that it exposes a good deal of its runtime representation to the outside world in order for `format_args!` to be able to construct the format strings. Instead of hacking the compiler to assume that these items are stable, this commit instead lays out a story for the stabilization and evolution of these APIs. There are three primary details used by the `format_args!` macro: 1. `Arguments` - an opaque package of a "compiled format string". This structure is passed around and the `write` function is the source of truth for transforming a compiled format string into a string at runtime. This must be able to be constructed in stable code. 2. `Argument` - an opaque structure representing an argument to a format string. This is *almost* a trait object as it's just a pointer/function pair, but due to the function originating from one of many traits, it's not actually a trait object. Like `Arguments`, this must be constructed from stable code. 3. `fmt::rt` - this module contains the runtime type definitions primarily for the `rt::Argument` structure. Whenever an argument is formatted with nonstandard flags, a corresponding `rt::Argument` is generated describing how the argument is being formatted. This can be used to construct an `Arguments`. The primary interface to `std::fmt` is the `Arguments` structure, and as such this type name is stabilize as-is today. It is expected for libraries to pass around an `Arguments` structure to represent a pending formatted computation. The remaining portions are largely "cruft" which would rather not be stabilized, but due to the stability checks they must be. As a result, almost all pieces have been renamed to represent that they are "version 1" of the formatting representation. The theory is that at a later date if we change the representation of these types we can add new definitions called "version 2" and corresponding constructors for `Arguments`. One of the other remaining large questions about the fmt module were how the pending I/O reform would affect the signatures of methods in the module. Due to [RFC 526][rfc], however, the writers of fmt are now incompatible with the writers of io, so this question has largely been solved. As a result the interfaces are largely stabilized as-is today. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md Specifically, the following changes were made: * The contents of `fmt::rt` were all moved under `fmt::rt::v1` * `fmt::rt` is stable * `fmt::rt::v1` is stable * `Error` is stable * `Writer` is stable * `Writer::write_str` is stable * `Writer::write_fmt` is stable * `Formatter` is stable * `Argument` has been renamed to `ArgumentV1` and is stable * `ArgumentV1::new` is stable * `ArgumentV1::from_uint` is stable * `Arguments::new_v1` is stable (renamed from `new`) * `Arguments::new_v1_formatted` is stable (renamed from `with_placeholders`) * All formatting traits are now stable, as well as the `fmt` method. * `fmt::write` is stable * `fmt::format` is stable * `Formatter::pad_integral` is stable * `Formatter::pad` is stable * `Formatter::write_str` is stable * `Formatter::write_fmt` is stable * Some assorted top level items which were only used by `format_args!` were removed in favor of static functions on `ArgumentV1` as well. * The formatting-flag-accessing methods remain unstable Within the contents of the `fmt::rt::v1` module, the following actions were taken: * Reexports of all enum variants were removed * All prefixes on enum variants were removed * A few miscellaneous enum variants were renamed * Otherwise all structs, fields, and variants were marked stable. In addition to these actions in the `std::fmt` module, many implementations of `Show` and `String` were stabilized as well. In some other modules: * `ToString` is now stable * `ToString::to_string` is now stable * `Vec` no longer implements `fmt::Writer` (this has moved to `String`) This is a breaking change due to all of the changes to the `fmt::rt` module, but this likely will not have much impact on existing programs. Closes #20661 [breaking-change]
2015-01-30Remove all `i` suffixesTobias Bucher-37/+37
2015-01-25cleanup: s/impl Copy/#[derive(Copy)]/gJorge Aparicio-2/+1
2015-01-21tests: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-2/+2
2015-01-18Make output type in ast::FnDecl optionalSeo Sanghyeon-0/+17
2015-01-16fix pretty test falloutFlavio Percoco-6/+2
2015-01-07More test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-07Preliminary feature stagingBrian Anderson-1/+0
This partially implements the feature staging described in the [release channel RFC][rc]. It does not yet fully conform to the RFC as written, but does accomplish its goals sufficiently for the 1.0 alpha release. It has three primary user-visible effects: * On the nightly channel, use of unstable APIs generates a warning. * On the beta channel, use of unstable APIs generates a warning. * On the beta channel, use of feature gates generates a warning. Code that does not trigger these warnings is considered 'stable', modulo pre-1.0 bugs. Disabling the warnings for unstable APIs continues to be done in the existing (i.e. old) style, via `#[allow(...)]`, not that specified in the RFC. I deem this marginally acceptable since any code that must do this is not using the stable dialect of Rust. Use of feature gates is itself gated with the new 'unstable_features' lint, on nightly set to 'allow', and on beta 'warn'. The attribute scheme used here corresponds to an older version of the RFC, with the `#[staged_api]` crate attribute toggling the staging behavior of the stability attributes, but the user impact is only in-tree so I'm not concerned about having to make design changes later (and I may ultimately prefer the scheme here after all, with the `#[staged_api]` crate attribute). Since the Rust codebase itself makes use of unstable features the compiler and build system to a midly elaborate dance to allow it to bootstrap while disobeying these lints (which would otherwise be errors because Rust builds with `-D warnings`). This patch includes one significant hack that causes a regression. Because the `format_args!` macro emits calls to unstable APIs it would trigger the lint. I added a hack to the lint to make it not trigger, but this in turn causes arguments to `println!` not to be checked for feature gates. I don't presently understand macro expansion well enough to fix. This is bug #20661. Closes #16678 [rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
2015-01-06test fallout from isize/usizeCorey Richardson-24/+25
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-2/+1
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-2/+1
2015-01-05fix pretty testsJorge Aparicio-5/+5
2015-01-04Put negative trait implemtations behind a feature gateFlavio Percoco-0/+2
2015-01-04Add syntax for negative implementations of traitsFlavio Percoco-0/+21
This commit introduces the syntax for negative implmenetations of traits as shown below: `impl !Trait for Type {}` cc #13231 Part of RFC #3