about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2015-02-08Rename Show to Debug, String to DisplayAlexander Korolkov-1/+0
Update reference.md: - derive() no longer supports Zero trait - derive() now supports Copy trait
2015-02-07Fix libsyntax so we can bootstrap even with move out of array restriction.Felix S. Klock II-2/+2
2015-02-06Update to last version, remove "[]" as much as possibleGuillaumeGomez-3/+3
2015-02-06Libsyntax has been updatedGuillaumeGomez-5/+4
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-4/+5
2015-02-03Remove the explicit closure kind syntax from the parser and AST;Niko Matsakis-9/+1
upgrade the inference based on expected type so that it is able to infer the fn kind in isolation even if the full signature is not available (and we could perhaps do better still in some cases, such as extracting just the types of the arguments but not the return value).
2015-01-30custom message for refutable patterns in for loopsJorge Aparicio-0/+1
2015-01-29s/Show/Debug/gJorge Aparicio-96/+96
2015-01-28Move return type an associated type of the `Fn*` traits. Mostly this ↵Niko Matsakis-0/+3
involves tweaking things in the compiler that assumed two input types to assume two ouputs; we also have to teach `project.rs` to project `Output` from the unboxed closure and fn traits.
2015-01-26Remove every mention of "onceness".Eduard Burtescu-16/+0
2015-01-26Remove dead code related to old closures.Eduard Burtescu-10/+0
2015-01-26Remove "unboxed" attribute in code referring to new closures.Eduard Burtescu-6/+6
2015-01-25Add the span of the operator itself to ast::BinOp.Huon Wilson-2/+4
2015-01-21rollup merge of #20179: eddyb/blind-itemsAlex Crichton-38/+11
Conflicts: src/librustc/diagnostics.rs src/librustdoc/clean/mod.rs src/librustdoc/html/format.rs src/libsyntax/parse/parser.rs
2015-01-21rollup merge of #21457: alexcrichton/issue-21436Alex Crichton-30/+21
Conflicts: src/liballoc/boxed.rs src/librustc/middle/traits/error_reporting.rs src/libstd/sync/mpsc/mod.rs
2015-01-21rollup merge of #21340: pshc/libsyntax-no-more-intsAlex Crichton-15/+15
Collaboration with @rylev! I didn't change `int` in the [quasi-quoter](https://github.com/pshc/rust/blob/99ae1a30f3ca28c0f7e431620560d30e44627124/src/libsyntax/ext/quote.rs#L328), because I'm not sure if there will be adverse effects. Addresses #21095.
2015-01-21syntax: merge ast::ViewItem into ast::Item.Eduard Burtescu-38/+11
2015-01-20std: Rename Show/String to Debug/DisplayAlex Crichton-30/+21
This commit is an implementation of [RFC 565][rfc] which is a stabilization of the `std::fmt` module and the implementations of various formatting traits. Specifically, the following changes were performed: [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0565-show-string-guidelines.md * The `Show` trait is now deprecated, it was renamed to `Debug` * The `String` trait is now deprecated, it was renamed to `Display` * Many `Debug` and `Display` implementations were audited in accordance with the RFC and audited implementations now have the `#[stable]` attribute * Integers and floats no longer print a suffix * Smart pointers no longer print details that they are a smart pointer * Paths with `Debug` are now quoted and escape characters * The `unwrap` methods on `Result` now require `Display` instead of `Debug` * The `Error` trait no longer has a `detail` method and now requires that `Display` must be implemented. With the loss of `String`, this has moved into libcore. * `impl<E: Error> FromError<E> for Box<Error>` now exists * `derive(Show)` has been renamed to `derive(Debug)`. This is not currently warned about due to warnings being emitted on stage1+ While backwards compatibility is attempted to be maintained with a blanket implementation of `Display` for the old `String` trait (and the same for `Show`/`Debug`) this is still a breaking change due to primitives no longer implementing `String` as well as modifications such as `unwrap` and the `Error` trait. Most code is fairly straightforward to update with a rename or tweaks of method calls. [breaking-change] Closes #21436
2015-01-18Make output type in ast::FnDecl optionalSeo Sanghyeon-0/+5
2015-01-17libsyntax: rename functions from uint to usizePaul Collier-2/+2
2015-01-17libsyntax: uint types to usizePaul Collier-14/+14
2015-01-15auto merge of #21052 : nick29581/rust/methods-ext, r=sfacklerbors-1/+1
Allows modifiers to be used on methods, associated types, etc. r? @sfackler
2015-01-15syntax: add fully qualified UFCS expressions.Eduard Burtescu-2/+4
2015-01-15Syntax extensions on trait and impl items.Nick Cameron-1/+1
Allows modifiers to be used on methods, associated types, etc.
2015-01-13Add view items to the ast mapNick Cameron-0/+13
2015-01-08Store deprecated status of i/u-suffixed literals.Huon Wilson-8/+36
2015-01-07Test fixes and rebase conflictsAlex Crichton-3/+0
2015-01-07rollup merge of #20721: japaric/snapAlex Crichton-1/+1
Conflicts: src/libcollections/vec.rs src/libcore/fmt/mod.rs src/librustc/lint/builtin.rs src/librustc/session/config.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/context.rs src/librustc_trans/trans/type_.rs src/librustc_typeck/check/_match.rs src/librustdoc/html/format.rs src/libsyntax/std_inject.rs src/libsyntax/util/interner.rs src/test/compile-fail/mut-pattern-mismatched.rs
2015-01-07use slicing sugarJorge Aparicio-1/+1
2015-01-07Register new snapshotsAlex Crichton-4/+0
2015-01-06More test fixesAlex Crichton-5/+5
2015-01-06rollup merge of #19430: pczarn/interp_tt-cleanupAlex Crichton-6/+0
Conflicts: src/libsyntax/parse/parser.rs
2015-01-06rollup merge of #20593: nikomatsakis/unused-tps-in-implAlex Crichton-2/+2
Conflicts: src/libcollections/lib.rs src/librustc/lib.rs src/libserialize/lib.rs src/libstd/lib.rs
2015-01-07Cleanup and followup to PR #17830: parsing changesPiotr Czarnecki-6/+0
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes #18775 Fixes #18839 Fixes #15640
2015-01-06Register new snapshotsAlex Crichton-16/+0
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-12/+55
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-06rollup merge of #20609: cmr/memAlex Crichton-4/+4
2015-01-07falloutNick Cameron-1/+1
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-12/+55
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-06Fix fallout in libs. For the most part I just tagged impls as ↵Niko Matsakis-2/+2
`#[old_impl_check]`.
2015-01-07Replace full slice notation with index callsNick Cameron-1/+1
2015-01-06syntax/rustc: implement isize/usizeCorey Richardson-4/+4
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-1/+23
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-05rollup merge of #20554: huonw/mut-patternAlex Crichton-1/+1
Conflicts: src/librustc_typeck/check/_match.rs
2015-01-05Allow selective macro importKeegan McAllister-0/+1
2015-01-05Move #[macro_reexport] to extern crateKeegan McAllister-0/+1
2015-01-05remove TyClosureJorge Aparicio-2/+0
2015-01-05Reformat metadata for exported macrosKeegan McAllister-1/+14
Instead of copy-pasting the whole macro_rules! item from the original .rs file, we serialize a separate name, attributes list, and body, the latter as pretty-printed TTs. The compilation of macro_rules! macros is decoupled somewhat from the expansion of macros in item position. This filters out comments, and facilitates selective imports.
2015-01-05Add a special macro nonterminal $crateKeegan McAllister-0/+7
2015-01-04serialize: Use assoc types + less old_orphan_checkAlex Crichton-22/+18
This commit moves the libserialize crate (and will force the hand of the rustc-serialize crate) to not require the `old_orphan_check` feature gate as well as using associated types wherever possible. Concretely, the following changes were made: * The error type of `Encoder` and `Decoder` is now an associated type, meaning that these traits have no type parameters. * The `Encoder` and `Decoder` type parameters on the `Encodable` and `Decodable` traits have moved to the corresponding method of the trait. This movement alleviates the dependency on `old_orphan_check` but implies that implementations can no longer be specialized for the type of encoder/decoder being implemented. Due to the trait definitions changing, this is a: [breaking-change]