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
67 changed files with 86 additions and 817 deletions
|
@ -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(format!("-Cdebuginfo={}", builder.config.rust_debuginfo_level_tests));
|
||||||
flags.push("-Zunstable-options".to_string());
|
|
||||||
flags.push(builder.config.cmd.rustc_args().join(" "));
|
flags.push(builder.config.cmd.rustc_args().join(" "));
|
||||||
|
|
||||||
if let Some(linker) = builder.linker(target) {
|
if let Some(linker) = builder.linker(target) {
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
// revisions: correct incorrect
|
// revisions: correct incorrect
|
||||||
// check-pass
|
// check-pass
|
||||||
// [correct]compile-flags:--test --test-run-directory={{src-base}}
|
// [correct]compile-flags:--test --test-run-directory={{src-base}} -Zunstable-options
|
||||||
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
|
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage -Zunstable-options
|
||||||
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
|
// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
|
||||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
// 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`
|
// NOTE: This test doesn't actually require `fulldeps`
|
||||||
// so we could instead use it as an `ui` test.
|
// so we could instead use it as an `ui` test.
|
||||||
//
|
//
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
error: passing `TyCtxt<'tcx>` by reference
|
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) {}
|
LL | fn by_ref(&self) {}
|
||||||
| ^^^^^ help: try passing by value: `TyCtxt<'tcx>`
|
| ^^^^^ help: try passing by value: `TyCtxt<'tcx>`
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
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)]
|
LL | #![deny(rustc::ty_pass_by_reference)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: passing `Ty<'tcx>` 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>) {}
|
LL | fn by_ref(self: &Ty<'tcx>) {}
|
||||||
| ^^^^^^^^^ help: try passing by value: `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() {
|
pub fn main() {
|
||||||
let x: Iter; //~ ERROR cannot find type `Iter` in this scope
|
let x: Iter; //~ ERROR cannot find type `Iter` in this scope
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
// aux-build:multispan.rs
|
// 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)]
|
#![feature(proc_macro_hygiene)]
|
||||||
|
|
||||||
|
|
|
@ -22,12 +22,6 @@ error[E0452]: malformed lint attribute input
|
||||||
LL | #[deny("literal")]
|
LL | #[deny("literal")]
|
||||||
| ^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error: aborting due to 4 previous errors
|
||||||
--> $DIR/deduplicate-diagnostics.rs:8:8
|
|
||||||
|
|
|
||||||
LL | #[deny("literal")]
|
|
||||||
| ^^^^^^^^^ bad attribute argument
|
|
||||||
|
|
||||||
error: aborting due to 5 previous errors
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0452`.
|
For more information about this error, try `rustc --explain E0452`.
|
||||||
|
|
|
@ -7,5 +7,4 @@ struct S;
|
||||||
|
|
||||||
#[deny("literal")] //~ ERROR malformed lint attribute input
|
#[deny("literal")] //~ ERROR malformed lint attribute input
|
||||||
//[duplicate]~| ERROR malformed lint attribute input
|
//[duplicate]~| ERROR malformed lint attribute input
|
||||||
//[duplicate]~| ERROR malformed lint attribute input
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -2,7 +2,5 @@
|
||||||
//~| ERROR E0452
|
//~| ERROR E0452
|
||||||
//~| ERROR E0452
|
//~| ERROR E0452
|
||||||
//~| ERROR E0452
|
//~| ERROR E0452
|
||||||
//~| ERROR E0452
|
|
||||||
//~| ERROR E0452
|
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,18 +22,6 @@ error[E0452]: malformed lint attribute input
|
||||||
LL | #![allow(foo = "")]
|
LL | #![allow(foo = "")]
|
||||||
| ^^^^^^^^ bad attribute argument
|
| ^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error: aborting due to 4 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0452`.
|
For more information about this error, try `rustc --explain E0452`.
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
//~^ ERROR allow(non_snake_case) incompatible
|
//~^ ERROR allow(non_snake_case) incompatible
|
||||||
//~| ERROR allow(non_snake_case) incompatible
|
//~| ERROR allow(non_snake_case) incompatible
|
||||||
//~| ERROR allow(non_snake_case) incompatible
|
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,15 +16,6 @@ LL |
|
||||||
LL | #[allow(non_snake_case)]
|
LL | #[allow(non_snake_case)]
|
||||||
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
| ^^^^^^^^^^^^^^ overruled by previous forbid
|
||||||
|
|
||||||
error[E0453]: allow(non_snake_case) incompatible with previous forbid
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0453`.
|
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`
|
= note: requested on the command line with `-D bogus`
|
||||||
|
|
||||||
error[E0602]: unknown lint: `bogus`
|
error: aborting due to 2 previous errors
|
||||||
|
|
|
||||||
= note: requested on the command line with `-D bogus`
|
|
||||||
|
|
||||||
error: aborting due to 3 previous errors
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0602`.
|
For more information about this error, try `rustc --explain E0602`.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
#![warn(nonstandard_style, reason = "the standard should be respected")]
|
#![warn(nonstandard_style, reason = "the standard should be respected")]
|
||||||
//~^ ERROR lint reasons are experimental
|
//~^ ERROR lint reasons are experimental
|
||||||
//~| ERROR lint reasons are experimental
|
//~| ERROR lint reasons are experimental
|
||||||
//~| ERROR lint reasons are experimental
|
|
||||||
|
|
||||||
fn main() {}
|
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
|
= 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
|
= help: add `#![feature(lint_reasons)]` to the crate attributes to enable
|
||||||
|
|
||||||
error[E0658]: lint reasons are experimental
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0658`.
|
For more information about this error, try `rustc --explain E0658`.
|
||||||
|
|
|
@ -4,12 +4,10 @@ mod foo {
|
||||||
#![allow(uncommon_codepoints)]
|
#![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]
|
//~| 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)]
|
#[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]
|
//~| 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;
|
const BAR: f64 = 0.000001;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +15,5 @@ const BAR: f64 = 0.000001;
|
||||||
#[allow(uncommon_codepoints)]
|
#[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]
|
//~| 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() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,13 +11,13 @@ LL | #![deny(uncommon_codepoints, unused_attributes)]
|
||||||
| ^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
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)]
|
LL | #[allow(uncommon_codepoints)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
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)]
|
LL | #[allow(uncommon_codepoints)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -29,34 +29,16 @@ LL | #![allow(uncommon_codepoints)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
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)]
|
LL | #[allow(uncommon_codepoints)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
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)]
|
LL | #[allow(uncommon_codepoints)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
error: allow(uncommon_codepoints) is ignored unless specified at crate level
|
error: aborting due to 6 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,4 @@
|
||||||
//~| WARNING previously accepted by the compiler
|
//~| WARNING previously accepted by the compiler
|
||||||
//~| ERROR incompatible with previous
|
//~| ERROR incompatible with previous
|
||||||
//~| WARNING previously accepted by the compiler
|
//~| 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() {}
|
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!
|
= 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>
|
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||||
|
|
||||||
error: allow(nonstandard_style) incompatible with previous forbid
|
error: aborting due to 6 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,6 @@
|
||||||
//~| WARNING previously accepted
|
//~| WARNING previously accepted
|
||||||
//~| WARNING incompatible with previous forbid
|
//~| WARNING incompatible with previous forbid
|
||||||
//~| WARNING previously accepted
|
//~| WARNING previously accepted
|
||||||
//~| WARNING incompatible with previous forbid
|
|
||||||
//~| WARNING previously accepted
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let a: ();
|
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!
|
= 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>
|
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||||
|
|
||||||
warning: allow(unused_variables) incompatible with previous forbid
|
warning: 3 warnings emitted
|
||||||
--> $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
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
//~^ ERROR incompatible with previous forbid
|
//~^ ERROR incompatible with previous forbid
|
||||||
//~| ERROR incompatible with previous forbid
|
//~| ERROR incompatible with previous forbid
|
||||||
//~| ERROR incompatible with previous forbid
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let a: ();
|
let a: ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,15 +16,6 @@ LL |
|
||||||
LL | #[allow(unused)]
|
LL | #[allow(unused)]
|
||||||
| ^^^^^^ overruled by previous forbid
|
| ^^^^^^ overruled by previous forbid
|
||||||
|
|
||||||
error[E0453]: allow(unused) incompatible with previous forbid
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0453`.
|
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
|
// check-pass
|
||||||
|
|
||||||
struct Foo<'a> {
|
struct Foo<'a> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// compile-flags: --force-warns const_err
|
// compile-flags: --force-warns const_err -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![allow(const_err)]
|
#![allow(const_err)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// compile-flags: --force-warns dead_code
|
// compile-flags: --force-warns dead_code -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![allow(dead_code)]
|
#![allow(dead_code)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// compile-flags: --force-warns const_err
|
// compile-flags: --force-warns const_err -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
const C: i32 = 1 / 0;
|
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
|
// check-pass
|
||||||
|
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// compile-flags: --force-warns nonstandard_style
|
// compile-flags: --force-warns nonstandard_style -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![allow(warnings)]
|
#![allow(warnings)]
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// compile-flags: --force-warns bare_trait_objects
|
// compile-flags: --force-warns bare_trait_objects -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
|
|
||||||
#![allow(rust_2018_idioms)]
|
#![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
|
// check-pass
|
||||||
|
|
||||||
#![allow(bare_trait_objects)]
|
#![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
|
// check-pass
|
||||||
|
|
||||||
#![allow(rust_2018_idioms)]
|
#![allow(rust_2018_idioms)]
|
||||||
|
|
|
@ -11,6 +11,4 @@
|
||||||
//~| WARNING being phased out
|
//~| WARNING being phased out
|
||||||
//~| WARNING incompatible with previous forbid
|
//~| WARNING incompatible with previous forbid
|
||||||
//~| WARNING being phased out
|
//~| WARNING being phased out
|
||||||
//~| WARNING incompatible with previous forbid
|
|
||||||
//~| WARNING being phased out
|
|
||||||
fn main() {}
|
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!
|
= 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>
|
= note: for more information, see issue #81670 <https://github.com/rust-lang/rust/issues/81670>
|
||||||
|
|
||||||
warning: deny(warnings) incompatible with previous forbid
|
warning: 3 warnings emitted
|
||||||
--> $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
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
// compile-flags: -Zunstable-options
|
||||||
// check-pass
|
// check-pass
|
||||||
#![warn(rustc::internal)]
|
#![warn(rustc::internal)]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
warning: unknown lint: `rustc::foo::bar::default_hash_types`
|
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)]
|
LL | #[allow(rustc::foo::bar::default_hash_types)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `rustc::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
|
= note: `#[warn(unknown_lints)]` on by default
|
||||||
|
|
||||||
warning: unknown lint: `rustc::foo::default_hash_types`
|
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)]
|
LL | #[allow(rustc::foo::default_hash_types)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `rustc::default_hash_types`
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: did you mean: `rustc::default_hash_types`
|
||||||
|
|
||||||
warning: Prefer FxHashMap over HashMap, it has better performance
|
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();
|
LL | let _ = std::collections::HashMap::<String, String>::new();
|
||||||
| ^^^^^^^ help: use: `FxHashMap`
|
| ^^^^^^^ help: use: `FxHashMap`
|
||||||
|
|
|
|
||||||
note: the lint level is defined here
|
note: the lint level is defined here
|
||||||
--> $DIR/issue-83477.rs:2:9
|
--> $DIR/issue-83477.rs:3:9
|
||||||
|
|
|
|
||||||
LL | #![warn(rustc::internal)]
|
LL | #![warn(rustc::internal)]
|
||||||
| ^^^^^^^^^^^^^^^
|
| ^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -3,6 +3,5 @@
|
||||||
#[allow(deprecated)]
|
#[allow(deprecated)]
|
||||||
//~^ ERROR allow(deprecated) incompatible
|
//~^ ERROR allow(deprecated) incompatible
|
||||||
//~| ERROR allow(deprecated) incompatible
|
//~| ERROR allow(deprecated) incompatible
|
||||||
//~| ERROR allow(deprecated) incompatible
|
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,15 +16,6 @@ LL |
|
||||||
LL | #[allow(deprecated)]
|
LL | #[allow(deprecated)]
|
||||||
| ^^^^^^^^^^ overruled by previous forbid
|
| ^^^^^^^^^^ overruled by previous forbid
|
||||||
|
|
||||||
error[E0453]: allow(deprecated) incompatible with previous forbid
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0453`.
|
For more information about this error, try `rustc --explain E0453`.
|
||||||
|
|
|
@ -2,6 +2,5 @@
|
||||||
|
|
||||||
#[allow(deprecated)] //~ ERROR allow(deprecated) incompatible
|
#[allow(deprecated)] //~ ERROR allow(deprecated) incompatible
|
||||||
//~| ERROR allow(deprecated) incompatible
|
//~| ERROR allow(deprecated) incompatible
|
||||||
//~| ERROR allow(deprecated) incompatible
|
|
||||||
fn main() {
|
fn main() {
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,14 +14,6 @@ LL | #[allow(deprecated)]
|
||||||
|
|
|
|
||||||
= note: `forbid` lint level was set on command line
|
= note: `forbid` lint level was set on command line
|
||||||
|
|
||||||
error[E0453]: allow(deprecated) incompatible with previous forbid
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0453`.
|
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
|
//~| ERROR malformed lint attribute
|
||||||
//~| ERROR malformed lint attribute
|
|
||||||
//~| ERROR malformed lint attribute
|
|
||||||
fn main() { }
|
fn main() { }
|
||||||
|
|
|
@ -28,18 +28,6 @@ error[E0452]: malformed lint attribute input
|
||||||
LL | #![allow(bar = "baz")]
|
LL | #![allow(bar = "baz")]
|
||||||
| ^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error: aborting due to 5 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0452`.
|
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`
|
= 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`
|
error: unused variable: `unused`
|
||||||
--> $DIR/lint-removed-cmdline.rs:12:17
|
--> $DIR/lint-removed-cmdline.rs:12:17
|
||||||
|
|
|
|
||||||
|
@ -27,5 +23,5 @@ LL | #[deny(warnings)]
|
||||||
| ^^^^^^^^
|
| ^^^^^^^^
|
||||||
= note: `#[deny(unused_variables)]` implied by `#[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`
|
= 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`
|
error: unused variable: `unused`
|
||||||
--> $DIR/lint-renamed-cmdline.rs:8:17
|
--> $DIR/lint-renamed-cmdline.rs:8:17
|
||||||
|
|
|
|
||||||
|
@ -27,5 +23,5 @@ LL | #[deny(unused)]
|
||||||
| ^^^^^^
|
| ^^^^^^
|
||||||
= note: `#[deny(unused_variables)]` implied by `#[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`
|
= 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]`
|
error: const items should never be `#[no_mangle]`
|
||||||
--> $DIR/lint-unexported-no-mangle.rs:9:1
|
--> $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`
|
| 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`
|
= help: did you mean: `dead_code`
|
||||||
= note: requested on the command line with `-D dead_cod`
|
= note: requested on the command line with `-D dead_cod`
|
||||||
|
|
||||||
error[E0602]: unknown lint: `bogus`
|
error: aborting due to 4 previous errors
|
||||||
|
|
|
||||||
= 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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0602`.
|
For more information about this error, try `rustc --explain E0602`.
|
||||||
|
|
|
@ -3,15 +3,11 @@
|
||||||
#![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
#![warn(absolute_paths_not_starting_with_crate, reason = 0)]
|
||||||
//~^ ERROR malformed lint attribute
|
//~^ ERROR malformed lint attribute
|
||||||
//~| 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
|
||||||
//~| 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")]
|
#![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||||
//~^ ERROR malformed lint attribute
|
//~^ ERROR malformed lint attribute
|
||||||
//~| 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
|
||||||
//~| 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")]
|
#![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
|
//~| 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
|
//~| 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
|
//~| 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
|
//~| 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
|
//~| 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
|
//~| 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")]
|
#![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||||
//~^ ERROR malformed lint attribute
|
//~^ ERROR malformed lint attribute
|
||||||
//~| 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
|
||||||
//~| 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)]
|
#![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||||
//~^ ERROR malformed lint attribute
|
//~^ ERROR malformed lint attribute
|
||||||
//~| 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
|
||||||
//~| NOTE reason in lint attribute must come last
|
//~| NOTE reason in lint attribute must come last
|
||||||
#![warn(missing_copy_implementations, reason)]
|
#![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
|
| ^ reason must be a string literal
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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"))]
|
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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"))]
|
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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)]
|
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||||
|
|
||||||
warning: unknown lint: `reason`
|
warning: unknown lint: `reason`
|
||||||
--> $DIR/reasons-erroneous.rs:70:39
|
--> $DIR/reasons-erroneous.rs:50:39
|
||||||
|
|
|
|
||||||
LL | #![warn(missing_copy_implementations, reason)]
|
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
|
| ^ reason must be a string literal
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(anonymous_parameters, reason = b"consider these, for we have condemned them")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reason must be a string literal
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(bare_trait_objects, reasons = "leaders to no sure land, guides their bearings lost")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(box_pointers, blerp = "or in league with robbers have reversed the signposts")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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"))]
|
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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"))]
|
LL | #![warn(elided_lifetimes_in_paths, reason("disrespectful to ancestors", "irresponsible to heirs"))]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ bad attribute argument
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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")]
|
LL | #![warn(ellipsis_inclusive_range_patterns, reason = "born barren", reason = "a freak growth")]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
| ^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
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)]
|
LL | #![warn(keyword_idents, reason = "root in rubble", macro_use_extern_crate)]
|
||||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^ reason in lint attribute must come last
|
||||||
|
|
||||||
error[E0452]: malformed lint attribute input
|
error: aborting due to 20 previous errors; 1 warning emitted
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0452`.
|
For more information about this error, try `rustc --explain E0452`.
|
||||||
|
|
|
@ -7,5 +7,3 @@
|
||||||
//~| HELP add `#![register_tool(abc)]`
|
//~| HELP add `#![register_tool(abc)]`
|
||||||
//~| ERROR unknown tool name `abc`
|
//~| ERROR unknown tool name `abc`
|
||||||
//~| HELP add `#![register_tool(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
|
= help: add `#![register_tool(abc)]` to the crate root
|
||||||
|
|
||||||
error[E0710]: unknown tool name `abc` found in scoped lint: `abc::my_lint`
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0710`.
|
For more information about this error, try `rustc --explain E0710`.
|
||||||
|
|
|
@ -1,420 +1,3 @@
|
||||||
{
|
{"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
|
||||||
"message": "cannot find type `Iter` in this scope",
|
|
||||||
"code": {
|
|
||||||
"code": "E0412",
|
|
||||||
"explanation": "A used type name is not in scope.
|
|
||||||
|
|
||||||
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)]
|
#[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`
|
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
||||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -14,14 +14,6 @@ LL | #[warn(foo::bar)]
|
||||||
|
|
|
|
||||||
= help: add `#![register_tool(foo)]` to the crate root
|
= help: add `#![register_tool(foo)]` to the crate root
|
||||||
|
|
||||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
error: aborting due to 2 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0710`.
|
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`
|
#![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`
|
||||||
//~| 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`
|
#[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`
|
||||||
//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar`
|
|
||||||
fn main() {}
|
fn main() {}
|
||||||
|
|
|
@ -7,7 +7,7 @@ LL | #![deny(foo::bar)]
|
||||||
= help: add `#![register_tool(foo)]` to the crate root
|
= help: add `#![register_tool(foo)]` to the crate root
|
||||||
|
|
||||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
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)]
|
LL | #[allow(foo::bar)]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
@ -23,29 +23,13 @@ LL | #![deny(foo::bar)]
|
||||||
= help: add `#![register_tool(foo)]` to the crate root
|
= help: add `#![register_tool(foo)]` to the crate root
|
||||||
|
|
||||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
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)]
|
LL | #[allow(foo::bar)]
|
||||||
| ^^^
|
| ^^^
|
||||||
|
|
|
|
||||||
= help: add `#![register_tool(foo)]` to the crate root
|
= help: add `#![register_tool(foo)]` to the crate root
|
||||||
|
|
||||||
error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar`
|
error: aborting due to 4 previous errors
|
||||||
--> $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
|
|
||||||
|
|
||||||
For more information about this error, try `rustc --explain E0710`.
|
For more information about this error, try `rustc --explain E0710`.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// --extern-location with bad location type
|
// --extern-location with bad location type
|
||||||
|
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// --extern-location with a raw reference
|
// --extern-location with a raw reference
|
||||||
|
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// check-pass
|
// check-pass
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
//~^ WARNING external crate `bar` unused in
|
//~^ 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
|
--> $DIR/extern-loc-json-json.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #![warn(unused_crate_dependencies)]
|
LL | #![warn(unused_crate_dependencies)]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// check-pass
|
// check-pass
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
//~^ WARNING external crate `bar` unused in
|
//~^ WARNING external crate `bar` unused in
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// --extern-location with no type
|
// --extern-location with no type
|
||||||
|
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// check-pass
|
// check-pass
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
//~^ WARNING external crate `bar` unused in
|
//~^ 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
|
--> $DIR/extern-loc-raw-json.rs:7:1
|
||||||
|
|
|
|
||||||
LL | #![warn(unused_crate_dependencies)]
|
LL | #![warn(unused_crate_dependencies)]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// --extern-location with a raw reference
|
// --extern-location with a raw reference
|
||||||
|
|
||||||
// aux-crate:bar=bar.rs
|
// aux-crate:bar=bar.rs
|
||||||
// compile-flags:--extern-location bar=raw
|
// compile-flags:--extern-location bar=raw -Z unstable-options
|
||||||
|
|
||||||
#![warn(unused_crate_dependencies)]
|
#![warn(unused_crate_dependencies)]
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
// check-pass
|
// check-pass
|
||||||
// aux-crate:bar=bar.rs
|
// 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)]
|
#![warn(unused_crate_dependencies)]
|
||||||
//~^ WARNING external crate `bar` unused in
|
//~^ WARNING external crate `bar` unused in
|
||||||
|
|
|
@ -438,6 +438,9 @@ impl TestProps {
|
||||||
|
|
||||||
if let Some(edition) = config.parse_edition(ln) {
|
if let Some(edition) = config.parse_edition(ln) {
|
||||||
self.compile_flags.push(format!("--edition={}", edition));
|
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);
|
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);
|
get_lib_name(&aux_path.trim_end_matches(".rs").replace('-', "_"), is_dylib);
|
||||||
rustc.arg("--extern").arg(format!("{}={}/{}", aux_name, aux_dir.display(), lib_name));
|
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
|
aux_dir
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue