about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
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-19Auto merge of #23507 - jbcrail:fix-comment-spelling, r=alexcrichtonbors-1/+1
I corrected misspelled comments in several crates.
2015-03-19Fix spelling errors in comments.Joseph Crail-1/+1
I corrected misspelled comments in several crates.
2015-03-19Rollup merge of #23428 - Manishearth:ast-doc, r=steveklabnikManish Goregaokar-15/+42
I often have to run `ast-json` or look into the pretty-printer source to figure out what the fields of an AST enum mean. I've tried to document most of what I know (and some semi-obvious stuff). r? @steveklabnik f? @eddyb
2015-03-19Space and punctuation fixesManish Goregaokar-14/+41
2015-03-19Address huon's commentsManish Goregaokar-1/+1
2015-03-19Update ast.rsmdinger-1/+1
Typo
2015-03-18Address huon's commentsManish Goregaokar-17/+21
2015-03-18Clarify ExprManish Goregaokar-5/+10
2015-03-18ast: Document Item and ForeignItemManish Goregaokar-9/+27
2015-03-18ast: Document LitManish Goregaokar-1/+15
2015-03-18ast: Document Pat and BlockManish Goregaokar-1/+19
2015-03-18ast: Document paths and `where` clausesManish Goregaokar-1/+15
2015-03-18ast: Document Expr_, UnOp, and BinOpManish Goregaokar-1/+70
2015-03-11syntax: move MethMac to MacImplItem and combine {Provided,Required}Method ↵Eduard Burtescu-12/+3
into MethodTraitItem.
2015-03-11syntax: rename TypeMethod to MethodSig and use it in MethDecl.Eduard Burtescu-10/+5
2015-03-11syntax: gather common fields of impl & trait items into their respective types.Eduard Burtescu-39/+27
2015-03-11syntax: move indirection around {Trait,Impl}Item, from within.Eduard Burtescu-6/+6
2015-03-08Fix array syntax in comment.Amol Mundayoor-1/+1
Fixes #22721.
2015-03-06Add #[allow_internal_unstable] to track stability for macros better.Huon Wilson-0/+1
Unstable items used in a macro expansion will now always trigger stability warnings, *unless* the unstable items are directly inside a macro marked with `#[allow_internal_unstable]`. IOW, the compiler warns unless the span of the unstable item is a subspan of the definition of a macro marked with that attribute. E.g. #[allow_internal_unstable] macro_rules! foo { ($e: expr) => {{ $e; unstable(); // no warning only_called_by_foo!(); }} } macro_rules! only_called_by_foo { () => { unstable() } // warning } foo!(unstable()) // warning The unstable inside `foo` is fine, due to the attribute. But the `unstable` inside `only_called_by_foo` is not, since that macro doesn't have the attribute, and the `unstable` passed into `foo` is also not fine since it isn't contained in the macro itself (that is, even though it is only used directly in the macro). In the process this makes the stability tracking much more precise, e.g. previously `println!("{}", unstable())` got no warning, but now it does. As such, this is a bug fix that may cause [breaking-change]s. The attribute is definitely feature gated, since it explicitly allows side-stepping the feature gating system.
2015-03-04Add quasiquote for matchers and attributesPiotr Czarnecki-0/+15
2015-02-24Implement `<T>::method` UFCS expression syntax.Eduard Burtescu-16/+21
2015-02-24syntax: use a single Path for Trait::Item in QPath.Eduard Burtescu-6/+5
2015-02-24syntax: don't use TraitRef in QPath.Eduard Burtescu-4/+4
2015-02-24syntax: don't store a secondary NodeId for TyPath.Eduard Burtescu-1/+1
2015-02-22Rename DefTrait to DefaultImplFlavio Percoco-2/+2
2015-02-22Add support for default trait impls in libsyntaxFlavio Percoco-1/+6
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-12Update metadata to reflect that predicates/schemes/trait-defs are now severedNiko Matsakis-0/+8
2015-02-10rollup merge of #22094: alkor/cleanup-show-stringAlex Crichton-1/+0
Rename several remaining `Show`s to Debug, `String`s to Display (mostly in comments and docs). Update reference.md: - derive() no longer supports Zero trait - derive() now supports Copy trait
2015-02-09Accept quantification of lifetimes outside the self type in where clauses.Nick Cameron-0/+3
Closes #20022
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