about summary refs log tree commit diff
path: root/src/libsyntax/feature_gate.rs
AgeCommit message (Collapse)AuthorLines
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
2015-02-24syntax: don't store a secondary NodeId for TyPath.Eduard Burtescu-1/+1
2015-02-18rollup merge of #22502: nikomatsakis/deprecate-bracket-bracketAlex Crichton-11/+11
Conflicts: src/libcollections/slice.rs src/libcollections/str.rs src/librustc/middle/lang_items.rs src/librustc_back/rpath.rs src/librustc_typeck/check/regionck.rs src/libstd/ffi/os_str.rs src/libsyntax/diagnostic.rs src/libsyntax/parse/parser.rs src/libsyntax/util/interner.rs src/test/run-pass/regions-refcell.rs
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-11/+11
2015-02-18For now, accept the `i`, `u`, `is`, and `us` suffixes, but warn whenNiko Matsakis-4/+4
they are used without a feature-gate. This is both kinder to existing code and should make it easier to land this PR, since we don't have to catch EVERY SINGLE SUFFIX.
2015-02-17Rollup merge of #22383 - pnkfelix:pass-features-along-during-expansion, r=huonwManish Goregaokar-11/+42
Pass features along during expansion Use the set of passed features to detect uses of feature-gated macros without the corresponding feature enabled. Fix #22234. ---- Also, the framework this add (passing along a reference to the features in the expansion context) is a necessary precursor for landing a properly feature-gated desugaring-based overloaded-`box` and placement-`in` (#22181). ---- This is fixing a bug, but since there might be code out there that is unknowingly taking advantage of that bug, I feel obligated to mark this as a: [breaking-change]
2015-02-17Add gating for rustc_* attrsManish Goregaokar-13/+30
2015-02-17move other attribute check to visit_attributeManish Goregaokar-20/+10
2015-02-17Add `Gated` attribute typeManish Goregaokar-28/+28
2015-02-16Clean up visit_attribute in feature_gate.rsManish Goregaokar-37/+26
- We shouldn't be using `check_name` here at all - `contains_name(ref_slice(foo), bar)` is redundant, `contains_name` just iterates over its first arg and calls `check_name` - match would be better than a bunch of ifs
2015-02-16Feature gate custom attributes (fixes #22203)Manish Goregaokar-0/+54
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/+32
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-5/+10
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-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-11rollup merge of #22178: pnkfelix/featuregate-unsafe-no-drop-flagAlex Crichton-0/+10
Conflicts: src/libsyntax/feature_gate.rs
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-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-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-07Feature-gate #![no_std]Keegan McAllister-1/+9
Fixes #21833. [breaking-change]
2015-02-07Auto merge of #21505 - GuillaumeGomez:interned_string, r=alexcrichtonbors-2/+3
It's in order to make the code more homogeneous.
2015-02-06Libsyntax has been updatedGuillaumeGomez-3/+3
2015-02-06Replace the get method by the deref one on InternedStringGuillaumeGomez-2/+3
2015-02-06Rollup merge of #21958 - brson:stable-features, r=alexcrichtonManish Goregaokar-5/+10
.... The 'stable_features' lint helps people progress from unstable to stable Rust by telling them when they no longer need a `feature` attribute because upstream Rust has declared it stable. This compares to the existing 'unstable_features' lint, which is used to implement feature staging, and triggers on *any* use of `#[feature]`.
2015-02-06Rollup merge of #21954 - jbcrail:fix-misspelled-comments, r=steveklabnikManish Goregaokar-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-05cleanup: replace `as[_mut]_slice()` calls with deref coercionsJorge Aparicio-2/+2
2015-02-04Add a lint for writing `#[feature]` for stable features, warn by default.Brian Anderson-5/+10
The 'stable_features' lint helps people progress from unstable to stable Rust by telling them when they no longer need a `feature` attribute because upstream Rust has declared it stable. This compares to the existing 'unstable_features', which is used to implement feature staging, and triggers on *any* use of `#[feature]`.
2015-02-04Fix for misspelled comments.Joseph Crail-1/+1
The spelling corrections were made in both documentation comments and regular comments.
2015-02-04Add unmarked_api feature (fixes #21884)Manish Goregaokar-0/+6
2015-02-02`for x in xs.iter()` -> `for x in &xs`Jorge Aparicio-3/+3
2015-01-30Test fixes and rebase conflictsAlex Crichton-1/+1
Also some tidying up of a bunch of crate attributes
2015-01-29Feature gate macro_reexport. Fixes #20906Flavio Percoco-0/+7
2015-01-26Make '-A warnings' apply to all warnings, including feature gate warningsBrian Anderson-3/+5
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-20/+9
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+8
2015-01-21Add a lint for library featuresBrian Anderson-64/+77
Does a sanity check of the version numbers.
2015-01-21Tie stability attributes to feature gatesBrian Anderson-13/+19
2015-01-21syntax: fix fallout of merging ast::ViewItem into ast::Item.Eduard Burtescu-16/+8
2015-01-21Remove feature(import_shadowing).Eduard Burtescu-4/+1
2015-01-20Auto merge of #21257 - alexcrichton:issue-20064, r=pnkfelixbors-0/+14
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-17Feature gate SIMD in FFI, due to unknown ABIs.Huon Wilson-0/+4
I don't know if this handling of SIMD types is correct for the C ABI on all platforms, so lets add an even finer feature gate than just the `simd` one. The `simd` one can be used with (relatively) little risk of complete nonsense, the reason for it is that it is likely that things will change. Using the types in FFI with an incorrect ABI will at best give absolute nonsense results, but possibly cause serious breakage too, so this is a step up in badness, hence a new feature gate.
2015-01-16syntax: Feature gate #[start] and #[main]Alex Crichton-0/+14
These two attributes are used to change the entry point into a Rust program, but for now they're being put behind feature gates until we have a chance to think about them a little more. The #[start] attribute specifically may have its signature changed. This is a breaking change to due the usage of these attributes generating errors by default now. If your crate is using these attributes, add this to your crate root: #![feature(start)] // if you're using the #[start] attribute #![feature(main)] // if you're using the #[main] attribute cc #20064
2015-01-12Feature gate #[rustc_on_unimplemented]Manish Goregaokar-0/+5
2015-01-08rollup merge of #20754: nikomatsakis/int-featureAlex Crichton-0/+55
Conflicts: src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs src/test/compile-fail/issue-2590.rs src/test/compile-fail/lint-stability.rs src/test/compile-fail/slice-mut-2.rs src/test/compile-fail/std-uncopyable-atomics.rs