about summary refs log tree commit diff
path: root/src/test/pretty/issue-4264.pp
AgeCommit message (Collapse)AuthorLines
2019-03-15rustc: pass Option<&Substs> and Namespace around in ty::item_path.Eduard-Mihai Burtescu-17/+17
2018-12-25Remove licensesMark Rousskov-10/+0
2018-12-19Reintroduce special pretty-printing for `$crate` when it's necessary for ↵Vadim Petrochenkov-2/+2
proc macros
2018-08-14syntax: gensym the injected std/core extern crates in the Rust 2018 edition.Eduard-Mihai Burtescu-1/+1
2018-07-12fix expected output of pretty/cast-lt and issue-4264 testsTinco Andringa-1/+1
2017-12-12Fix fallout in tests.Jeffrey Seyfried-1/+1
2017-10-08Fix testsWonwoo Choi-25/+25
2017-09-10Use rvalue promotion to 'static instead of static items.Eduard-Mihai Burtescu-16/+6
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-58/+66
2016-10-19Improve `$crate`.Jeffrey Seyfried-1/+1
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-09Print fn type parameters for TyFnDef.Eduard Burtescu-2/+4
2015-09-17Changes to testsNick Cameron-4/+3
2015-09-03Add an intital HIR and lowering stepNick Cameron-3/+1
2015-07-05Feature-gate #[prelude_import].Eduard Burtescu-1/+1
2015-03-24rustc: Add support for `extern crate foo as bar`Alex Crichton-1/+1
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-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-2/+2
2015-02-18Fix remaining bench/debuginfo tests (and a few stragglers)Niko Matsakis-6/+6
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-2/+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-01-31Kill more `isize`sTobias Bucher-13/+12
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-21tests: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-2/+2
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-15/+16
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-2/+1
2015-01-02std: Stabilize the prelude moduleAlex Crichton-1/+1
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2014-12-27Fallout of changing format_args!(f, args) to f(format_args!(args)).Eduard Burtescu-25/+39
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-20Allow use of `[_ ; n]` syntax for fixed length and repeating arrays.Nick Cameron-18/+17
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-08test: adjust pretty/issue-4264 for formatting changes.Eduard Burtescu-15/+10
2014-11-20Fallout from libgreen and libnative removalAaron Turon-1/+0
2014-11-17Fix fallout from coercion removalNick Cameron-3/+4
2014-10-09test: Convert statics to constantsAlex Crichton-1/+1
Additionally, add lots of tests for new functionality around statics and `static mut`.
2014-10-03Test fixes from the rollupAlex Crichton-14/+14
2014-09-09Decouple string and argument piecesPiotr Czarnecki-14/+8
2014-08-27Implement generalized object and type parameter bounds (Fixes #16462)Niko Matsakis-7/+7
2014-08-27auto merge of #16689 : wickerwaka/rust/crate-as, r=pcwaltonbors-2/+2
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-2/+2
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-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-29Add pretty=typed test support to compiletest and add a test for fixed size ↵Luqman Aden-0/+95
arrays.