about summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2015-02-16Move ATTRIBUTE_WHITELIST and CRATE_ATTRS to KNOWN_ATTRIBUTES in ↵Manish Goregaokar-0/+69
syntax::feature_gate
2015-02-16Address the other cases of #22234; fix #22234.Felix S. Klock II-6/+80
The other cases: `concat_idents!`, `log_syntax!`, and `trace_macros!`, (these macros, with `asm!`, are handled (eagerly) in feature_gate.rs).
2015-02-15Address the `asm!` case of #22234.Felix S. Klock II-6/+25
2015-02-15libsyntax: Pass feature set in ExpansionConfig, not just enable_quotes.Felix S. Klock II-16/+25
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+0
2015-02-15Rollup merge of #22285 - kmcallister:pub-macro, r=nick29581Manish Goregaokar-0/+18
It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a [breaking-change] but is landing without an RFC. The `pub` keyword previously had no effect, which seems quite unintended. Fixes #18317. Fixes #14660.
2015-02-15Rollup merge of #22300 - kmcallister:pub-method-macro, r=sfacklerManish Goregaokar-2/+1
Fixes #17436.
2015-02-15Rollup merge of #22339 - petrochenkov:int, r=huonwManish Goregaokar-1/+1
Some function signatures have changed, so this is a [breaking-change]. In particular, radixes and numerical values of digits are represented by `u32` now. Part of #22240
2015-02-15Rollup merge of #22277 - pnkfelix:reference-update-feature-gate-list, ↵Manish Goregaokar-0/+1
r=steveklabnik Added all active features to the list in reference.md. Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :) Ensured that the feature gate list in reference.md is kept in alphabetical order.
2015-02-15Rollup merge of #22274 - pnkfelix:retag-slicing-syntax-as-accepted, ↵Manish Goregaokar-1/+1
r=nikomatsakis Re-tag `slicing_syntax` as `Accepted`. Rollup merge (373cbab5b08d6630da58f28d2166c19afc327fa6) of PR #20723 accidentally reverted a portion of commit 8327bcc167661c26ca5c6b967309ff745d302329 which shifted `slicing_syntax` from Active to Accepted.
2015-02-15Fix the falloutVadim Petrochenkov-1/+1
2015-02-14Auto merge of #22158 - Kimundi:the_lonely_uppercase_keyword, r=pnkfelixbors-39/+73
It is only allowed in paths now, where it will either work inside a `trait` or `impl` item, or not resolve outside of it. [breaking-change] Closes #22137
2015-02-13Forbid `pub mymacro!();`Keegan McAllister-0/+18
It's not clear what this means, because a macro in item position can expand to zero or more items. For now we disallow it, which is technically a [breaking-change] but is landing without an RFC. The `pub` keyword previously had no effect, which seems quite unintended. Fixes #18317. Fixes #14660.
2015-02-13Parse `pub` in the expansion of a method macroKeegan McAllister-2/+1
Fixes #17436.
2015-02-13Added all active features to the list in reference.md.Felix S. Klock II-0/+1
Added a second note about keeping the reference.md list up-to-date to the bottom of the list, since not everyone (including me) reads the big comment at the top of it. :) Ensured that the feature gate list in reference.md is kept in alphabetical order.
2015-02-13Re-tag `slicing_syntax` as `Accepted`.Felix S. Klock II-1/+1
Rollup merge (373cbab5b08d6630da58f28d2166c19afc327fa6) of PR #20723 accidentally reverted a portion of commit 8327bcc167661c26ca5c6b967309ff745d302329 which shifted `slicing_syntax` from Active to Accepted.
2015-02-12Made `Self` a keyword.Marvin Löbel-39/+73
It is only allowed in paths now, where it will either work inside a `trait` or `impl` item, or not resolve outside of it. [breaking-change] Closes #22137
2015-02-12Update metadata to reflect that predicates/schemes/trait-defs are now severedNiko Matsakis-0/+8
2015-02-11bitrig integrationDave Huseby-0/+2
2015-02-11rollup merge of #22178: pnkfelix/featuregate-unsafe-no-drop-flagAlex Crichton-0/+10
Conflicts: src/libsyntax/feature_gate.rs
2015-02-11rollup merge of #22188: alexcrichton/envv2Alex Crichton-2/+2
This commit tweaks the interface of the `std::env` module to make it more ergonomic for common usage: * `env::var` was renamed to `env::var_os` * `env::var_string` was renamed to `env::var` * `env::args` was renamed to `env::args_os` * `env::args` was re-added as a panicking iterator over string values * `env::vars` was renamed to `env::vars_os` * `env::vars` was re-added as a panicking iterator over string values. This should make common usage (e.g. unicode values everywhere) more ergonomic as well as "the default". This is also a breaking change due to the differences of what's yielded from each of these functions, but migration should be fairly easy as the defaults operate over `String` which is a common type to use. [breaking-change]
2015-02-11std: Tweak the std::env OsString/String interfaceAlex Crichton-2/+2
This commit tweaks the interface of the `std::env` module to make it more ergonomic for common usage: * `env::var` was renamed to `env::var_os` * `env::var_string` was renamed to `env::var` * `env::args` was renamed to `env::args_os` * `env::args` was re-added as a panicking iterator over string values * `env::vars` was renamed to `env::vars_os` * `env::vars` was re-added as a panicking iterator over string values. This should make common usage (e.g. unicode values everywhere) more ergonomic as well as "the default". This is also a breaking change due to the differences of what's yielded from each of these functions, but migration should be fairly easy as the defaults operate over `String` which is a common type to use. [breaking-change]
2015-02-11rustc: Fix a number of stability lint holesAlex Crichton-17/+5
There are a number of holes that the stability lint did not previously cover, including: * Types * Bounds on type parameters on functions and impls * Where clauses * Imports * Patterns (structs and enums) These holes have all been fixed by overriding the `visit_path` function on the AST visitor instead of a few specialized cases. This change also necessitated a few stability changes: * The `collections::fmt` module is now stable (it was already supposed to be). * The `thread_local::imp::Key` type is now stable (it was already supposed to be). * The `std::rt::{begin_unwind, begin_unwind_fmt}` functions are now stable. These are required via the `panic!` macro. * The `std::old_io::stdio::{println, println_args}` functions are now stable. These are required by the `print!` and `println!` macros. * The `ops::{FnOnce, FnMut, Fn}` traits are now `#[stable]`. This is required to make bounds with these traits stable. Note that manual implementations of these traits are still gated by default, this stability only allows bounds such as `F: FnOnce()`. Additionally, the compiler now has special logic to ignore its own generated `__test` module for the `--test` harness in terms of stability. Closes #8962 Closes #16360 Closes #20327 [breaking-change]
2015-02-11Generalize all error messages with "experimental in alpha release" toFelix S. Klock II-1/+1
just say "experimental."
2015-02-11Feature-gate the `#[unsafe_no_drop_flag]` attribute.Felix S. Klock II-0/+10
See RFC 320, "Non-zeroing dynamic drops." Fix #22173 [breaking-change]
2015-02-11generalize error text to not focus on any particular release.Felix S. Klock II-1/+1
2015-02-11Opt into new `box_patterns` feature gate in various crates.Felix S. Klock II-0/+1
Namely: `collections` (used in `dlist.rs`), `syntax`, `rustc`, `rustc_typeck`, `rustc_trans`, and `rustdoc`.
2015-02-11Add `box_patterns` feature gate.Felix S. Klock II-1/+4
Switch feature-gate checker from `box_syntax` to `box_patterns` when visiting a pattern. (Having to opt into both `box_syntax` and `box_patterns` seemed unnecessary.) [breaking-change]
2015-02-10rollup merge of #22116: kmcallister/cfg_attrAlex Crichton-54/+68
Fixes #22070. Fixes #19372. r? @sfackler
2015-02-10rollup merge of #22103: pczarn/fix-ice-22091Alex Crichton-2/+9
Fixes #22091 I'm not sure how to write a test for this. An ICE happens with spans that start near (after?) a null character or some other zero-width unicode character.
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-10rollup merge of #21943: hugwijst/extctxt_ufcsAlex Crichton-0/+56
Add `QPath` construction support to `ExtCtxt`. Allows compiler plugins to generate calls with UFCS.
2015-02-10rollup merge of #21918: ranma42/replace-beAlex Crichton-1/+1
Conflicts: src/test/compile-fail/reserved-be.rs src/test/compile-fail/reserved-become.rs src/test/parse-fail/reserved-be.rs
2015-02-10Auto merge of #22026 - kmcallister:plugin, r=sfacklerbors-5/+5
```rust #[plugin] #[no_link] extern crate bleh; ``` becomes a crate attribute ```rust #![plugin(bleh)] ``` The feature gate is still required. It's almost never correct to link a plugin into the resulting library / executable, because it will bring all of libsyntax and librustc with it. However if you really want this behavior, you can get it with a separate `extern crate` item in addition to the `plugin` attribute. Fixes #21043. Fixes #20769. [breaking-change]
2015-02-10Auto merge of #21961 - nick29581:hrl-syntax, r=nmatsakisbors-15/+52
Closes # 20022 r? @nikomatsakis
2015-02-10TestsNick Cameron-4/+10
2015-02-09Use a crate attribute to load pluginsKeegan McAllister-5/+5
#[plugin] #[no_link] extern crate bleh; becomes a crate attribute #![plugin(bleh)] The feature gate is still required. It's almost never correct to link a plugin into the resulting library / executable, because it will bring all of libsyntax and librustc with it. However if you really want this behavior, you can get it with a separate `extern crate` item in addition to the `plugin` attribute. Fixes #21043. Fixes #20769. [breaking-change]
2015-02-09Process cfg_attr right before stripping cfgKeegan McAllister-38/+48
Fixes #22070. Fixes #19372.
2015-02-09syntax::fold: Allow removing attributesKeegan McAllister-16/+20
2015-02-09Refactor compilation to make it easier to use for toolsNick Cameron-0/+1
2015-02-08syntax: Fix integer underflow in diagnosticPiotr Czarnecki-2/+9
Fixes #22091
2015-02-09Accept quantification of lifetimes outside the self type in where clauses.Nick Cameron-11/+42
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-08Auto merge of #22054 - LeoTestard:include-parse-errors, r=alexcrichtonbors-2/+6
Makes the compilation abort when a parse error is encountered while trying to parse an item in an included file. The previous behaviour was to stop processing the file when a token that can't start an item was encountered, without producing any error. Fixes #21146.
2015-02-08Auto merge of #21988 - kmcallister:no-std, r=sfacklerbors-78/+163
Fixes #21833. [breaking-change] r? @alexcrichton The tests in #21912 will also need `#[feature(no_std)]`. If you're okay with both PRs, I can merge and test them.
2015-02-07Fake up #![no_std] on pretty-printing; keep it out of ASTKeegan McAllister-14/+22
2015-02-07Feature-gate #![no_std]Keegan McAllister-1/+9
Fixes #21833. [breaking-change]
2015-02-07Don't use std:: paths in syntax extensions when compiling a #![no_std] crateKeegan McAllister-55/+114
Fixes #16803. Fixes #14342. Fixes half of #21827 -- slice syntax is still broken.
2015-02-07Use path helper macros in derivingKeegan McAllister-28/+38
2015-02-07Auto merge of #21984 - pnkfelix:make-for-loops-a-terminating-scope, ↵bors-8/+20
r=nikomatsakis make `for PAT in ITER_EXPR { ... }` a terminating-scope for ITER_EXPR. In effect, temporary anonymous values created during the evaluation of ITER_EXPR no longer not live for the entirety of the block surrounding the for-loop; instead they only live for the extent of the for-loop itself, and no longer. ---- There is one case I know of that this breaks, demonstrated to me by @nikomatsakis (but it is also a corner-case that is useless in practice). Here is that case: ``` fn main() { let mut foo: Vec<&i8> = Vec::new(); for i in &[1, 2, 3] { foo.push(i) } } ``` Note that if you add any code following the for-loop above, or even a semicolon to the end of it, then the code will stop compiling (i.e., it gathers a vector of references but the gathered vector cannot actually be used.) (The above code, despite being useless, did occur in one run-pass test by accident; that test is updated here to accommodate the new striction.) ---- So, technically this is a: [breaking-change]