about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-5/+5
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-01fallout when bootstrapping `rustc`.Felix S. Klock II-1/+1
2015-03-31Stabilize std::numAaron Turon-0/+2
This commit stabilizes the `std::num` module: * The `Int` and `Float` traits are deprecated in favor of (1) the newly-added inherent methods and (2) the generic traits available in rust-lang/num. * The `Zero` and `One` traits are reintroduced in `std::num`, which together with various other traits allow you to recover the most common forms of generic programming. * The `FromStrRadix` trait, and associated free function, is deprecated in favor of inherent implementations. * A wide range of methods and constants for both integers and floating point numbers are now `#[stable]`, having been adjusted for integer guidelines. * `is_positive` and `is_negative` are renamed to `is_sign_positive` and `is_sign_negative`, in order to address #22985 * The `Wrapping` type is moved to `std::num` and stabilized; `WrappingOps` is deprecated in favor of inherent methods on the integer types, and direct implementation of operations on `Wrapping<X>` for each concrete integer type `X`. Closes #22985 Closes #21069 [breaking-change]
2015-03-25rustc: Remove support for int/uintAlex Crichton-36/+6
This commit removes all parsing, resolve, and compiler support for the old and long-deprecated int/uint types.
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