mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-28 01:34:21 +00:00
Auto merge of #82639 - jyn514:stable-options, r=Mark-Simulacrum
Don't pass -Z unstable-options by default for UI tests Unconditionally passing -Z unstable-options makes it impossible to test whether an option requires unstable-options or not. This uncovered quite a lot of bugs, I'll open issues for each. These don't strictly need to be fixed before this is merged, it just makes the diff much larger because of the changes to diagnostics. - https://github.com/rust-lang/rust/issues/82636 - https://github.com/rust-lang/rust/issues/82637 - https://github.com/rust-lang/rust/issues/82638
This commit is contained in:
commit
40c1623b16
@ -1267,7 +1267,6 @@ note: if you're sure you want to do this, please open an issue as to why. In the
|
||||
}
|
||||
}
|
||||
flags.push(format!("-Cdebuginfo={}", builder.config.rust_debuginfo_level_tests));
|
||||
flags.push("-Zunstable-options".to_string());
|
||||
flags.push(builder.config.cmd.rustc_args().join(" "));
|
||||
|
||||
if let Some(linker) = builder.linker(target) {
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
// revisions: correct incorrect
|
||||
// check-pass
|
||||
// [correct]compile-flags:--test --test-run-directory={{src-base}}
|
||||
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
|
||||
// [correct]compile-flags:--test --test-run-directory={{src-base}} -Zunstable-options
|
||||
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage -Zunstable-options
|
||||
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// compile-flags: -Z unstable-options
|
||||
// NOTE: This test doesn't actually require `fulldeps`
|
||||
// so we could instead use it as an `ui` test.
|
||||
//
|
||||
|
@ -1,17 +1,17 @@
|
||||
error: passing `TyCtxt<'tcx>` by reference
|
||||
--> $DIR/pass_ty_by_ref_self.rs:17:15
|
||||
--> $DIR/pass_ty_by_ref_self.rs:18:15
|
||||
|
|
||||
LL | fn by_ref(&self) {}
|
||||
| ^^^^^ help: try passing by value: `TyCtxt<'tcx>`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/pass_ty_by_ref_self.rs:7:9
|
||||
--> $DIR/pass_ty_by_ref_self.rs:8:9
|
||||
|
|
||||
LL | #![deny(rustc::ty_pass_by_reference)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: passing `Ty<'tcx>` by reference
|
||||
--> $DIR/pass_ty_by_ref_self.rs:30:21
|
||||
--> $DIR/pass_ty_by_ref_self.rs:31:21
|
||||
|
|
||||
LL | fn by_ref(self: &Ty<'tcx>) {}
|
||||
| ^^^^^^^^^ help: try passing by value: `Ty<'tcx>`
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --error-format human-annotate-rs
|
||||
// compile-flags: --error-format human-annotate-rs -Z unstable-options
|
||||
|
||||
pub fn main() {
|
||||
let x: Iter; //~ ERROR cannot find type `Iter` in this scope
|
||||
|
@ -1,5 +1,5 @@
|
||||
// aux-build:multispan.rs
|
||||
// compile-flags: --error-format human-annotate-rs
|
||||
// compile-flags: --error-format human-annotate-rs -Z unstable-options
|
||||
|
||||
#![feature(proc_macro_hygiene)]
|
||||
|
||||
|
@ -22,12 +22,6 @@ error[E0452]: malformed lint attribute input
|
||||
LL | #[deny("literal")]
|
||||
| ^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/deduplicate-diagnostics.rs:8:8
|
||||
|
|
||||
LL | #[deny("literal")]
|
||||
| ^^^^^^^^^ bad attribute argument
|
||||
|
||||
error: aborting due to 5 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
@ -7,5 +7,4 @@ struct S;
|
||||
|
||||
#[deny("literal")] //~ ERROR malformed lint attribute input
|
||||
//[duplicate]~| ERROR malformed lint attribute input
|
||||
//[duplicate]~| ERROR malformed lint attribute input
|
||||
fn main() {}
|
||||
|
@ -2,7 +2,5 @@
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
//~| ERROR E0452
|
||||
fn main() {
|
||||
}
|
||||
|
@ -22,18 +22,6 @@ error[E0452]: malformed lint attribute input
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/E0452.rs:1:10
|
||||
|
|
||||
LL | #![allow(foo = "")]
|
||||
| ^^^^^^^^ bad attribute argument
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
@ -3,6 +3,5 @@
|
||||
#[allow(non_snake_case)]
|
||||
//~^ ERROR allow(non_snake_case) incompatible
|
||||
//~| ERROR allow(non_snake_case) incompatible
|
||||
//~| ERROR allow(non_snake_case) incompatible
|
||||
fn main() {
|
||||
}
|
||||
|
@ -16,15 +16,6 @@ LL |
|
||||
LL | #[allow(non_snake_case)]
|
||||
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error[E0453]: allow(non_snake_case) incompatible with previous forbid
|
||||
--> $DIR/E0453.rs:3:9
|
||||
|
|
||||
LL | #![forbid(non_snake_case)]
|
||||
| -------------- `forbid` level set here
|
||||
LL |
|
||||
LL | #[allow(non_snake_case)]
|
||||
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
@ -6,10 +6,6 @@ error[E0602]: unknown lint: `bogus`
|
||||
|
|
||||
= note: requested on the command line with `-D bogus`
|
||||
|
||||
error[E0602]: unknown lint: `bogus`
|
||||
|
|
||||
= note: requested on the command line with `-D bogus`
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0602`.
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||
//~^ ERROR lint reasons are experimental
|
||||
//~| ERROR lint reasons are experimental
|
||||
//~| ERROR lint reasons are experimental
|
||||
|
||||
fn main() {}
|
||||
|
@ -16,15 +16,6 @@ LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
|
||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
||||
|
||||
error[E0658]: lint reasons are experimental
|
||||
--> $DIR/feature-gate-lint-reasons.rs:1:28
|
||||
|
|
||||
LL | #![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: see issue #54503 <https://github.com/rust-lang/rust/issues/54503> for more information
|
||||
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0658`.
|
||||
|
@ -4,12 +4,10 @@ mod foo {
|
||||
#![allow(uncommon_codepoints)]
|
||||
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
|
||||
#[allow(uncommon_codepoints)]
|
||||
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
const BAR: f64 = 0.000001;
|
||||
|
||||
}
|
||||
@ -17,6 +15,5 @@ const BAR: f64 = 0.000001;
|
||||
#[allow(uncommon_codepoints)]
|
||||
//~^ ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
//~| ERROR allow(uncommon_codepoints) is ignored unless specified at crate level [unused_attributes]
|
||||
fn main() {
|
||||
}
|
||||
|
@ -11,13 +11,13 @@ LL | #![deny(uncommon_codepoints, unused_attributes)]
|
||||
| ^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:9:9
|
||||
--> $DIR/crate_level_only_lint.rs:8:9
|
||||
|
|
||||
LL | #[allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:17:9
|
||||
--> $DIR/crate_level_only_lint.rs:15:9
|
||||
|
|
||||
LL | #[allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
@ -29,34 +29,16 @@ LL | #![allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:9:9
|
||||
--> $DIR/crate_level_only_lint.rs:8:9
|
||||
|
|
||||
LL | #[allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:17:9
|
||||
--> $DIR/crate_level_only_lint.rs:15:9
|
||||
|
|
||||
LL | #[allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:4:10
|
||||
|
|
||||
LL | #![allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:9:9
|
||||
|
|
||||
LL | #[allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
||||
--> $DIR/crate_level_only_lint.rs:17:9
|
||||
|
|
||||
LL | #[allow(uncommon_codepoints)]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -17,10 +17,4 @@
|
||||
//~| WARNING previously accepted by the compiler
|
||||
//~| ERROR incompatible with previous
|
||||
//~| WARNING previously accepted by the compiler
|
||||
//~| ERROR incompatible with previous
|
||||
//~| WARNING previously accepted by the compiler
|
||||
//~| ERROR incompatible with previous
|
||||
//~| WARNING previously accepted by the compiler
|
||||
//~| ERROR incompatible with previous
|
||||
//~| WARNING previously accepted by the compiler
|
||||
fn main() {}
|
||||
|
@ -75,41 +75,5 @@ LL | #[allow(nonstandard_style)]
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
error: allow(nonstandard_style) incompatible with previous forbid
|
||||
--> $DIR/forbid-group-group-2.rs:7:9
|
||||
|
|
||||
LL | #![forbid(warnings)]
|
||||
| -------- `forbid` level set here
|
||||
...
|
||||
LL | #[allow(nonstandard_style)]
|
||||
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
error: allow(nonstandard_style) incompatible with previous forbid
|
||||
--> $DIR/forbid-group-group-2.rs:7:9
|
||||
|
|
||||
LL | #![forbid(warnings)]
|
||||
| -------- `forbid` level set here
|
||||
...
|
||||
LL | #[allow(nonstandard_style)]
|
||||
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
error: allow(nonstandard_style) incompatible with previous forbid
|
||||
--> $DIR/forbid-group-group-2.rs:7:9
|
||||
|
|
||||
LL | #![forbid(warnings)]
|
||||
| -------- `forbid` level set here
|
||||
...
|
||||
LL | #[allow(nonstandard_style)]
|
||||
| ^^^^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
error: aborting due to 9 previous errors
|
||||
error: aborting due to 6 previous errors
|
||||
|
||||
|
@ -12,8 +12,6 @@
|
||||
//~| WARNING previously accepted
|
||||
//~| WARNING incompatible with previous forbid
|
||||
//~| WARNING previously accepted
|
||||
//~| WARNING incompatible with previous forbid
|
||||
//~| WARNING previously accepted
|
||||
fn main() {
|
||||
let a: ();
|
||||
}
|
||||
|
@ -35,17 +35,5 @@ LL | #[allow(unused_variables)]
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
warning: allow(unused_variables) incompatible with previous forbid
|
||||
--> $DIR/forbid-group-member.rs:8:9
|
||||
|
|
||||
LL | #![forbid(unused)]
|
||||
| ------ `forbid` level set here
|
||||
LL |
|
||||
LL | #[allow(unused_variables)]
|
||||
| ^^^^^^^^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
warning: 4 warnings emitted
|
||||
warning: 3 warnings emitted
|
||||
|
||||
|
@ -6,7 +6,6 @@
|
||||
#[allow(unused)]
|
||||
//~^ ERROR incompatible with previous forbid
|
||||
//~| ERROR incompatible with previous forbid
|
||||
//~| ERROR incompatible with previous forbid
|
||||
fn main() {
|
||||
let a: ();
|
||||
}
|
||||
|
@ -16,15 +16,6 @@ LL |
|
||||
LL | #[allow(unused)]
|
||||
| ^^^^^^ overruled by previous forbid
|
||||
|
||||
error[E0453]: allow(unused) incompatible with previous forbid
|
||||
--> $DIR/forbid-member-group.rs:6:9
|
||||
|
|
||||
LL | #![forbid(unused_variables)]
|
||||
| ---------------- `forbid` level set here
|
||||
LL |
|
||||
LL | #[allow(unused)]
|
||||
| ^^^^^^ overruled by previous forbid
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns elided_lifetimes_in_paths
|
||||
// compile-flags: --force-warns elided_lifetimes_in_paths -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
struct Foo<'a> {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns const_err
|
||||
// compile-flags: --force-warns const_err -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(const_err)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns dead_code
|
||||
// compile-flags: --force-warns dead_code -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(dead_code)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns const_err
|
||||
// compile-flags: --force-warns const_err -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
const C: i32 = 1 / 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns dead_code
|
||||
// compile-flags: --force-warns dead_code -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(warnings)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns nonstandard_style
|
||||
// compile-flags: --force-warns nonstandard_style -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(warnings)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns bare_trait_objects
|
||||
// compile-flags: --force-warns bare_trait_objects -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns rust_2018_idioms
|
||||
// compile-flags: --force-warns rust_2018_idioms -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(bare_trait_objects)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: --force-warns rust_2018_idioms
|
||||
// compile-flags: --force-warns rust_2018_idioms -Zunstable-options
|
||||
// check-pass
|
||||
|
||||
#![allow(rust_2018_idioms)]
|
||||
|
@ -11,6 +11,4 @@
|
||||
//~| WARNING being phased out
|
||||
//~| WARNING incompatible with previous forbid
|
||||
//~| WARNING being phased out
|
||||
//~| WARNING incompatible with previous forbid
|
||||
//~| WARNING being phased out
|
||||
fn main() {}
|
||||
|
@ -35,17 +35,5 @@ LL | #[deny(warnings)]
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
warning: deny(warnings) incompatible with previous forbid
|
||||
--> $DIR/issue-80988.rs:7:8
|
||||
|
|
||||
LL | #![forbid(warnings)]
|
||||
| -------- `forbid` level set here
|
||||
LL |
|
||||
LL | #[deny(warnings)]
|
||||
| ^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||
|
||||
warning: 4 warnings emitted
|
||||
warning: 3 warnings emitted
|
||||
|
||||
|
@ -1,3 +1,4 @@
|
||||
// compile-flags: -Zunstable-options
|
||||
// check-pass
|
||||
#![warn(rustc::internal)]
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
warning: unknown lint: `rustc::foo::bar::default_hash_types`
|
||||
--> $DIR/issue-83477.rs:4:9
|
||||
--> $DIR/issue-83477.rs:5:9
|
||||
|
|
||||
LL | #[allow(rustc::foo::bar::default_hash_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `rustc::default_hash_types`
|
||||
@ -7,19 +7,19 @@ LL | #[allow(rustc::foo::bar::default_hash_types)]
|
||||
= note: `#[warn(unknown_lints)]` on by default
|
||||
|
||||
warning: unknown lint: `rustc::foo::default_hash_types`
|
||||
--> $DIR/issue-83477.rs:8:9
|
||||
--> $DIR/issue-83477.rs:9:9
|
||||
|
|
||||
LL | #[allow(rustc::foo::default_hash_types)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `rustc::default_hash_types`
|
||||
|
||||
warning: Prefer FxHashMap over HashMap, it has better performance
|
||||
--> $DIR/issue-83477.rs:13:31
|
||||
--> $DIR/issue-83477.rs:14:31
|
||||
|
|
||||
LL | let _ = std::collections::HashMap::<String, String>::new();
|
||||
| ^^^^^^^ help: use: `FxHashMap`
|
||||
|
|
||||
note: the lint level is defined here
|
||||
--> $DIR/issue-83477.rs:2:9
|
||||
--> $DIR/issue-83477.rs:3:9
|
||||
|
|
||||
LL | #![warn(rustc::internal)]
|
||||
| ^^^^^^^^^^^^^^^
|
||||
|
@ -3,6 +3,5 @@
|
||||
#[allow(deprecated)]
|
||||
//~^ ERROR allow(deprecated) incompatible
|
||||
//~| ERROR allow(deprecated) incompatible
|
||||
//~| ERROR allow(deprecated) incompatible
|
||||
fn main() {
|
||||
}
|
||||
|
@ -16,15 +16,6 @@ LL |
|
||||
LL | #[allow(deprecated)]
|
||||
| ^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error[E0453]: allow(deprecated) incompatible with previous forbid
|
||||
--> $DIR/lint-forbid-attr.rs:3:9
|
||||
|
|
||||
LL | #![forbid(deprecated)]
|
||||
| ---------- `forbid` level set here
|
||||
LL |
|
||||
LL | #[allow(deprecated)]
|
||||
| ^^^^^^^^^^ overruled by previous forbid
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
@ -2,6 +2,5 @@
|
||||
|
||||
#[allow(deprecated)] //~ ERROR allow(deprecated) incompatible
|
||||
//~| ERROR allow(deprecated) incompatible
|
||||
//~| ERROR allow(deprecated) incompatible
|
||||
fn main() {
|
||||
}
|
||||
|
@ -14,14 +14,6 @@ LL | #[allow(deprecated)]
|
||||
|
|
||||
= note: `forbid` lint level was set on command line
|
||||
|
||||
error[E0453]: allow(deprecated) incompatible with previous forbid
|
||||
--> $DIR/lint-forbid-cmdline.rs:3:9
|
||||
|
|
||||
LL | #[allow(deprecated)]
|
||||
| ^^^^^^^^^^ overruled by previous forbid
|
||||
|
|
||||
= note: `forbid` lint level was set on command line
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0453`.
|
||||
|
@ -3,6 +3,4 @@
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
fn main() { }
|
||||
|
@ -28,18 +28,6 @@ error[E0452]: malformed lint attribute input
|
||||
LL | #![allow(bar = "baz")]
|
||||
| ^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/lint-malformed.rs:2:10
|
||||
|
|
||||
LL | #![allow(bar = "baz")]
|
||||
| ^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/lint-malformed.rs:2:10
|
||||
|
|
||||
LL | #![allow(bar = "baz")]
|
||||
| ^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error: aborting due to 7 previous errors
|
||||
error: aborting due to 5 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
@ -10,10 +10,6 @@ warning: lint `raw_pointer_derive` has been removed: using derive with raw point
|
||||
|
|
||||
= note: requested on the command line with `-D raw_pointer_derive`
|
||||
|
||||
warning: lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
|
||||
|
|
||||
= note: requested on the command line with `-D raw_pointer_derive`
|
||||
|
||||
error: unused variable: `unused`
|
||||
--> $DIR/lint-removed-cmdline.rs:12:17
|
||||
|
|
||||
@ -27,5 +23,5 @@ LL | #[deny(warnings)]
|
||||
| ^^^^^^^^
|
||||
= note: `#[deny(unused_variables)]` implied by `#[deny(warnings)]`
|
||||
|
||||
error: aborting due to previous error; 4 warnings emitted
|
||||
error: aborting due to previous error; 3 warnings emitted
|
||||
|
||||
|
@ -10,10 +10,6 @@ warning: lint `bare_trait_object` has been renamed to `bare_trait_objects`
|
||||
|
|
||||
= note: requested on the command line with `-D bare_trait_object`
|
||||
|
||||
warning: lint `bare_trait_object` has been renamed to `bare_trait_objects`
|
||||
|
|
||||
= note: requested on the command line with `-D bare_trait_object`
|
||||
|
||||
error: unused variable: `unused`
|
||||
--> $DIR/lint-renamed-cmdline.rs:8:17
|
||||
|
|
||||
@ -27,5 +23,5 @@ LL | #[deny(unused)]
|
||||
| ^^^^^^
|
||||
= note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
|
||||
|
||||
error: aborting due to previous error; 4 warnings emitted
|
||||
error: aborting due to previous error; 3 warnings emitted
|
||||
|
||||
|
@ -22,14 +22,6 @@ warning: lint `private_no_mangle_statics` has been removed: no longer a warning,
|
||||
|
|
||||
= note: requested on the command line with `-F private_no_mangle_statics`
|
||||
|
||||
warning: lint `private_no_mangle_fns` has been removed: no longer a warning, `#[no_mangle]` functions always exported
|
||||
|
|
||||
= note: requested on the command line with `-F private_no_mangle_fns`
|
||||
|
||||
warning: lint `private_no_mangle_statics` has been removed: no longer a warning, `#[no_mangle]` statics always exported
|
||||
|
|
||||
= note: requested on the command line with `-F private_no_mangle_statics`
|
||||
|
||||
error: const items should never be `#[no_mangle]`
|
||||
--> $DIR/lint-unexported-no-mangle.rs:9:1
|
||||
|
|
||||
@ -48,5 +40,5 @@ LL | pub const PUB_FOO: u64 = 1;
|
||||
| |
|
||||
| help: try a static value: `pub static`
|
||||
|
||||
error: aborting due to 2 previous errors; 8 warnings emitted
|
||||
error: aborting due to 2 previous errors; 6 warnings emitted
|
||||
|
||||
|
@ -16,15 +16,6 @@ error[E0602]: unknown lint: `dead_cod`
|
||||
= help: did you mean: `dead_code`
|
||||
= note: requested on the command line with `-D dead_cod`
|
||||
|
||||
error[E0602]: unknown lint: `bogus`
|
||||
|
|
||||
= note: requested on the command line with `-D bogus`
|
||||
|
||||
error[E0602]: unknown lint: `dead_cod`
|
||||
|
|
||||
= help: did you mean: `dead_code`
|
||||
= note: requested on the command line with `-D dead_cod`
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0602`.
|
||||
|
@ -3,15 +3,11 @@
|
||||
#![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||
//~^ ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE reason must be a string literal
|
||||
//~| NOTE reason must be a string literal
|
||||
//~| NOTE reason must be a string literal
|
||||
#![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||
//~^ ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE reason must be a string literal
|
||||
//~| NOTE reason must be a string literal
|
||||
//~| NOTE reason must be a string literal
|
||||
#![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
@ -19,10 +15,6 @@
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
@ -32,10 +24,6 @@
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
@ -45,10 +33,6 @@
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
//~| NOTE bad attribute argument
|
||||
@ -56,15 +40,11 @@
|
||||
#![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||
//~^ ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE reason in lint attribute must come last
|
||||
//~| NOTE reason in lint attribute must come last
|
||||
//~| NOTE reason in lint attribute must come last
|
||||
#![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||
//~^ ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| ERROR malformed lint attribute
|
||||
//~| NOTE reason in lint attribute must come last
|
||||
//~| NOTE reason in lint attribute must come last
|
||||
//~| NOTE reason in lint attribute must come last
|
||||
#![warn(missing_copy_implementations, reason)]
|
||||
|
@ -5,61 +5,61 @@ LL | #![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||
| ^ reason must be a string literal
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:10:40
|
||||
--> $DIR/reasons-erroneous.rs:8:40
|
||||
|
|
||||
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:17:29
|
||||
--> $DIR/reasons-erroneous.rs:13:29
|
||||
|
|
||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:17:29
|
||||
--> $DIR/reasons-erroneous.rs:13:29
|
||||
|
|
||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:30:23
|
||||
--> $DIR/reasons-erroneous.rs:22:23
|
||||
|
|
||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:30:23
|
||||
--> $DIR/reasons-erroneous.rs:22:23
|
||||
|
|
||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:43:36
|
||||
--> $DIR/reasons-erroneous.rs:31:36
|
||||
|
|
||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:43:36
|
||||
--> $DIR/reasons-erroneous.rs:31:36
|
||||
|
|
||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:56:44
|
||||
--> $DIR/reasons-erroneous.rs:40:44
|
||||
|
|
||||
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:63:25
|
||||
--> $DIR/reasons-erroneous.rs:45:25
|
||||
|
|
||||
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||
|
||||
warning: unknown lint: `reason`
|
||||
--> $DIR/reasons-erroneous.rs:70:39
|
||||
--> $DIR/reasons-erroneous.rs:50:39
|
||||
|
|
||||
LL | #![warn(missing_copy_implementations, reason)]
|
||||
| ^^^^^^
|
||||
@ -73,119 +73,59 @@ LL | #![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||
| ^ reason must be a string literal
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:10:40
|
||||
--> $DIR/reasons-erroneous.rs:8:40
|
||||
|
|
||||
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:17:29
|
||||
--> $DIR/reasons-erroneous.rs:13:29
|
||||
|
|
||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:17:29
|
||||
--> $DIR/reasons-erroneous.rs:13:29
|
||||
|
|
||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:30:23
|
||||
--> $DIR/reasons-erroneous.rs:22:23
|
||||
|
|
||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:30:23
|
||||
--> $DIR/reasons-erroneous.rs:22:23
|
||||
|
|
||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:43:36
|
||||
--> $DIR/reasons-erroneous.rs:31:36
|
||||
|
|
||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:43:36
|
||||
--> $DIR/reasons-erroneous.rs:31:36
|
||||
|
|
||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:56:44
|
||||
--> $DIR/reasons-erroneous.rs:40:44
|
||||
|
|
||||
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:63:25
|
||||
--> $DIR/reasons-erroneous.rs:45:25
|
||||
|
|
||||
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:3:58
|
||||
|
|
||||
LL | #![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||
| ^ reason must be a string literal
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:10:40
|
||||
|
|
||||
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:17:29
|
||||
|
|
||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:17:29
|
||||
|
|
||||
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:30:23
|
||||
|
|
||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:30:23
|
||||
|
|
||||
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:43:36
|
||||
|
|
||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:43:36
|
||||
|
|
||||
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:56:44
|
||||
|
|
||||
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||
|
||||
error[E0452]: malformed lint attribute input
|
||||
--> $DIR/reasons-erroneous.rs:63:25
|
||||
|
|
||||
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||
|
||||
error: aborting due to 30 previous errors; 1 warning emitted
|
||||
error: aborting due to 20 previous errors; 1 warning emitted
|
||||
|
||||
For more information about this error, try `rustc --explain E0452`.
|
||||
|
@ -7,5 +7,3 @@
|
||||
//~| HELP add `#![register_tool(abc)]`
|
||||
//~| ERROR unknown tool name `abc`
|
||||
//~| HELP add `#![register_tool(abc)]`
|
||||
//~| ERROR unknown tool name `abc`
|
||||
//~| HELP add `#![register_tool(abc)]`
|
||||
|
@ -14,14 +14,6 @@ LL | #![warn(abc::my_lint)]
|
||||
|
|
||||
= help: add `#![register_tool(abc)]` to the crate root
|
||||
|
||||
error[E0710]: unknown tool name `abc` found in scoped lint: `abc::my_lint`
|
||||
--> $DIR/register-tool-lint.rs:5:9
|
||||
|
|
||||
LL | #![warn(abc::my_lint)]
|
||||
| ^^^
|
||||
|
|
||||
= help: add `#![register_tool(abc)]` to the crate root
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0710`.
|
||||
|
@ -1,420 +1,3 @@
|
||||
{
|
||||
"message": "cannot find type `Iter` in this scope",
|
||||
"code": {
|
||||
"code": "E0412",
|
||||
"explanation": "A used type name is not in scope.
|
||||
{"message":"`--error-format=pretty-json` is unstable","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: `--error-format=pretty-json` is unstable\u001b[0m
|
||||
|
||||
Erroneous code examples:
|
||||
|
||||
```compile_fail,E0412
|
||||
impl Something {} // error: type name `Something` is not in scope
|
||||
|
||||
// or:
|
||||
|
||||
trait Foo {
|
||||
fn bar(N); // error: type name `N` is not in scope
|
||||
}
|
||||
|
||||
// or:
|
||||
|
||||
fn foo(x: T) {} // type name `T` is not in scope
|
||||
```
|
||||
|
||||
To fix this error, please verify you didn't misspell the type name, you did
|
||||
declare it or imported it into the scope. Examples:
|
||||
|
||||
```
|
||||
struct Something;
|
||||
|
||||
impl Something {} // ok!
|
||||
|
||||
// or:
|
||||
|
||||
trait Foo {
|
||||
type N;
|
||||
|
||||
fn bar(_: Self::N); // ok!
|
||||
}
|
||||
|
||||
// or:
|
||||
|
||||
fn foo<T>(x: T) {} // ok!
|
||||
```
|
||||
|
||||
Another case that causes this error is when a type is imported into a parent
|
||||
module. To fix this, you can follow the suggestion and use File directly or
|
||||
`use super::File;` which will import the types from the parent namespace. An
|
||||
example that causes this error is below:
|
||||
|
||||
```compile_fail,E0412
|
||||
use std::fs::File;
|
||||
|
||||
mod foo {
|
||||
fn some_function(f: File) {}
|
||||
}
|
||||
```
|
||||
|
||||
```
|
||||
use std::fs::File;
|
||||
|
||||
mod foo {
|
||||
// either
|
||||
use super::File;
|
||||
// or
|
||||
// use std::fs::File;
|
||||
fn foo(f: File) {}
|
||||
}
|
||||
# fn main() {} // don't insert it for us; that'll break imports
|
||||
```
|
||||
"
|
||||
},
|
||||
"level": "error",
|
||||
"spans": [
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 541,
|
||||
"byte_end": 545,
|
||||
"line_start": 12,
|
||||
"line_end": 12,
|
||||
"column_start": 12,
|
||||
"column_end": 16,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": " let x: Iter;",
|
||||
"highlight_start": 12,
|
||||
"highlight_end": 16
|
||||
}
|
||||
],
|
||||
"label": "not found in this scope",
|
||||
"suggested_replacement": null,
|
||||
"suggestion_applicability": null,
|
||||
"expansion": null
|
||||
}
|
||||
],
|
||||
"children": [
|
||||
{
|
||||
"message": "consider importing one of these items",
|
||||
"code": null,
|
||||
"level": "help",
|
||||
"spans": [
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::binary_heap::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::btree_map::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::btree_set::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::hash_map::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::hash_set::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::linked_list::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::collections::vec_deque::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::option::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::path::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::result::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::slice::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
},
|
||||
{
|
||||
"file_name": "$DIR/use_suggestion_json.rs",
|
||||
"byte_start": 518,
|
||||
"byte_end": 518,
|
||||
"line_start": 11,
|
||||
"line_end": 11,
|
||||
"column_start": 1,
|
||||
"column_end": 1,
|
||||
"is_primary": true,
|
||||
"text": [
|
||||
{
|
||||
"text": "fn main() {",
|
||||
"highlight_start": 1,
|
||||
"highlight_end": 1
|
||||
}
|
||||
],
|
||||
"label": null,
|
||||
"suggested_replacement": "use std::sync::mpsc::Iter;
|
||||
|
||||
",
|
||||
"suggestion_applicability": "Unspecified",
|
||||
"expansion": null
|
||||
}
|
||||
],
|
||||
"children": [],
|
||||
"rendered": null
|
||||
}
|
||||
],
|
||||
"rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror[E0412]\u001b[0m\u001b[0m\u001b[1m: cannot find type `Iter` in this scope\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0m$DIR/use_suggestion_json.rs:12:12\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m let x: Iter;\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mnot found in this scope\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m\u001b[1m\u001b[38;5;14mhelp\u001b[0m\u001b[0m: consider importing one of these items\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::binary_heap::Iter;\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::btree_map::Iter;\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::btree_set::Iter;\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m\u001b[1m\u001b[38;5;12mLL\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse std::collections::hash_map::Iter;\u001b[0m
|
||||
\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m
|
||||
\u001b[0m and 8 other candidates\u001b[0m
|
||||
|
||||
"
|
||||
}
|
||||
{
|
||||
"message": "aborting due to previous error",
|
||||
"code": null,
|
||||
"level": "error",
|
||||
"spans": [],
|
||||
"children": [],
|
||||
"rendered": "\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to previous error\u001b[0m
|
||||
|
||||
"
|
||||
}
|
||||
{
|
||||
"message": "For more information about this error, try `rustc --explain E0412`.",
|
||||
"code": null,
|
||||
"level": "failure-note",
|
||||
"spans": [],
|
||||
"children": [],
|
||||
"rendered": "\u001b[0m\u001b[1mFor more information about this error, try `rustc --explain E0412`.\u001b[0m
|
||||
"
|
||||
}
|
||||
"}
|
||||
|
@ -1,5 +1,4 @@
|
||||
#[warn(foo::bar)]
|
||||
//~^ ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
fn main() {}
|
||||
|
@ -14,14 +14,6 @@ LL | #[warn(foo::bar)]
|
||||
|
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
--> $DIR/tool_lints.rs:1:8
|
||||
|
|
||||
LL | #[warn(foo::bar)]
|
||||
| ^^^
|
||||
|
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0710`.
|
||||
|
@ -1,8 +1,6 @@
|
||||
#![deny(foo::bar)] //~ ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
|
||||
#[allow(foo::bar)] //~ ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
fn main() {}
|
||||
|
@ -7,7 +7,7 @@ LL | #![deny(foo::bar)]
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
--> $DIR/unknown-lint-tool-name.rs:5:9
|
||||
--> $DIR/unknown-lint-tool-name.rs:4:9
|
||||
|
|
||||
LL | #[allow(foo::bar)]
|
||||
| ^^^
|
||||
@ -23,29 +23,13 @@ LL | #![deny(foo::bar)]
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
--> $DIR/unknown-lint-tool-name.rs:5:9
|
||||
--> $DIR/unknown-lint-tool-name.rs:4:9
|
||||
|
|
||||
LL | #[allow(foo::bar)]
|
||||
| ^^^
|
||||
|
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
--> $DIR/unknown-lint-tool-name.rs:1:9
|
||||
|
|
||||
LL | #![deny(foo::bar)]
|
||||
| ^^^
|
||||
|
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||
--> $DIR/unknown-lint-tool-name.rs:5:9
|
||||
|
|
||||
LL | #[allow(foo::bar)]
|
||||
| ^^^
|
||||
|
|
||||
= help: add `#![register_tool(foo)]` to the crate root
|
||||
|
||||
error: aborting due to 6 previous errors
|
||||
error: aborting due to 4 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0710`.
|
||||
|
@ -1,7 +1,7 @@
|
||||
// --extern-location with bad location type
|
||||
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=badloc:in-the-test-file
|
||||
// compile-flags:--extern-location bar=badloc:in-the-test-file -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// --extern-location with a raw reference
|
||||
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=json:[{"malformed
|
||||
// compile-flags:--extern-location bar=json:[{"malformed -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// check-pass
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=json:{"key":123,"value":{}} --error-format json
|
||||
// compile-flags:--extern-location bar=json:{"key":123,"value":{}} --error-format json -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
//~^ WARNING external crate `bar` unused in
|
||||
|
@ -1,4 +1,4 @@
|
||||
{"message":"external crate `bar` unused in `extern_loc_json_json`: remove the dependency or add `use bar as _;`","code":{"code":"unused_crate_dependencies","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/extern-loc-json-json.rs","byte_start":169,"byte_end":169,"line_start":7,"line_end":7,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/extern-loc-json-json.rs","byte_start":177,"byte_end":202,"line_start":7,"line_end":7,"column_start":9,"column_end":34,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":9,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove unnecessary dependency `bar`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"json extern location","code":null,"level":"help","spans":[],"children":[],"rendered":null,"tool_metadata":{"key":123,"value":{}}}],"rendered":"warning: external crate `bar` unused in `extern_loc_json_json`: remove the dependency or add `use bar as _;`
|
||||
{"message":"external crate `bar` unused in `extern_loc_json_json`: remove the dependency or add `use bar as _;`","code":{"code":"unused_crate_dependencies","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/extern-loc-json-json.rs","byte_start":189,"byte_end":189,"line_start":7,"line_end":7,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/extern-loc-json-json.rs","byte_start":197,"byte_end":222,"line_start":7,"line_end":7,"column_start":9,"column_end":34,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":9,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove unnecessary dependency `bar`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"json extern location","code":null,"level":"help","spans":[],"children":[],"rendered":null,"tool_metadata":{"key":123,"value":{}}}],"rendered":"warning: external crate `bar` unused in `extern_loc_json_json`: remove the dependency or add `use bar as _;`
|
||||
--> $DIR/extern-loc-json-json.rs:7:1
|
||||
|
|
||||
LL | #![warn(unused_crate_dependencies)]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// check-pass
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=json:{"key":123,"value":{}}
|
||||
// compile-flags:--extern-location bar=json:{"key":123,"value":{}} -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
//~^ WARNING external crate `bar` unused in
|
||||
|
@ -1,7 +1,7 @@
|
||||
// --extern-location with no type
|
||||
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=missing-loc-type
|
||||
// compile-flags:--extern-location bar=missing-loc-type -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// check-pass
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=raw:in-the-test-file --error-format json
|
||||
// compile-flags:--extern-location bar=raw:in-the-test-file --error-format json -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
//~^ WARNING external crate `bar` unused in
|
||||
|
@ -1,4 +1,4 @@
|
||||
{"message":"external crate `bar` unused in `extern_loc_raw_json`: remove the dependency or add `use bar as _;`","code":{"code":"unused_crate_dependencies","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/extern-loc-raw-json.rs","byte_start":162,"byte_end":162,"line_start":7,"line_end":7,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/extern-loc-raw-json.rs","byte_start":170,"byte_end":195,"line_start":7,"line_end":7,"column_start":9,"column_end":34,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":9,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove unnecessary dependency `bar` at `in-the-test-file`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"raw extern location","code":null,"level":"help","spans":[{"file_name":"$DIR/extern-loc-raw-json.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":"in-the-test-file","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null},{"message":"json extern location","code":null,"level":"help","spans":[],"children":[],"rendered":null,"tool_metadata":"in-the-test-file"}],"rendered":"warning: external crate `bar` unused in `extern_loc_raw_json`: remove the dependency or add `use bar as _;`
|
||||
{"message":"external crate `bar` unused in `extern_loc_raw_json`: remove the dependency or add `use bar as _;`","code":{"code":"unused_crate_dependencies","explanation":null},"level":"warning","spans":[{"file_name":"$DIR/extern-loc-raw-json.rs","byte_start":182,"byte_end":182,"line_start":7,"line_end":7,"column_start":1,"column_end":1,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":1,"highlight_end":1}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"the lint level is defined here","code":null,"level":"note","spans":[{"file_name":"$DIR/extern-loc-raw-json.rs","byte_start":190,"byte_end":215,"line_start":7,"line_end":7,"column_start":9,"column_end":34,"is_primary":true,"text":[{"text":"#![warn(unused_crate_dependencies)]","highlight_start":9,"highlight_end":34}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":null},{"message":"remove unnecessary dependency `bar` at `in-the-test-file`","code":null,"level":"help","spans":[],"children":[],"rendered":null},{"message":"raw extern location","code":null,"level":"help","spans":[{"file_name":"$DIR/extern-loc-raw-json.rs","byte_start":0,"byte_end":0,"line_start":1,"line_end":1,"column_start":1,"column_end":1,"is_primary":true,"text":[],"label":null,"suggested_replacement":"in-the-test-file","suggestion_applicability":"Unspecified","expansion":null}],"children":[],"rendered":null},{"message":"json extern location","code":null,"level":"help","spans":[],"children":[],"rendered":null,"tool_metadata":"in-the-test-file"}],"rendered":"warning: external crate `bar` unused in `extern_loc_raw_json`: remove the dependency or add `use bar as _;`
|
||||
--> $DIR/extern-loc-raw-json.rs:7:1
|
||||
|
|
||||
LL | #![warn(unused_crate_dependencies)]
|
||||
|
@ -1,7 +1,7 @@
|
||||
// --extern-location with a raw reference
|
||||
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=raw
|
||||
// compile-flags:--extern-location bar=raw -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// check-pass
|
||||
// aux-crate:bar=bar.rs
|
||||
// compile-flags:--extern-location bar=raw:in-the-test-file
|
||||
// compile-flags:--extern-location bar=raw:in-the-test-file -Z unstable-options
|
||||
|
||||
#![warn(unused_crate_dependencies)]
|
||||
//~^ WARNING external crate `bar` unused in
|
||||
|
@ -438,6 +438,9 @@ impl TestProps {
|
||||
|
||||
if let Some(edition) = config.parse_edition(ln) {
|
||||
self.compile_flags.push(format!("--edition={}", edition));
|
||||
if edition == "2021" {
|
||||
self.compile_flags.push("-Zunstable-options".to_string());
|
||||
}
|
||||
}
|
||||
|
||||
config.parse_and_update_revisions(ln, &mut self.revisions);
|
||||
|
@ -1785,6 +1785,9 @@ impl<'test> TestCx<'test> {
|
||||
get_lib_name(&aux_path.trim_end_matches(".rs").replace('-', "_"), is_dylib);
|
||||
rustc.arg("--extern").arg(format!("{}={}/{}", aux_name, aux_dir.display(), lib_name));
|
||||
}
|
||||
if !self.props.aux_crates.is_empty() {
|
||||
rustc.arg("-Zunstable-options");
|
||||
}
|
||||
|
||||
aux_dir
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user