summary refs log tree commit diff
path: root/src/test/compile-fail/feature-gate
AgeCommit message (Collapse)AuthorLines
2017-09-21only set non-ADT derive error once per attribute, not per traitZack M. Davis-26/+3
A slight eccentricity of this change is that now non-ADT-derive errors prevent derive-macro-not-found errors from surfacing (see changes to the gating-of-derive compile-fail tests). Resolves #43927.
2017-09-05rustc: Move stability functionality into queriesAlex Crichton-1/+2
This commit primarily removes the `stability` field from `TyCtxt` as well as its internal mutable state, instead using a query to build the stability index as well as primarily using queries for other related lookups. Like previous commits the calculation of the stability index is wrapped in a `with_ignore` node to avoid regressing the current tests, and otherwise this commit also introduces #44232 but somewhat intentionally so.
2017-08-28feature error span on attr. for fn_must_use, SIMD/align, macro reƫxportZack M. Davis-2/+1
There were several feature-gated attributes for which the feature-not-available error spans would point to the item annotated with the gated attribute, when it would make more sense for the span to point to the attribute itself: if the attribute is removed, the function/struct/&c. likely still makes sense and the program will compile. (Note that we decline to make the analogous change for the `main`, `start`, and `plugin_registrar` features, for in those cases it makes sense for the span to implicate the entire function, of which there is little hope of using without the gated attribute.)
2017-08-22"soft" (warn instead of error) feature-gate for #[must_use] on functionsZack M. Davis-1/+1
Before `#[must_use]` for functions was implemented, a `#[must_use]` attribute on a function was a no-op. To avoid a breaking change in this behavior, we add an option for "this-and-such feature is experimental" feature-gate messages to be a mere warning rather than a compilation-halting failure (so old code that used to have a useless no-op `#[must_use]` attribute now warns rather than breaking). When we're on stable, we add a help note to clarify that the feature isn't "on." This is in support of #43302.
2017-08-22hard feature-gate for #[must_use] on functionsZack M. Davis-0/+1
We'll actually want a new "soft" warning-only gate to maintain backwards-compatibility, but it's cleaner to start out with the established, well-understood gate before implementing the alternative warn-only behavior in a later commit. This is in the matter of #43302.
2017-07-11Slew of feature gating tests for issue #43106.Felix S. Klock II-0/+1291