about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
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
2015-03-13Add an "allocator" attribute to mark functions as allocatorsBjörn Steinbrink-0/+3
When this attribute is applied to a function, its return value gets the noalias attribute, which is how you tell LLVM that the function returns a "new" pointer that doesn't alias anything accessible to the caller, i.e. it acts like a memory allocator. Plain malloc doesn't need this attribute because LLVM already knows about malloc and adds the attribute itself.
2015-03-09remove uses of as_slice where deref coercions can be usedRicho Healey-2/+2
2015-03-06Make #[derive(Anything)] into sugar for #[derive_Anything]Keegan McAllister-0/+14
This is a hack, but I don't think we can do much better as long as `derive` is running at the syntax expansion phase. If the custom_derive feature gate is enabled, this works with user-defined traits and syntax extensions. Without the gate, you can't use e.g. #[derive_Clone] directly, so this does not change the stable language. This commit also cleans up the deriving code somewhat, and forbids some previously-meaningless attribute syntax. For this reason it's technically a [breaking-change]
2015-03-06Check gated attributes before and after macro expansionKeegan McAllister-37/+38
This is important because attributes can affect expansion.
2015-03-06Auto merge of #22899 - huonw:macro-stability, r=alexcrichtonbors-8/+34
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. --- This updates `thread_local!` macro to use the attribute, since it uses unstable features internally (initialising a struct with unstable fields).
2015-03-06Run feature-gating on the final AST passed to the compiler.Huon Wilson-5/+9
This ensures we catch everything; previously, an unknown attribute inserted by #[cfg_attr(...)] in a macro expansion would not be detected.
2015-03-06Add more debugging to syntax::feature_gate.Huon Wilson-2/+6
2015-03-06Add #[allow_internal_unstable] to track stability for macros better.Huon Wilson-1/+19
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-05Rollup merge of #22764 - ivanradanov:fileline_help, r=huonwManish Goregaokar-2/+2
When warnings and errors occur, the associated help message should not print the same code snippet. https://github.com/rust-lang/rust/issues/21938
2015-03-03Change span_help calls to fileline_help where appropriateIvan Radanov Ivanov-2/+2
2015-03-03Rollup merge of #22876 - Florob:const, r=nikomatsakisManish Goregaokar-2/+2
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
2015-03-03Rollup merge of #22960 - huonw:static-assert, r=huonwManish Goregaokar-2/+5
The API this exposes is a little strange (being attached to `static`s), so it makes sense to conservatively feature gate it. If it is highly popular, it is possible to reverse this gating.
2015-03-03Feature gate `#[static_assert]`.Huon Wilson-2/+5
The API this exposes is a little strange (being attached to `static`s), so it makes sense to conservatively feature gate it. If it is highly popular, it is possible to reverse this gating.
2015-03-03Add cfg_attr to known attributesManish Goregaokar-0/+1
2015-03-02Use `const`s instead of `static`s where appropriateFlorian Zeitz-2/+2
This changes the type of some public constants/statics in libunicode. Notably some `&'static &'static [(char, char)]` have changed to `&'static [(char, char)]`. The regexp crate seems to be the sole user of these, yet this is technically a [breaking-change]
2015-02-25Whitelist #[should_panic]Steven Fackler-0/+1
2015-02-25Turn `unsafe_no_drop_flag` back into a gated-feature.Felix S. Klock II-1/+3
Fix #22173
2015-02-24Implement `<T>::method` UFCS expression syntax.Eduard Burtescu-1/+1