rustc: Move stability functionality into queries
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.
This commit is contained in:
parent
0182c8bbda
commit
9a231961d5
12 changed files with 213 additions and 203 deletions
|
|
@ -99,7 +99,8 @@
|
|||
|
||||
// For #![crate_id], see issue #43142. (I cannot bear to enshrine current behavior in a test)
|
||||
|
||||
#![feature ( x0600)] //~ WARN unused or unknown feature
|
||||
// FIXME(#44232) we should warn that this isn't used.
|
||||
#![feature ( x0600)]
|
||||
|
||||
// For #![no_start], see issue #43144. (I cannot bear to enshrine current behavior in a test)
|
||||
|
||||
|
|
|
|||
|
|
@ -8,21 +8,21 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// compile-flags: -F unused_features
|
||||
// aux-build:lint_output_format.rs
|
||||
|
||||
// FIXME(#44232) we should warn that this isn't used.
|
||||
#![feature(foo)]
|
||||
//~^ ERROR unused or unknown feature
|
||||
//~| NOTE requested on the command line with `-F unused-features`
|
||||
|
||||
#![feature(test_feature)]
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
extern crate lint_output_format;
|
||||
use lint_output_format::{foo, bar};
|
||||
//~^ WARNING use of deprecated item: text
|
||||
//~| NOTE #[warn(deprecated)] on by default
|
||||
|
||||
fn main() {
|
||||
#[rustc_error]
|
||||
fn main() { //~ ERROR: compilation successful
|
||||
let _x = foo();
|
||||
//~^ WARNING use of deprecated item: text
|
||||
//~| NOTE #[warn(deprecated)] on by default
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@
|
|||
|
||||
// Tests the default for the unused_features lint
|
||||
|
||||
#![deny(warnings)]
|
||||
// FIXME(#44232) we should warn that this isn't used.
|
||||
#![feature(this_is_not_a_feature)]
|
||||
|
||||
#![feature(this_is_not_a_feature)] //~ ERROR: unused or unknown feature
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
fn main() { }
|
||||
#[rustc_error]
|
||||
fn main() { } //~ ERROR: compilation successful
|
||||
|
|
|
|||
|
|
@ -8,8 +8,12 @@
|
|||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
#![deny(unused_features)]
|
||||
#![warn(unused_features)]
|
||||
|
||||
#![feature(this_is_not_a_feature)] //~ ERROR: unused or unknown feature
|
||||
// FIXME(#44232) we should warn that this isn't used.
|
||||
#![feature(this_is_not_a_feature)]
|
||||
|
||||
fn main() {}
|
||||
#![feature(rustc_attrs)]
|
||||
|
||||
#[rustc_error]
|
||||
fn main() {} //~ ERROR: compilation successful
|
||||
|
|
|
|||
|
|
@ -12,8 +12,11 @@
|
|||
// language and lib features.
|
||||
|
||||
#![deny(stable_features)]
|
||||
|
||||
#![feature(test_accepted_feature)] //~ ERROR this feature has been stable since 1.0.0
|
||||
#![feature(rust1)] //~ ERROR this feature has been stable since 1.0.0
|
||||
|
||||
// FIXME(#44232) we should error that this isn't used.
|
||||
#![feature(rust1)]
|
||||
|
||||
fn main() {
|
||||
let _foo: Vec<()> = Vec::new();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue