about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
2015-07-05Feature-gate #[prelude_import].Eduard Burtescu-1/+5
2015-06-18Make a better error message for using #[feature] on stable rustBrian Anderson-1/+38
It now says '#[feature] may not be used on the stable release channel'. I had to convert this error from a lint to a normal compiler error. I left the lint previously-used for this in place since removing it is a breaking change. It will just go unused until the end of time. Fixes #24125
2015-06-17Remove unused emit_feature_warn functionBrian Anderson-12/+0
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-1/+1
2015-06-03Remove #[static_assert]Steve Klabnik-5/+0
This was always a weird feature, and isn't being used in the compiler. Static assertions should be done better than this. This implements RFC #1096. Fixes #13951 Fixes #23008 Fixes #6676 This is behind a feature gate, but that's still a [breaking-change]
2015-05-29Add feature-gate to calling const fnNiko Matsakis-3/+6
2015-05-24Auto merge of #25609 - nikomatsakis:const-fn, r=pnkfelixbors-2/+28
This is a port of @eddyb's `const-fn` branch. I rebased it, tweaked a few things, and added tests as well as a feature gate. The set of tests is still pretty rudimentary, I'd appreciate suggestions on new tests to write. Also, a double-check that the feature-gate covers all necessary cases. One question: currently, the feature-gate allows the *use* of const functions from stable code, just not the definition. This seems to fit our usual strategy, and implies that we might (perhaps) allow some constant functions in libstd someday, even before stabilizing const-fn, if we were willing to commit to the existence of const fns but found some details of their impl unsatisfactory. r? @pnkfelix
2015-05-24Auto merge of #25168 - Manishearth:register_attr, r=eddybbors-13/+31
This lets plugin authors opt attributes out of the `custom_attribute` and `unused_attribute` checks. cc @thepowersgang
2015-05-21Make various fixes:Niko Matsakis-0/+26
- add feature gate - add basic tests - adjust parser to eliminate conflict between `const fn` and associated constants - allow `const fn` in traits/trait-impls, but forbid later in type check - correct some merge conflicts
2015-05-21syntax: parse `const fn` for free functions and inherent methods.Eduard Burtescu-2/+2
2015-05-18syntax: Remove unused `packed` attributeklutzy-1/+0
The attribute was removed by #16499.
2015-05-13address more review commentsManish Goregaokar-1/+6
2015-05-07Add support for registering attributes with rustc in pluginsManish Goregaokar-13/+26
This lets plugin authors opt attributes out of the `custom_attribute` and `unused_attribute` checks.
2015-04-28Register new snapshotsTamir Duberstein-6/+0
2015-04-27Auto merge of #23606 - quantheory:associated_const, r=nikomatsakisbors-0/+28
Closes #17841. The majority of the work should be done, e.g. trait and inherent impls, different forms of UFCS syntax, defaults, and cross-crate usage. It's probably enough to replace the constants in `f32`, `i8`, and so on, or close to good enough. There is still some significant functionality missing from this commit: - ~~Associated consts can't be used in match patterns at all. This is simply because I haven't updated the relevant bits in the parser or `resolve`, but it's *probably* not hard to get working.~~ - Since you can't select an impl for trait-associated consts until partway through type-checking, there are some problems with code that assumes that you can check constants earlier. Associated consts that are not in inherent impls cause ICEs if you try to use them in array sizes or match ranges. For similar reasons, `check_static_recursion` doesn't check them properly, so the stack goes ka-blooey if you use an associated constant that's recursively defined. That's a bit trickier to solve; I'm not entirely sure what the best approach is yet. - Dealing with consts associated with type parameters will raise some new issues (e.g. if you have a `T: Int` type parameter and want to use `<T>::ZERO`). See rust-lang/rfcs#865. - ~~Unused associated consts don't seem to trigger the `dead_code` lint when they should. Probably easy to fix.~~ Also, this is the first time I've been spelunking in rustc to such a large extent, so I've probably done some silly things in a couple of places.
2015-04-23Feature-gate associated constants.Sean Patrick Santos-0/+28
2015-04-24Add ')' in `advaced_slice_patterns` error messageLuke Gallagher-1/+1
2015-04-24Add missing '\' for `custom_derive` error messageLuke Gallagher-1/+1
2015-04-16Fix some documentation typosLuke Gallagher-1/+1
2015-04-15Auto merge of #24436 - fhahn:fix-small-typo, r=steveklabnikbors-1/+1
2015-04-14Remove superfluous `the` from `custom_attribute` feature gate messageFlorian Hahn-1/+1
2015-04-14Expose visibility for fns in syntax::visitNick Cameron-3/+3
2015-04-02Revise logic to match `rustc::session::config::get_unstable_features_setting`Felix S. Klock II-8/+2
2015-04-02Do not suggest `#![feature(...)]` if we are in beta or stable channel.Felix S. Klock II-0/+12
Fix #23973
2015-04-01rollup merge of #23860: nikomatsakis/copy-requires-cloneAlex Crichton-1/+1
Conflicts: src/test/compile-fail/coherence-impls-copy.rs
2015-04-01rollup merge of #23945: pnkfelix/gate-u-negateAlex Crichton-0/+6
Feature-gate unsigned unary negate. Discussed in weekly meeting here: https://github.com/rust-lang/meeting-minutes/blob/master/weekly-meetings/2015-03-31.md#feature-gate--expr and also in the internals thread here: http://internals.rust-lang.org/t/forbid-unsigned-integer/752
2015-04-01rollup merge of #23948: nikomatsakis/feature-gate-rust-abiAlex Crichton-3/+9
Like it says. r? @alexcrichton
2015-04-01added unary_negate feature gate.Felix S. Klock II-0/+6
2015-04-01Feature gate rust-call ABI.Niko Matsakis-3/+9
2015-04-01Fallout in libsyntaxNiko Matsakis-1/+1
2015-04-01Implement the changes to coherence such that we consider a type to beNiko Matsakis-0/+6
local only if matches `FUNDAMENTAL(LocalType)`, where `FUNDAMENTAL` includes `&T` and types marked as fundamental (which includes `Box`). Also apply these tests to negative reasoning.
2015-03-31rollup merge of #23288: alexcrichton/issue-19470Alex Crichton-17/+0
This is a deprecated attribute that is slated for removal, and it also affects all implementors of the trait. This commit removes the attribute and fixes up implementors accordingly. The primary implementation which was lost was the ability to compare `&[T]` and `Vec<T>` (in that order). This change also modifies the `assert_eq!` macro to not consider both directions of equality, only the one given in the left/right forms to the macro. This modification is motivated due to the fact that `&[T] == Vec<T>` no longer compiles, causing hundreds of errors in unit tests in the standard library (and likely throughout the community as well). Closes #19470 [breaking-change]
2015-03-31Test fixes and rebase conflicts, round 2Alex Crichton-11/+0
2015-03-31Test fixes and rebase conflicts, round 1Alex Crichton-1/+1
2015-03-31rustc: Remove old_orphan_check entirelyAlex Crichton-17/+0
2015-03-29Port of pcwalton removal of `#[unsafe_destructor]` check.Felix S. Klock II-12/+6
Earlier commits impose rules on lifetimes that make generic destructors safe; thus we no longer need the `#[unsafe_destructor]` attribute nor its associated check. ---- So remove the check for the unsafe_destructor attribute. And remove outdated compile-fail tests from when lifetime-parameteric dtors were disallowed/unsafe. In addition, when one uses the attribute without the associated feature, report that the attribute is deprecated. However, I do not think this is a breaking-change, because the attribute and feature are still currently accepted by the compiler. (After the next snapshot that has this commit, we can remove the feature itself and the attribute as well.) ---- I consider this to: Fix #22196 (techincally there is still the post snapshot work of removing the last remants of the feature and the attribute, but the ticket can still be closed in my opinion).
2015-03-27rollup merge of #23794: brson/slicegateAlex Crichton-0/+8
Conflicts: src/test/run-pass/issue-13027.rs
2015-03-27Feature gate *all* slice patterns. #23121Brian Anderson-0/+8
Until some backwards-compatibility hazards are fixed in #23121, these need to be unstable. [breaking-change]
2015-03-27rollup merge of #23749: alexcrichton/remove-old-impl-checkAlex Crichton-11/+0
Conflicts: src/libsyntax/feature_gate.rs
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-65/+6
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs
2015-03-27rollup merge of #23761: alexcrichton/remove-phaseAlex Crichton-1/+0
This commit removes the extra deprecation warnings and support for the old `phase` and `plugin` attributes for loading plugins.
2015-03-27rollup merge of #23752: alexcrichton/remove-should-failAlex Crichton-1/+0
This attribute has been deprecated in favor of #[should_panic]. This also updates rustdoc to no longer accept the `should_fail` directive and instead renames it to `should_panic`.
2015-03-26rustc: Remove old #[phase] and #[plugin]Alex Crichton-1/+0
This commit removes the extra deprecation warnings and support for the old `phase` and `plugin` attributes for loading plugins.
2015-03-26Implement `Reflect` trait with a variant on the standard OIBITNiko Matsakis-1/+6
semantics that tests the *interface* of trait objects, rather than what they close over.
2015-03-26syntax: Remove support for #[should_fail]Alex Crichton-1/+0
This attribute has been deprecated in favor of #[should_panic]. This also updates rustdoc to no longer accept the `should_fail` directive and instead renames it to `should_panic`.
2015-03-26rustc: Remove support for old_impl_checkAlex Crichton-11/+0
This commit removes compiler support for the `old_impl_check` attribute which should in theory be entirely removed now. The last remaining use of it in the standard library has been updated by moving the type parameter on the `old_io::Acceptor` trait into an associated type. As a result, this is a breaking change for all current users of the deprecated `old_io::Acceptor` trait. Code can be migrated by using the `Connection` associated type instead. [breaking-change]
2015-03-25rustc: Remove support for int/uintAlex Crichton-65/+6
This commit removes all parsing, resolve, and compiler support for the old and long-deprecated int/uint types.
2015-03-23rollup merge of #23506: alexcrichton/remove-some-deprecated-thingsAlex Crichton-2/+0
Conflicts: src/test/run-pass/deprecated-no-split-stack.rs
2015-03-20Feature gate defaulted traitsFlavio Percoco-0/+7
2015-03-18rustc: Remove some long deprecated features:Alex Crichton-2/+0
* no_split_stack was renamed to no_stack_check * deriving was renamed to derive * `use foo::mod` was renamed to `use foo::self`; * legacy lifetime definitions in closures have been replaced with `for` syntax * `fn foo() -> &A + B` has been deprecated for some time (needs parens) * Obsolete `for Sized?` syntax * Obsolete `Sized? Foo` syntax * Obsolete `|T| -> U` syntax