about summary refs log tree commit diff
path: root/src/test/compile-fail/lint-stability.rs
AgeCommit message (Collapse)AuthorLines
2018-08-14Moved compile-fail tests to ui tests.David Wood-464/+0
2018-08-05Fix test/compile-failvarkor-31/+31
2018-06-21Support future deprecation for rustc_deprecatedvarkor-0/+8
2017-12-21Check associated type bindings for privacy and stabilityVadim Petrochenkov-0/+4
2016-11-28rustc: rework stability to be on-demand for type-directed lookup.Eduard Burtescu-150/+90
2016-07-08Add tests + Fix rustdoc regression + Fix rebaseVadim Petrochenkov-0/+5
2015-12-12Address the review commentsVadim Petrochenkov-1/+2
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+0
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-13/+13
2015-11-18Add missing annotations and some testsVadim Petrochenkov-3/+7
2015-10-13Refactor attr::StabilityVadim Petrochenkov-13/+13
Stricter checking + enforcement of invariants at compile time
2015-08-15test: Fix tests for requiring issuesAlex Crichton-23/+23
2015-06-11update stability compile-fail testsAlexis Beingessner-3/+9
2015-04-09Remove `ignore-tidy-linelength` from tests that no longer need itLuke Gallagher-1/+0
2015-03-23Require feature attributes, and add them where necessaryBrian Anderson-72/+72
2015-02-26Check stability of struct fields.Huon Wilson-3/+9
We were recording stability attributes applied to fields in the compiler, and even annotating it in the libs, but the compiler didn't actually do the checks to give errors/warnings in user crates.
2015-02-24Fix fallout from correct stability handling in UFCS.Eduard Burtescu-7/+144
2015-02-18Fallout: tests. As tests frequently elide things, lots of changesNiko Matsakis-1/+3
here. Some of this may have been poorly rebased, though I tried to be careful and preserve the spirit of the test.
2015-02-17rustc: Track stability of trait implementationsAlex Crichton-0/+5
Previously an implementation of a stable trait allows implementations of unstable methods. This updates the stability pass to ensure that all items of an impl block of a trait are indeed stable on the trait itself.
2015-02-11rustc: Fix a number of stability lint holesAlex Crichton-3/+1
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-04Fix testManish Goregaokar-31/+1
2015-01-23grandfathered -> rust1Brian Anderson-11/+11
2015-01-23Deprecated attributes don't take 'feature' names and are paired with ↵Brian Anderson-13/+58
stable/unstable Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
2015-01-23Set unstable feature names appropriatelyBrian Anderson-15/+15
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+1
2015-01-21Remove 'since' from unstable attributesBrian Anderson-10/+10
2015-01-21Minor fixesBrian Anderson-35/+34
2015-01-21Add 'feature' and 'since' to stability attributesBrian Anderson-194/+42
2015-01-08rollup merge of #20754: nikomatsakis/int-featureAlex Crichton-15/+15
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
2015-01-08Update compile fail tests to use usize.Huon Wilson-1/+1
2015-01-08Update compile fail tests to use isize.Huon Wilson-14/+14
2015-01-08Improvements to feature stagingBrian Anderson-35/+36
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-05rollup merge of #20482: kmcallister/macro-reformAlex Crichton-4/+4
Conflicts: src/libflate/lib.rs src/libstd/lib.rs src/libstd/macros.rs src/libsyntax/feature_gate.rs src/libsyntax/parse/parser.rs src/libsyntax/show_span.rs src/test/auxiliary/macro_crate_test.rs src/test/compile-fail/lint-stability.rs src/test/run-pass/intrinsics-math.rs src/test/run-pass/tcp-connect-timeouts.rs
2015-01-05Forbid '#[macro_use] extern crate' outside the crate rootKeegan McAllister-3/+4
2015-01-05Replace #[phase] with #[plugin] / #[macro_use] / #[no_link]Keegan McAllister-2/+2
2015-01-05Remove use of globs feature gate from tests.Huon Wilson-1/+1
2014-11-18rollup merge of #19029: vberger/stability_function_bodyJakub Bukaj-0/+14
Items defined in the body of a function has no visibility outside it, and thus have no reason to inherit its stability. Closes #17488
2014-11-17Don't inherit stability to items in a function body.Victor Berger-0/+14
Items defined in the body of a function has no visibility outside it, and thus have no reason to be marked with stability attributes. Closes #17488
2014-11-17Switch to purely namespaced enumsSteven Fackler-16/+16
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-11Update tests for new stability inheritance rulesAaron Turon-0/+3
2014-11-07rustc: Process #[cfg]/#[cfg_attr] on cratesAlex Crichton-0/+5
This commit implements processing these two attributes at the crate level as well as at the item level. When #[cfg] is applied at the crate level, then the entire crate will be omitted if the cfg doesn't match. The #[cfg_attr] attribute is processed as usual in that the attribute is included or not depending on whether the cfg matches. This was spurred on by motivations of #18585 where #[cfg_attr] annotations will be applied at the crate-level. cc #18585
2014-11-05rustc: Add some more checks to the stability lintBrian Anderson-0/+15
This catches uses of unstable traits in ``` trait Foo: UnstableTrait { } ``` and ``` impl UnstableTrait for Foo { } ```
2014-11-04rustc: Support stability attributes on cratesAlex Crichton-2/+2
This commit adds support for linting `extern crate` statements for stability attributes attached to the crate itself. This is likely to be the mechanism used to deny access to experimental crates that are part of the standard distribution. cc #18585
2014-10-20Stability lint checker now handles nested macros.Victor Berger-0/+1
Closes #17185.
2014-09-22Lint stability now checks macro arguments.Victor Berger-3/+5
Closes #17185.
2014-08-12Enable deprecation lint on crate-local itemsAaron Turon-18/+17
Previously the lint considered cross-crate items only. That's appropriate for unstable and experimental levels, but not for deprecation. Closes #16409 Due to deny(deprecation), this is a: [breaking-change]
2014-07-16stability lint: ignore code from macro expansionAaron Turon-2/+9
This small patch causes the stability lint to bail out when traversing any AST produced via a macro expansion. Ultimately, we would like to lint the contents of the macro at the place where the macro is defined, but regardless we should not be linting it at the use site. Closes #15703
2014-06-18Add stability inheritanceAaron Turon-52/+79
This commit makes several changes to the stability index infrastructure: * Stability levels are now inherited lexically, i.e., each item's stability level becomes the default for any nested items. * The computed stability level for an item is stored as part of the metadata. When using an item from an external crate, this data is looked up and cached. * The stability lint works from the computed stability level, rather than manual stability attribute annotations. However, the lint still checks only a limited set of item uses (e.g., it does not check every component of a path on import). This will be addressed in a later PR, as part of issue #8962. * The stability lint only applies to items originating from external crates, since the stability index is intended as a promise to downstream crates. * The "experimental" lint is now _allow_ by default. This is because almost all existing crates have been marked "experimental", pending library stabilization. With inheritance in place, this would generate a massive explosion of warnings for every Rust program. The lint should be changed back to deny-by-default after library stabilization is complete. * The "deprecated" lint still warns by default. The net result: we can begin tracking stability index for the standard libraries as we stabilize, without impacting most clients. Closes #13540.
2014-04-06Remove check-fast. Closes #4193, #8844, #6330, #7416Brian Anderson-1/+0
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-5/+5
Closes #2569