about summary refs log tree commit diff
path: root/src/test/pretty/issue-4264.pp
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-57/+0
2022-09-26address reviewb-naber-1/+1
2022-09-23Bless pretty tests.Camille GILLOT-3/+3
2022-04-23Bless pretty-print output.Camille GILLOT-9/+9
2022-01-31Bless all pretty printer tests and ui testsDavid Tolnay-2/+1
2022-01-30Bless all pretty printer tests and ui testsDavid Tolnay-45/+25
2022-01-17Emit simpler code from format_argsDavid Tolnay-10/+1
2021-11-06Don't destructure args tuple in format_args!Cameron Steffen-1/+1
2021-09-21Use ZST for fmt unsafetyCameron Steffen-33/+23
This allows the format_args! macro to keep the pre-expansion code out of the unsafe block without doing gymnastics with nested `match` expressions. This reduces codegen.
2021-08-16Make Arguments constructors unsafeCameron Steffen-23/+33
2021-02-25Update test/pretty output for edition preludes.Mara Bos-1/+1
2020-09-02pretty: trim paths of unique symbolsDan Aloni-28/+28
If a symbol name can only be imported from one place for a type, and as long as it was not glob-imported anywhere in the current crate, we can trim its printed path and print only the name. This has wide implications on error messages with types, for example, shortening `std::vec::Vec` to just `Vec`, as long as there is no other `Vec` importable anywhere. This adds a new '-Z trim-diagnostic-paths=false' option to control this feature. On the good path, with no diagnosis printed, we should try to avoid issuing this query, so we need to prevent trimmed_def_paths query on several cases. This change also relies on a previous commit that differentiates between `Debug` and `Display` on various rustc types, where the latter is trimmed and presented to the user and the former is not.
2020-07-17Make fmt::Arguments::as_str() return a 'static str.Mara Bos-21/+21
2020-03-17Update tests for erasing regions in typeckMatthew Jasper-22/+22
2019-11-02Merge branch 'master' into format-temporariesJon Gjengset-1/+1
2019-10-28Fix a previously forgotten pretty-printing test after a change to the ↵Patryk Wychowaniec-1/+1
pretty-printing mechanism.
2019-09-28Update pretty-print test with new format! implJon Gjengset-26/+30
2019-08-10resolve: Remove remaining special cases from built-in macrosVadim Petrochenkov-1/+1
2019-07-15pprust: Move some methods to the `PrintState` traitVadim Petrochenkov-2/+2
So that path and macro argument printing code can be shared
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