From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/rust-2018/async-ident-allowed.rs | 11 - src/test/ui/rust-2018/async-ident-allowed.stderr | 17 - src/test/ui/rust-2018/async-ident.fixed | 79 -- src/test/ui/rust-2018/async-ident.rs | 79 -- src/test/ui/rust-2018/async-ident.stderr | 142 ---- src/test/ui/rust-2018/auxiliary/baz.rs | 5 - .../auxiliary/edition-lint-infer-outlives-macro.rs | 6 - .../ui/rust-2018/auxiliary/edition-lint-paths.rs | 12 - .../auxiliary/macro-use-warned-against.rs | 2 - .../auxiliary/macro-use-warned-against2.rs | 1 - .../ui/rust-2018/auxiliary/remove-extern-crate.rs | 9 - .../auxiliary/suggestions-not-always-applicable.rs | 13 - .../auxiliary/trait-import-suggestions.rs | 5 - src/test/ui/rust-2018/dyn-keyword.fixed | 10 - src/test/ui/rust-2018/dyn-keyword.rs | 10 - src/test/ui/rust-2018/dyn-keyword.stderr | 16 - src/test/ui/rust-2018/dyn-trait-compatibility.rs | 8 - .../ui/rust-2018/dyn-trait-compatibility.stderr | 19 - .../edition-lint-fully-qualified-paths.fixed | 26 - .../edition-lint-fully-qualified-paths.rs | 26 - .../edition-lint-fully-qualified-paths.stderr | 25 - .../rust-2018/edition-lint-infer-outlives-macro.rs | 28 - .../edition-lint-infer-outlives-macro.stderr | 14 - .../edition-lint-infer-outlives-multispan.rs | 368 --------- .../edition-lint-infer-outlives-multispan.stderr | 823 ------------------ .../ui/rust-2018/edition-lint-infer-outlives.fixed | 795 ------------------ .../ui/rust-2018/edition-lint-infer-outlives.rs | 795 ------------------ .../rust-2018/edition-lint-infer-outlives.stderr | 920 --------------------- .../edition-lint-nested-empty-paths.fixed | 34 - .../rust-2018/edition-lint-nested-empty-paths.rs | 34 - .../edition-lint-nested-empty-paths.stderr | 52 -- .../ui/rust-2018/edition-lint-nested-paths.fixed | 31 - src/test/ui/rust-2018/edition-lint-nested-paths.rs | 31 - .../ui/rust-2018/edition-lint-nested-paths.stderr | 43 - src/test/ui/rust-2018/edition-lint-paths-2018.rs | 10 - src/test/ui/rust-2018/edition-lint-paths.fixed | 77 -- src/test/ui/rust-2018/edition-lint-paths.rs | 77 -- src/test/ui/rust-2018/edition-lint-paths.stderr | 88 -- .../rust-2018/edition-lint-uninferable-outlives.rs | 30 - .../rust-2018/extern-crate-idiomatic-in-2018.fixed | 28 - .../ui/rust-2018/extern-crate-idiomatic-in-2018.rs | 28 - .../extern-crate-idiomatic-in-2018.stderr | 15 - src/test/ui/rust-2018/extern-crate-idiomatic.fixed | 18 - src/test/ui/rust-2018/extern-crate-idiomatic.rs | 18 - .../extern-crate-referenced-by-self-path.fixed | 17 - .../extern-crate-referenced-by-self-path.rs | 17 - src/test/ui/rust-2018/extern-crate-rename.fixed | 18 - src/test/ui/rust-2018/extern-crate-rename.rs | 18 - src/test/ui/rust-2018/extern-crate-rename.stderr | 16 - src/test/ui/rust-2018/extern-crate-submod.fixed | 25 - src/test/ui/rust-2018/extern-crate-submod.rs | 25 - src/test/ui/rust-2018/extern-crate-submod.stderr | 16 - src/test/ui/rust-2018/future-proofing-locals.rs | 50 -- .../ui/rust-2018/future-proofing-locals.stderr | 56 -- src/test/ui/rust-2018/issue-51008-1.rs | 15 - src/test/ui/rust-2018/issue-51008.rs | 15 - .../ui/rust-2018/issue-52202-use-suggestions.rs | 13 - .../rust-2018/issue-52202-use-suggestions.stderr | 21 - src/test/ui/rust-2018/issue-54006.rs | 13 - src/test/ui/rust-2018/issue-54006.stderr | 17 - ...issue-54400-unused-extern-crate-attr-span.fixed | 14 - .../issue-54400-unused-extern-crate-attr-span.rs | 15 - ...ssue-54400-unused-extern-crate-attr-span.stderr | 18 - .../ui/rust-2018/local-path-suggestions-2015.rs | 26 - .../rust-2018/local-path-suggestions-2015.stderr | 12 - .../ui/rust-2018/local-path-suggestions-2018.rs | 21 - .../rust-2018/local-path-suggestions-2018.stderr | 17 - src/test/ui/rust-2018/macro-use-warned-against.rs | 14 - .../ui/rust-2018/macro-use-warned-against.stderr | 27 - src/test/ui/rust-2018/proc-macro-crate-in-paths.rs | 16 - src/test/ui/rust-2018/remove-extern-crate.fixed | 39 - src/test/ui/rust-2018/remove-extern-crate.rs | 39 - src/test/ui/rust-2018/remove-extern-crate.stderr | 21 - .../suggestions-not-always-applicable.fixed | 23 - .../rust-2018/suggestions-not-always-applicable.rs | 23 - src/test/ui/rust-2018/trait-import-suggestions.rs | 31 - .../ui/rust-2018/trait-import-suggestions.stderr | 55 -- src/test/ui/rust-2018/try-ident.fixed | 15 - src/test/ui/rust-2018/try-ident.rs | 15 - src/test/ui/rust-2018/try-ident.stderr | 26 - src/test/ui/rust-2018/try-macro.fixed | 18 - src/test/ui/rust-2018/try-macro.rs | 18 - src/test/ui/rust-2018/try-macro.stderr | 17 - .../uniform-paths/ambiguity-macros-nested.rs | 21 - .../uniform-paths/ambiguity-macros-nested.stderr | 25 - .../ui/rust-2018/uniform-paths/ambiguity-macros.rs | 19 - .../uniform-paths/ambiguity-macros.stderr | 25 - .../ui/rust-2018/uniform-paths/ambiguity-nested.rs | 16 - .../uniform-paths/ambiguity-nested.stderr | 21 - src/test/ui/rust-2018/uniform-paths/ambiguity.rs | 12 - .../ui/rust-2018/uniform-paths/ambiguity.stderr | 21 - .../uniform-paths/auxiliary/cross-crate.rs | 5 - .../auxiliary/issue-55779-extern-trait.rs | 1 - .../uniform-paths/auxiliary/issue-56596-2.rs | 1 - .../uniform-paths/auxiliary/issue-56596.rs | 1 - .../uniform-paths/auxiliary/issue-87932-a.rs | 3 - .../uniform-paths/block-scoped-shadow-nested.rs | 20 - .../block-scoped-shadow-nested.stderr | 24 - .../rust-2018/uniform-paths/block-scoped-shadow.rs | 21 - .../uniform-paths/block-scoped-shadow.stderr | 60 -- src/test/ui/rust-2018/uniform-paths/cross-crate.rs | 12 - .../ui/rust-2018/uniform-paths/cross-crate.stderr | 38 - src/test/ui/rust-2018/uniform-paths/deadlock.rs | 8 - .../ui/rust-2018/uniform-paths/deadlock.stderr | 24 - .../ui/rust-2018/uniform-paths/fn-local-enum.rs | 13 - .../ui/rust-2018/uniform-paths/from-decl-macro.rs | 12 - src/test/ui/rust-2018/uniform-paths/issue-54253.rs | 17 - .../ui/rust-2018/uniform-paths/issue-54253.stderr | 9 - src/test/ui/rust-2018/uniform-paths/issue-55779.rs | 29 - .../ui/rust-2018/uniform-paths/issue-56596-2.rs | 11 - src/test/ui/rust-2018/uniform-paths/issue-56596.rs | 12 - .../ui/rust-2018/uniform-paths/issue-56596.stderr | 19 - src/test/ui/rust-2018/uniform-paths/issue-87932.rs | 15 - .../ui/rust-2018/uniform-paths/issue-87932.stderr | 18 - src/test/ui/rust-2018/uniform-paths/macro-rules.rs | 43 - .../ui/rust-2018/uniform-paths/macro-rules.stderr | 35 - .../ui/rust-2018/uniform-paths/prelude-fail-2.rs | 21 - .../rust-2018/uniform-paths/prelude-fail-2.stderr | 68 -- .../ui/rust-2018/uniform-paths/prelude-fail.rs | 6 - .../ui/rust-2018/uniform-paths/prelude-fail.stderr | 9 - src/test/ui/rust-2018/uniform-paths/prelude.rs | 22 - src/test/ui/rust-2018/uniform-paths/redundant.rs | 20 - .../ui/rust-2018/unresolved-asterisk-imports.rs | 6 - .../rust-2018/unresolved-asterisk-imports.stderr | 9 - 124 files changed, 6522 deletions(-) delete mode 100644 src/test/ui/rust-2018/async-ident-allowed.rs delete mode 100644 src/test/ui/rust-2018/async-ident-allowed.stderr delete mode 100644 src/test/ui/rust-2018/async-ident.fixed delete mode 100644 src/test/ui/rust-2018/async-ident.rs delete mode 100644 src/test/ui/rust-2018/async-ident.stderr delete mode 100644 src/test/ui/rust-2018/auxiliary/baz.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/edition-lint-infer-outlives-macro.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/edition-lint-paths.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/macro-use-warned-against.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/macro-use-warned-against2.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/remove-extern-crate.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs delete mode 100644 src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs delete mode 100644 src/test/ui/rust-2018/dyn-keyword.fixed delete mode 100644 src/test/ui/rust-2018/dyn-keyword.rs delete mode 100644 src/test/ui/rust-2018/dyn-keyword.stderr delete mode 100644 src/test/ui/rust-2018/dyn-trait-compatibility.rs delete mode 100644 src/test/ui/rust-2018/dyn-trait-compatibility.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed delete mode 100644 src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives-macro.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives-macro.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives.fixed delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-infer-outlives.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed delete mode 100644 src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-nested-paths.fixed delete mode 100644 src/test/ui/rust-2018/edition-lint-nested-paths.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-nested-paths.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-paths-2018.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-paths.fixed delete mode 100644 src/test/ui/rust-2018/edition-lint-paths.rs delete mode 100644 src/test/ui/rust-2018/edition-lint-paths.stderr delete mode 100644 src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs delete mode 100644 src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed delete mode 100644 src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs delete mode 100644 src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr delete mode 100644 src/test/ui/rust-2018/extern-crate-idiomatic.fixed delete mode 100644 src/test/ui/rust-2018/extern-crate-idiomatic.rs delete mode 100644 src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed delete mode 100644 src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs delete mode 100644 src/test/ui/rust-2018/extern-crate-rename.fixed delete mode 100644 src/test/ui/rust-2018/extern-crate-rename.rs delete mode 100644 src/test/ui/rust-2018/extern-crate-rename.stderr delete mode 100644 src/test/ui/rust-2018/extern-crate-submod.fixed delete mode 100644 src/test/ui/rust-2018/extern-crate-submod.rs delete mode 100644 src/test/ui/rust-2018/extern-crate-submod.stderr delete mode 100644 src/test/ui/rust-2018/future-proofing-locals.rs delete mode 100644 src/test/ui/rust-2018/future-proofing-locals.stderr delete mode 100644 src/test/ui/rust-2018/issue-51008-1.rs delete mode 100644 src/test/ui/rust-2018/issue-51008.rs delete mode 100644 src/test/ui/rust-2018/issue-52202-use-suggestions.rs delete mode 100644 src/test/ui/rust-2018/issue-52202-use-suggestions.stderr delete mode 100644 src/test/ui/rust-2018/issue-54006.rs delete mode 100644 src/test/ui/rust-2018/issue-54006.stderr delete mode 100644 src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed delete mode 100644 src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs delete mode 100644 src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr delete mode 100644 src/test/ui/rust-2018/local-path-suggestions-2015.rs delete mode 100644 src/test/ui/rust-2018/local-path-suggestions-2015.stderr delete mode 100644 src/test/ui/rust-2018/local-path-suggestions-2018.rs delete mode 100644 src/test/ui/rust-2018/local-path-suggestions-2018.stderr delete mode 100644 src/test/ui/rust-2018/macro-use-warned-against.rs delete mode 100644 src/test/ui/rust-2018/macro-use-warned-against.stderr delete mode 100644 src/test/ui/rust-2018/proc-macro-crate-in-paths.rs delete mode 100644 src/test/ui/rust-2018/remove-extern-crate.fixed delete mode 100644 src/test/ui/rust-2018/remove-extern-crate.rs delete mode 100644 src/test/ui/rust-2018/remove-extern-crate.stderr delete mode 100644 src/test/ui/rust-2018/suggestions-not-always-applicable.fixed delete mode 100644 src/test/ui/rust-2018/suggestions-not-always-applicable.rs delete mode 100644 src/test/ui/rust-2018/trait-import-suggestions.rs delete mode 100644 src/test/ui/rust-2018/trait-import-suggestions.stderr delete mode 100644 src/test/ui/rust-2018/try-ident.fixed delete mode 100644 src/test/ui/rust-2018/try-ident.rs delete mode 100644 src/test/ui/rust-2018/try-ident.stderr delete mode 100644 src/test/ui/rust-2018/try-macro.fixed delete mode 100644 src/test/ui/rust-2018/try-macro.rs delete mode 100644 src/test/ui/rust-2018/try-macro.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity-macros.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity-nested.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/ambiguity.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/auxiliary/issue-55779-extern-trait.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596-2.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/auxiliary/issue-87932-a.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/cross-crate.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/cross-crate.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/deadlock.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/deadlock.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-54253.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-54253.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-55779.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-56596.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-56596.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-87932.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/issue-87932.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/macro-rules.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/macro-rules.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/prelude-fail.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr delete mode 100644 src/test/ui/rust-2018/uniform-paths/prelude.rs delete mode 100644 src/test/ui/rust-2018/uniform-paths/redundant.rs delete mode 100644 src/test/ui/rust-2018/unresolved-asterisk-imports.rs delete mode 100644 src/test/ui/rust-2018/unresolved-asterisk-imports.stderr (limited to 'src/test/ui/rust-2018') diff --git a/src/test/ui/rust-2018/async-ident-allowed.rs b/src/test/ui/rust-2018/async-ident-allowed.rs deleted file mode 100644 index 8efcfbb70..000000000 --- a/src/test/ui/rust-2018/async-ident-allowed.rs +++ /dev/null @@ -1,11 +0,0 @@ -// edition:2015 - -#![deny(rust_2018_compatibility)] - -// Don't make a suggestion for a raw identifier replacement unless raw -// identifiers are enabled. - -fn main() { - let async = 3; //~ ERROR: is a keyword - //~^ WARN this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/async-ident-allowed.stderr b/src/test/ui/rust-2018/async-ident-allowed.stderr deleted file mode 100644 index 992b29750..000000000 --- a/src/test/ui/rust-2018/async-ident-allowed.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident-allowed.rs:9:9 - | -LL | let async = 3; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 -note: the lint level is defined here - --> $DIR/async-ident-allowed.rs:3:9 - | -LL | #![deny(rust_2018_compatibility)] - | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[deny(keyword_idents)]` implied by `#[deny(rust_2018_compatibility)]` - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/async-ident.fixed b/src/test/ui/rust-2018/async-ident.fixed deleted file mode 100644 index e909c7907..000000000 --- a/src/test/ui/rust-2018/async-ident.fixed +++ /dev/null @@ -1,79 +0,0 @@ -#![allow(dead_code, unused_variables, unused_macro_rules, bad_style)] -#![deny(keyword_idents)] - -// edition:2015 -// run-rustfix - -fn r#async() {} //~ ERROR async -//~^ WARN this is accepted in the current edition - -macro_rules! foo { - ($foo:ident) => {}; - ($r#async:expr, r#async) => {}; - //~^ ERROR async - //~| ERROR async - //~| WARN this is accepted in the current edition - //~| WARN this is accepted in the current edition -} - -foo!(r#async); - //~^ ERROR async - //~| WARN this is accepted in the current edition - -mod dont_lint_raw { - fn r#async() {} -} - -mod async_trait { - trait r#async {} - //~^ ERROR async - //~| WARN this is accepted in the current edition - struct MyStruct; - impl r#async for MyStruct {} - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -mod async_static { - static r#async: u32 = 0; - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -mod async_const { - const r#async: u32 = 0; - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -struct Foo; -impl Foo { fn r#async() {} } - //~^ ERROR async - //~| WARN this is accepted in the current edition - -fn main() { - struct r#async {} - //~^ ERROR async - //~| WARN this is accepted in the current edition - let r#async: r#async = r#async {}; - //~^ ERROR async - //~| WARN this is accepted in the current edition - //~| ERROR async - //~| WARN this is accepted in the current edition - //~| ERROR async - //~| WARN this is accepted in the current edition -} - -#[macro_export] -macro_rules! produces_async { - () => (pub fn r#async() {}) - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -#[macro_export] -macro_rules! consumes_async { - (r#async) => (1) - //~^ ERROR async - //~| WARN this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/async-ident.rs b/src/test/ui/rust-2018/async-ident.rs deleted file mode 100644 index 2bfbc3871..000000000 --- a/src/test/ui/rust-2018/async-ident.rs +++ /dev/null @@ -1,79 +0,0 @@ -#![allow(dead_code, unused_variables, unused_macro_rules, bad_style)] -#![deny(keyword_idents)] - -// edition:2015 -// run-rustfix - -fn async() {} //~ ERROR async -//~^ WARN this is accepted in the current edition - -macro_rules! foo { - ($foo:ident) => {}; - ($async:expr, async) => {}; - //~^ ERROR async - //~| ERROR async - //~| WARN this is accepted in the current edition - //~| WARN this is accepted in the current edition -} - -foo!(async); - //~^ ERROR async - //~| WARN this is accepted in the current edition - -mod dont_lint_raw { - fn r#async() {} -} - -mod async_trait { - trait async {} - //~^ ERROR async - //~| WARN this is accepted in the current edition - struct MyStruct; - impl async for MyStruct {} - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -mod async_static { - static async: u32 = 0; - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -mod async_const { - const async: u32 = 0; - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -struct Foo; -impl Foo { fn async() {} } - //~^ ERROR async - //~| WARN this is accepted in the current edition - -fn main() { - struct async {} - //~^ ERROR async - //~| WARN this is accepted in the current edition - let async: async = async {}; - //~^ ERROR async - //~| WARN this is accepted in the current edition - //~| ERROR async - //~| WARN this is accepted in the current edition - //~| ERROR async - //~| WARN this is accepted in the current edition -} - -#[macro_export] -macro_rules! produces_async { - () => (pub fn async() {}) - //~^ ERROR async - //~| WARN this is accepted in the current edition -} - -#[macro_export] -macro_rules! consumes_async { - (async) => (1) - //~^ ERROR async - //~| WARN this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/async-ident.stderr b/src/test/ui/rust-2018/async-ident.stderr deleted file mode 100644 index d15250c54..000000000 --- a/src/test/ui/rust-2018/async-ident.stderr +++ /dev/null @@ -1,142 +0,0 @@ -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:7:4 - | -LL | fn async() {} - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 -note: the lint level is defined here - --> $DIR/async-ident.rs:2:9 - | -LL | #![deny(keyword_idents)] - | ^^^^^^^^^^^^^^ - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:12:7 - | -LL | ($async:expr, async) => {}; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:12:19 - | -LL | ($async:expr, async) => {}; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:19:6 - | -LL | foo!(async); - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:28:11 - | -LL | trait async {} - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:32:10 - | -LL | impl async for MyStruct {} - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:38:12 - | -LL | static async: u32 = 0; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:44:11 - | -LL | const async: u32 = 0; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:50:15 - | -LL | impl Foo { fn async() {} } - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:55:12 - | -LL | struct async {} - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:58:9 - | -LL | let async: async = async {}; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:58:16 - | -LL | let async: async = async {}; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:58:24 - | -LL | let async: async = async {}; - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:69:19 - | -LL | () => (pub fn async() {}) - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: `async` is a keyword in the 2018 edition - --> $DIR/async-ident.rs:76:6 - | -LL | (async) => (1) - | ^^^^^ help: you can use a raw identifier to stay compatible: `r#async` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -error: aborting due to 15 previous errors - diff --git a/src/test/ui/rust-2018/auxiliary/baz.rs b/src/test/ui/rust-2018/auxiliary/baz.rs deleted file mode 100644 index b317c8a45..000000000 --- a/src/test/ui/rust-2018/auxiliary/baz.rs +++ /dev/null @@ -1,5 +0,0 @@ -// This file is used as part of the local-path-suggestions.rs test. - -pub mod foobar { - pub struct Baz; -} diff --git a/src/test/ui/rust-2018/auxiliary/edition-lint-infer-outlives-macro.rs b/src/test/ui/rust-2018/auxiliary/edition-lint-infer-outlives-macro.rs deleted file mode 100644 index d45fa10f0..000000000 --- a/src/test/ui/rust-2018/auxiliary/edition-lint-infer-outlives-macro.rs +++ /dev/null @@ -1,6 +0,0 @@ -pub fn foo() {} - -#[macro_export] -macro_rules! gimme_a { - ($($mac:tt)*) => { $($mac)* { 'a } } -} diff --git a/src/test/ui/rust-2018/auxiliary/edition-lint-paths.rs b/src/test/ui/rust-2018/auxiliary/edition-lint-paths.rs deleted file mode 100644 index dd22df89e..000000000 --- a/src/test/ui/rust-2018/auxiliary/edition-lint-paths.rs +++ /dev/null @@ -1,12 +0,0 @@ -pub fn foo() {} - -#[macro_export] -macro_rules! macro_2015 { - () => { - use edition_lint_paths as other_name; - use edition_lint_paths::foo as other_foo; - fn check_macro_2015() { - ::edition_lint_paths::foo(); - } - } -} diff --git a/src/test/ui/rust-2018/auxiliary/macro-use-warned-against.rs b/src/test/ui/rust-2018/auxiliary/macro-use-warned-against.rs deleted file mode 100644 index b497c74e6..000000000 --- a/src/test/ui/rust-2018/auxiliary/macro-use-warned-against.rs +++ /dev/null @@ -1,2 +0,0 @@ -#[macro_export] -macro_rules! foo { () => () } diff --git a/src/test/ui/rust-2018/auxiliary/macro-use-warned-against2.rs b/src/test/ui/rust-2018/auxiliary/macro-use-warned-against2.rs deleted file mode 100644 index d11c69f81..000000000 --- a/src/test/ui/rust-2018/auxiliary/macro-use-warned-against2.rs +++ /dev/null @@ -1 +0,0 @@ -// intentionally empty diff --git a/src/test/ui/rust-2018/auxiliary/remove-extern-crate.rs b/src/test/ui/rust-2018/auxiliary/remove-extern-crate.rs deleted file mode 100644 index 890af683a..000000000 --- a/src/test/ui/rust-2018/auxiliary/remove-extern-crate.rs +++ /dev/null @@ -1,9 +0,0 @@ -#[macro_export] -macro_rules! foo { - () => () -} - -#[macro_export] -macro_rules! bar { - () => () -} diff --git a/src/test/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs b/src/test/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs deleted file mode 100644 index 7472443dc..000000000 --- a/src/test/ui/rust-2018/auxiliary/suggestions-not-always-applicable.rs +++ /dev/null @@ -1,13 +0,0 @@ -// force-host -// no-prefer-dynamic - -#![crate_type = "proc-macro"] - -extern crate proc_macro; - -use proc_macro::*; - -#[proc_macro_attribute] -pub fn foo(_attr: TokenStream, _f: TokenStream) -> TokenStream { - "pub fn foo() -> ::Foo { ::Foo }".parse().unwrap() -} diff --git a/src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs b/src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs deleted file mode 100644 index d356f3294..000000000 --- a/src/test/ui/rust-2018/auxiliary/trait-import-suggestions.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub trait Baz { - fn baz(&self) { } -} - -impl Baz for u32 { } diff --git a/src/test/ui/rust-2018/dyn-keyword.fixed b/src/test/ui/rust-2018/dyn-keyword.fixed deleted file mode 100644 index 044824cbb..000000000 --- a/src/test/ui/rust-2018/dyn-keyword.fixed +++ /dev/null @@ -1,10 +0,0 @@ -// edition:2015 -// run-rustfix - -#![allow(unused_variables)] -#![deny(keyword_idents)] - -fn main() { - let r#dyn = (); //~ ERROR dyn - //~^ WARN this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/dyn-keyword.rs b/src/test/ui/rust-2018/dyn-keyword.rs deleted file mode 100644 index 5989cfa1c..000000000 --- a/src/test/ui/rust-2018/dyn-keyword.rs +++ /dev/null @@ -1,10 +0,0 @@ -// edition:2015 -// run-rustfix - -#![allow(unused_variables)] -#![deny(keyword_idents)] - -fn main() { - let dyn = (); //~ ERROR dyn - //~^ WARN this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/dyn-keyword.stderr b/src/test/ui/rust-2018/dyn-keyword.stderr deleted file mode 100644 index b6f5b10cf..000000000 --- a/src/test/ui/rust-2018/dyn-keyword.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: `dyn` is a keyword in the 2018 edition - --> $DIR/dyn-keyword.rs:8:9 - | -LL | let dyn = (); - | ^^^ help: you can use a raw identifier to stay compatible: `r#dyn` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 -note: the lint level is defined here - --> $DIR/dyn-keyword.rs:5:9 - | -LL | #![deny(keyword_idents)] - | ^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/dyn-trait-compatibility.rs b/src/test/ui/rust-2018/dyn-trait-compatibility.rs deleted file mode 100644 index 377c85fef..000000000 --- a/src/test/ui/rust-2018/dyn-trait-compatibility.rs +++ /dev/null @@ -1,8 +0,0 @@ -// edition:2018 - -type A0 = dyn; -type A1 = dyn::dyn; //~ERROR expected identifier, found keyword `dyn` -type A2 = dyn; //~ERROR expected identifier, found `<` -type A3 = dyn<::dyn>; - -fn main() {} diff --git a/src/test/ui/rust-2018/dyn-trait-compatibility.stderr b/src/test/ui/rust-2018/dyn-trait-compatibility.stderr deleted file mode 100644 index cf4d6c19c..000000000 --- a/src/test/ui/rust-2018/dyn-trait-compatibility.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error: expected identifier, found keyword `dyn` - --> $DIR/dyn-trait-compatibility.rs:4:16 - | -LL | type A1 = dyn::dyn; - | ^^^ expected identifier, found keyword - | -help: escape `dyn` to use it as an identifier - | -LL | type A1 = dyn::r#dyn; - | ++ - -error: expected identifier, found `<` - --> $DIR/dyn-trait-compatibility.rs:5:14 - | -LL | type A2 = dyn; - | ^ expected identifier - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed deleted file mode 100644 index 85d106bc1..000000000 --- a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.fixed +++ /dev/null @@ -1,26 +0,0 @@ -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -mod foo { - pub(crate) trait Foo { - type Bar; - } - - pub(crate) struct Baz {} - - impl Foo for Baz { - type Bar = (); - } -} - -fn main() { - let _: ::Bar = (); - //~^ ERROR absolute paths must start with - //~| this is accepted in the current edition - - let _: ::Bar = (); - //~^ ERROR absolute paths must start with - //~| this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs deleted file mode 100644 index 9ff3c2e5f..000000000 --- a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.rs +++ /dev/null @@ -1,26 +0,0 @@ -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -mod foo { - pub(crate) trait Foo { - type Bar; - } - - pub(crate) struct Baz {} - - impl Foo for Baz { - type Bar = (); - } -} - -fn main() { - let _: ::Bar = (); - //~^ ERROR absolute paths must start with - //~| this is accepted in the current edition - - let _: <::foo::Baz as foo::Foo>::Bar = (); - //~^ ERROR absolute paths must start with - //~| this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr b/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr deleted file mode 100644 index e1709db09..000000000 --- a/src/test/ui/rust-2018/edition-lint-fully-qualified-paths.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-fully-qualified-paths.rs:19:25 - | -LL | let _: ::Bar = (); - | ^^^^^^^^^^ help: use `crate`: `crate::foo::Foo` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 -note: the lint level is defined here - --> $DIR/edition-lint-fully-qualified-paths.rs:4:9 - | -LL | #![deny(absolute_paths_not_starting_with_crate)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-fully-qualified-paths.rs:23:13 - | -LL | let _: <::foo::Baz as foo::Foo>::Bar = (); - | ^^^^^^^^^^ help: use `crate`: `crate::foo::Baz` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives-macro.rs b/src/test/ui/rust-2018/edition-lint-infer-outlives-macro.rs deleted file mode 100644 index d7a832831..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives-macro.rs +++ /dev/null @@ -1,28 +0,0 @@ -// edition:2018 -// aux-build:edition-lint-infer-outlives-macro.rs - -// Test that the lint does not fire if the where predicate -// is from the local crate, but all the bounds are from an -// external macro. - -#![deny(explicit_outlives_requirements)] - -#[macro_use] -extern crate edition_lint_infer_outlives_macro; - -macro_rules! make_foo { - ($a:tt) => { - struct Foo<$a, 'b> where 'b: $a { - foo: &$a &'b (), - } - } -} - -gimme_a! {make_foo!} - -struct Bar<'a, 'b: 'a> { - //~^ ERROR: outlives requirements can be inferred - bar: &'a &'b (), -} - -fn main() {} diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives-macro.stderr b/src/test/ui/rust-2018/edition-lint-infer-outlives-macro.stderr deleted file mode 100644 index 553b1cd97..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives-macro.stderr +++ /dev/null @@ -1,14 +0,0 @@ -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-macro.rs:23:18 - | -LL | struct Bar<'a, 'b: 'a> { - | ^^^^ help: remove this bound - | -note: the lint level is defined here - --> $DIR/edition-lint-infer-outlives-macro.rs:8:9 - | -LL | #![deny(explicit_outlives_requirements)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.rs b/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.rs deleted file mode 100644 index 0b3de0df2..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.rs +++ /dev/null @@ -1,368 +0,0 @@ -#![allow(unused)] -#![deny(explicit_outlives_requirements)] - - -// These examples should live in edition-lint-infer-outlives.rs, but are split -// into this separate file because they can't be `rustfix`'d (and thus, can't -// be part of a `run-rustfix` test file) until rust-lang-nursery/rustfix#141 -// is solved - -mod structs { - use std::fmt::Debug; - - struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> - where U: 'a + Debug + 'b, 'b: 'a - //~^ ERROR outlives requirements can be inferred - { - tee: T, - yoo: &'a &'b U - } -} - -mod tuple_structs { - use std::fmt::Debug; - - struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereAyTeeYooWhereAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) - where U: 'a + Debug + 'b, 'b: 'a; - //~^ ERROR outlives requirements can be inferred -} - -mod enums { - use std::fmt::Debug; - - enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, }, - W(&'a &'b U), - } - - enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T, yoo: &'b U }, - W, - } - - enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - V(&'a T, &'b U), - W, - } - - enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W(&'b U), - } - - enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a T, &'b U), - W, - } - - enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W(&'b U) - } - - enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T, yoo: &'b U }, - W, - } - - enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a T, &'b U), - W, - } - - enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W, - } - - enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a &'b U), - } - - enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - } -} - -mod unions { - use std::fmt::Debug; - - union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: &'b U - } - - union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } -} - -fn main() {} diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr b/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr deleted file mode 100644 index 251d74094..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr +++ /dev/null @@ -1,823 +0,0 @@ -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:13:47 - | -LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { - | ^^^^^ ^^^^^ - | -note: the lint level is defined here - --> $DIR/edition-lint-infer-outlives-multispan.rs:2:9 - | -LL | #![deny(explicit_outlives_requirements)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: remove these bounds - | -LL - struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { -LL + struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:18:61 - | -LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { -LL + struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:23:53 - | -LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { -LL + struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:29:48 - | -LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { -LL + struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:35:48 - | -LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { -LL + struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:41:46 - | -LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { - | ^^^^ ^^^^^^^^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { -LL + struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:47:67 - | -LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { -LL + struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:53:53 - | -LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { -LL + struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:59:53 - | -LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { -LL + struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:65:69 - | -LL | struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { -LL + struct TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:71:69 - | -LL | struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { -LL + struct TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:77:38 - | -LL | struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { - | ^^^^ ^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { -LL + struct BeeOutlivesAyTeeBee<'a, 'b, T> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:82:40 - | -LL | struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { - | ^^^^ ^^^^^^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { -LL + struct BeeOutlivesAyTeeAyBee<'a, 'b, T> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:87:55 - | -LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { -LL + struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:92:68 - | -LL | struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { - | ^^^^^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { -LL + struct BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:97:58 - | -LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { -LL + struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:104:18 - | -LL | where U: 'a + Debug + 'b, 'b: 'a - | ^^^^^ ^^^^^ ^^^^^^ - | -help: remove these bounds - | -LL - where U: 'a + Debug + 'b, 'b: 'a -LL + where U: Debug, - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:115:47 - | -LL | struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T); - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b>(&'a &'b T); -LL + struct TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:118:72 - | -LL | struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b; - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: 'a + Debug + 'b; -LL + struct TeeWhereOutlivesAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:121:53 - | -LL | struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U); - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b>(T, &'a &'b U); -LL + struct TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:124:48 - | -LL | struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U); - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug>(&'a T, &'b U); -LL + struct TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug>(&'a T, &'b U); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:127:48 - | -LL | struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U); - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b>(&'a T, &'b U); -LL + struct TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug>(&'a T, &'b U); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:130:46 - | -LL | struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b; - | ^^^^ ^^^^^^^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b; -LL + struct TeeOutlivesAyYooWhereBee<'a, 'b, T, U>(&'a T, &'b U) ; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:133:81 - | -LL | struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b; - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + Debug + 'b; -LL + struct TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:136:53 - | -LL | struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug; - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: 'b + Debug; -LL + struct TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:139:53 - | -LL | struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b; - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U>(&'a T, &'b U) where U: Debug + 'b; -LL + struct TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:142:75 - | -LL | struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug; - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: 'b + Debug; -LL + struct TeeWhereAyYooWhereBeeIsDebug<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:145:75 - | -LL | struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b; - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where T: 'a, U: Debug + 'b; -LL + struct TeeWhereAyYooWhereIsDebugBee<'a, 'b, T, U>(&'a T, &'b U) where U: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:148:38 - | -LL | struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T); - | ^^^^ ^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b>(&'a &'b T); -LL + struct BeeOutlivesAyTeeBee<'a, 'b, T>(&'a &'b T); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:151:40 - | -LL | struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T); - | ^^^^ ^^^^^^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b>(&'a &'b T); -LL + struct BeeOutlivesAyTeeAyBee<'a, 'b, T>(&'a &'b T); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:154:55 - | -LL | struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T); - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b>(&'a &'b T); -LL + struct BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug>(&'a &'b T); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:157:71 - | -LL | struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b; - | ^^^^^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + Debug + 'b; -LL + struct BeeWhereAyTeeWhereAyIsDebugBee<'a, 'b, T>(&'a &'b T) where T: Debug; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:160:58 - | -LL | struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U); - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b>(T, &'a &'b U); -LL + struct BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug>(T, &'a &'b U); - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:164:18 - | -LL | where U: 'a + Debug + 'b, 'b: 'a; - | ^^^^^ ^^^^^ ^^^^^^ - | -help: remove these bounds - | -LL - where U: 'a + Debug + 'b, 'b: 'a; -LL + where U: Debug, ; - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:171:45 - | -LL | enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { -LL + enum TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:176:59 - | -LL | enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { -LL + enum TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:181:51 - | -LL | enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { -LL + enum TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:187:46 - | -LL | enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { -LL + enum TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:193:46 - | -LL | enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { -LL + enum TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:199:44 - | -LL | enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { - | ^^^^ ^^^^^^^^^^^^ - | -help: remove these bounds - | -LL - enum TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { -LL + enum TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:205:65 - | -LL | enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { -LL + enum TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:211:51 - | -LL | enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { -LL + enum TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:217:51 - | -LL | enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { -LL + enum TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:223:67 - | -LL | enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { -LL + enum TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:229:67 - | -LL | enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { -LL + enum TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:235:36 - | -LL | enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { - | ^^^^ ^^^^ - | -help: remove these bounds - | -LL - enum BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { -LL + enum BeeOutlivesAyTeeBee<'a, 'b, T> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:240:38 - | -LL | enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { - | ^^^^ ^^^^^^^^^ - | -help: remove these bounds - | -LL - enum BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { -LL + enum BeeOutlivesAyTeeAyBee<'a, 'b, T> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:246:53 - | -LL | enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { -LL + enum BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:251:66 - | -LL | enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { - | ^^^^^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { -LL + enum BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:256:56 - | -LL | enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { -LL + enum BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:262:75 - | -LL | enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { - | ^^^^^ ^^^^^ ^^^^^^ - | -help: remove these bounds - | -LL - enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { -LL + enum BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:271:46 - | -LL | union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeOutlivesAyIsDebugBee<'a, 'b, T: 'a + Debug + 'b> { -LL + union TeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:276:60 - | -LL | union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: 'a + Debug + 'b { -LL + union TeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:281:52 - | -LL | union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: 'a + Debug + 'b> { -LL + union TeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:287:47 - | -LL | union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T: 'a, U: 'b + Debug> { -LL + union TeeOutlivesAyYooBeeIsDebug<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:293:47 - | -LL | union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeOutlivesAyYooIsDebugBee<'a, 'b, T: 'a, U: Debug + 'b> { -LL + union TeeOutlivesAyYooIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:299:45 - | -LL | union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { - | ^^^^ ^^^^^^^^^^^^ - | -help: remove these bounds - | -LL - union TeeOutlivesAyYooWhereBee<'a, 'b, T: 'a, U> where U: 'b { -LL + union TeeOutlivesAyYooWhereBee<'a, 'b, T, U> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:305:66 - | -LL | union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { - | ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b { -LL + union TeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:311:52 - | -LL | union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T: 'a, U> where U: 'b + Debug { -LL + union TeeOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:317:52 - | -LL | union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { - | ^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T: 'a, U> where U: Debug + 'b { -LL + union TeeOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:323:68 - | -LL | union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where T: 'a, U: 'b + Debug { -LL + union TeeWhereOutlivesAyYooWhereBeeIsDebug<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:329:68 - | -LL | union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { - | ^^^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where T: 'a, U: Debug + 'b { -LL + union TeeWhereOutlivesAyYooWhereIsDebugBee<'a, 'b, T, U> where U: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:335:37 - | -LL | union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { - | ^^^^ ^^^^ - | -help: remove these bounds - | -LL - union BeeOutlivesAyTeeBee<'a, 'b: 'a, T: 'b> { -LL + union BeeOutlivesAyTeeBee<'a, 'b, T> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:340:39 - | -LL | union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { - | ^^^^ ^^^^^^^^^ - | -help: remove these bounds - | -LL - union BeeOutlivesAyTeeAyBee<'a, 'b: 'a, T: 'a + 'b> { -LL + union BeeOutlivesAyTeeAyBee<'a, 'b, T> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:345:54 - | -LL | union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b: 'a, T: 'a + Debug + 'b> { -LL + union BeeOutlivesAyTeeOutlivesAyIsDebugBee<'a, 'b, T: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:350:67 - | -LL | union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { - | ^^^^^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where 'b: 'a, T: 'a + Debug + 'b { -LL + union BeeWhereAyTeeWhereOutlivesAyIsDebugBee<'a, 'b, T> where T: Debug { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:355:57 - | -LL | union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { - | ^^^^ ^^^^^ ^^^^^ - | -help: remove these bounds - | -LL - union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b: 'a, T, U: 'a + Debug + 'b> { -LL + union BeeOutlivesAyTeeYooOutlivesAyIsDebugBee<'a, 'b, T, U: Debug> { - | - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives-multispan.rs:361:76 - | -LL | union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { - | ^^^^^ ^^^^^ ^^^^^^ - | -help: remove these bounds - | -LL - union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: 'a + Debug + 'b, 'b: 'a { -LL + union BeeWhereAyTeeYooWhereOutlivesAyIsDebugBee<'a, 'b, T, U> where U: Debug, { - | - -error: aborting due to 68 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives.fixed b/src/test/ui/rust-2018/edition-lint-infer-outlives.fixed deleted file mode 100644 index 13645244d..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives.fixed +++ /dev/null @@ -1,795 +0,0 @@ -// run-rustfix - -#![allow(unused)] -#![deny(explicit_outlives_requirements)] - -// Programmatically generated examples! -// -// Exercise outlives bounds for each of the following parameter/position -// combinations— -// -// • one generic parameter (T) bound inline -// • one parameter (T) with a where clause -// • two parameters (T and U), both bound inline -// • two parameters (T and U), one bound inline, one with a where clause -// • two parameters (T and U), both with where clauses -// -// —and for every permutation of 1 or 2 lifetimes to outlive and 0 or 1 trait -// bounds distributed among said parameters (subject to no where clause being -// empty and the struct having at least one lifetime). -// -// —and for each of tuple structs, enums and unions. - -mod structs { - use std::fmt::Debug; - - struct TeeOutlivesAy<'a, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeOutlivesAyIsDebug<'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeIsDebugOutlivesAy<'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeOutlivesAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereOutlivesAy<'a, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeWhereOutlivesAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeYooOutlivesAy<'a, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooOutlivesAyIsDebug<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeOutlivesAyYooIsDebug<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: U - } - - struct TeeYooOutlivesAyBee<'a, 'b, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: U - } - - struct TeeYooWhereOutlivesAy<'a, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: U - } - - struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: U - } - - struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: U - } - - struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: U - } - - struct BeeOutlivesAy<'a, 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - struct BeeWhereOutlivesAy<'a, 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - struct BeeOutlivesAyTee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeOutlivesAyTeeDebug<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } -} - -mod tuple_structs { - use std::fmt::Debug; - - struct TeeOutlivesAy<'a, T>(&'a T); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyIsDebug<'a, T: Debug>(&'a T); - //~^ ERROR outlives requirements can be inferred - - struct TeeIsDebugOutlivesAy<'a, T: Debug>(&'a T); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBee<'a, 'b, T>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAy<'a, T>(&'a T) ; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyIsDebug<'a, T>(&'a T) where T: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereIsDebugOutlivesAy<'a, T>(&'a T) where T: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyBee<'a, 'b, T>(&'a &'b T) ; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T>(&'a &'b T) where T: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAy<'a, T, U>(T, &'a U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyIsDebug<'a, T, U: Debug>(T, &'a U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug>(T, &'a U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooIsDebug<'a, T, U: Debug>(&'a T, U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug>(&'a &'b T, U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAy<'a, T, U>(T, &'a U) ; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyIsDebug<'a, T, U>(T, &'a U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereIsDebugOutlivesAy<'a, T, U>(T, &'a U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) ; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U>(T, &'a &'b U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAy<'a, 'b>(&'a &'b ()); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAy<'a, 'b>(&'a &'b ()) ; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTee<'a, 'b, T>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTee<'a, 'b, T>(&'a &'b T) ; - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T>(&'a &'b T) ; - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T>(&'a &'b T) ; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTeeDebug<'a, 'b, T: Debug>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T>(&'a &'b T) where T: Debug; - //~^ ERROR outlives requirements can be inferred -} - -mod enums { - use std::fmt::Debug; - - enum TeeOutlivesAy<'a, T> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - } - - enum TeeOutlivesAyIsDebug<'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - V(&'a T), - } - - enum TeeIsDebugOutlivesAy<'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W, - } - - enum TeeOutlivesAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum TeeWhereOutlivesAy<'a, T> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W, - } - - enum TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a T), - W, - } - - enum TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - } - - enum TeeWhereOutlivesAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W, - } - - enum TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum TeeYooOutlivesAy<'a, T, U> { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a U), - } - - enum TeeYooOutlivesAyIsDebug<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a U }, - W, - } - - enum TeeYooIsDebugOutlivesAy<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V(T, &'a U), - W, - } - - enum TeeOutlivesAyYooIsDebug<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W(U), - } - - enum TeeYooOutlivesAyBee<'a, 'b, T, U> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V(T, &'a &'b U), - W, - } - - enum TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T, U), - W, - } - - enum TeeYooWhereOutlivesAy<'a, T, U> { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a U), - } - - enum TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a U }, - W, - } - - enum TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V(T, &'a U), - W, - } - - enum TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W(U), - } - - enum TeeYooWhereOutlivesAyBee<'a, 'b, T, U> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V(T, &'a &'b U), - W, - } - - enum TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a &'b U), - } - - enum TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T, yoo: U }, - W, - } - - enum TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a T, U), - W, - } - - enum TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W(U), - } - - enum BeeOutlivesAy<'a, 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b () }, - } - - enum BeeWhereOutlivesAy<'a, 'b> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b ()), - } - - enum BeeOutlivesAyTee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W, - } - - enum BeeWhereOutlivesAyTee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum BeeOutlivesAyTeeDebug<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } -} - -mod unions { - use std::fmt::Debug; - - union TeeOutlivesAy<'a, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeOutlivesAyIsDebug<'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeIsDebugOutlivesAy<'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeOutlivesAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeOutlivesAyBeeIsDebug<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereOutlivesAy<'a, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeWhereOutlivesAyIsDebug<'a, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeWhereOutlivesAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeYooOutlivesAy<'a, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooOutlivesAyIsDebug<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooIsDebugOutlivesAy<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeOutlivesAyYooIsDebug<'a, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: *const U - } - - union TeeYooOutlivesAyBee<'a, 'b, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeOutlivesAyBeeYooIsDebug<'a, 'b, T, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: *const U - } - - union TeeYooWhereOutlivesAy<'a, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: *const U - } - - union TeeYooWhereOutlivesAyBee<'a, 'b, T, U> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: *const U - } - - union TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: *const U - } - - union TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: *const U - } - - union BeeOutlivesAy<'a, 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - union BeeWhereOutlivesAy<'a, 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - union BeeOutlivesAyTee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeOutlivesAyTeeDebug<'a, 'b, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } -} - - -// But outlives inference for 'static lifetimes is under a separate -// feature-gate for now -// (https://github.com/rust-lang/rust/issues/44493#issuecomment-407846046). -struct StaticRef { - field: &'static T -} - - -fn main() {} diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives.rs b/src/test/ui/rust-2018/edition-lint-infer-outlives.rs deleted file mode 100644 index d9486ba66..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives.rs +++ /dev/null @@ -1,795 +0,0 @@ -// run-rustfix - -#![allow(unused)] -#![deny(explicit_outlives_requirements)] - -// Programmatically generated examples! -// -// Exercise outlives bounds for each of the following parameter/position -// combinations— -// -// • one generic parameter (T) bound inline -// • one parameter (T) with a where clause -// • two parameters (T and U), both bound inline -// • two parameters (T and U), one bound inline, one with a where clause -// • two parameters (T and U), both with where clauses -// -// —and for every permutation of 1 or 2 lifetimes to outlive and 0 or 1 trait -// bounds distributed among said parameters (subject to no where clause being -// empty and the struct having at least one lifetime). -// -// —and for each of tuple structs, enums and unions. - -mod structs { - use std::fmt::Debug; - - struct TeeOutlivesAy<'a, T: 'a> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereOutlivesAy<'a, T> where T: 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - struct TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - struct TeeYooOutlivesAy<'a, T, U: 'a> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: U - } - - struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: U - } - - struct TeeYooWhereOutlivesAy<'a, T, U> where U: 'a { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a U - } - - struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: U - } - - struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: T, - yoo: &'a &'b U - } - - struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: U - } - - struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: U - } - - struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: U - } - - struct BeeOutlivesAy<'a, 'b: 'a> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - struct BeeWhereOutlivesAy<'a, 'b> where 'b: 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - struct BeeOutlivesAyTee<'a, 'b: 'a, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } -} - -mod tuple_structs { - use std::fmt::Debug; - - struct TeeOutlivesAy<'a, T: 'a>(&'a T); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug>(&'a T); - //~^ ERROR outlives requirements can be inferred - - struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a>(&'a T); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAy<'a, T>(&'a T) where T: 'a; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyIsDebug<'a, T>(&'a T) where T: 'a + Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereIsDebugOutlivesAy<'a, T>(&'a T) where T: Debug + 'a; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: 'a + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T>(&'a &'b T) where T: 'a + 'b + Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: Debug + 'a + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAy<'a, T, U: 'a>(T, &'a U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug>(T, &'a U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a>(T, &'a U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug>(&'a T, U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b>(T, &'a &'b U); - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug>(&'a &'b T, U); - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAy<'a, T, U>(T, &'a U) where U: 'a; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyIsDebug<'a, T, U>(T, &'a U) where U: 'a + Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereIsDebugOutlivesAy<'a, T, U>(T, &'a U) where U: Debug + 'a; - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U>(&'a T, U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + 'b + Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug + 'a + 'b; - //~^ ERROR outlives requirements can be inferred - - struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U>(&'a &'b T, U) where U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where T: 'a, U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct TeeWhereAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where T: 'a + 'b, U: Debug; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAy<'a, 'b: 'a>(&'a &'b ()); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAy<'a, 'b>(&'a &'b ()) where 'b: 'a; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTee<'a, 'b: 'a, T>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTee<'a, 'b, T>(&'a &'b T) where 'b: 'a; - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'b; - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + 'b; - //~^ ERROR outlives requirements can be inferred - - struct BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug>(&'a &'b T); - //~^ ERROR outlives requirements can be inferred - - struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: Debug; - //~^ ERROR outlives requirements can be inferred -} - -mod enums { - use std::fmt::Debug; - - enum TeeOutlivesAy<'a, T: 'a> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - } - - enum TeeOutlivesAyIsDebug<'a, T: 'a + Debug> { - //~^ ERROR outlives requirements can be inferred - V(&'a T), - } - - enum TeeIsDebugOutlivesAy<'a, T: Debug + 'a> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W, - } - - enum TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum TeeWhereOutlivesAy<'a, T> where T: 'a { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W, - } - - enum TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a T), - W, - } - - enum TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - } - - enum TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W, - } - - enum TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum TeeYooOutlivesAy<'a, T, U: 'a> { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a U), - } - - enum TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a U }, - W, - } - - enum TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> { - //~^ ERROR outlives requirements can be inferred - V(T, &'a U), - W, - } - - enum TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W(U), - } - - enum TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - V(T, &'a &'b U), - W, - } - - enum TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T, U), - W, - } - - enum TeeYooWhereOutlivesAy<'a, T, U> where U: 'a { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a U), - } - - enum TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a U }, - W, - } - - enum TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a { - //~^ ERROR outlives requirements can be inferred - V(T, &'a U), - W, - } - - enum TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a T }, - W(U), - } - - enum TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - V { tee: T, yoo: &'a &'b U }, - W, - } - - enum TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug { - //~^ ERROR outlives requirements can be inferred - V(T, &'a &'b U), - W, - } - - enum TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b { - //~^ ERROR outlives requirements can be inferred - V { tee: T }, - W(&'a &'b U), - } - - enum TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T, yoo: U }, - W, - } - - enum TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a T, U), - W, - } - - enum TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W(U), - } - - enum BeeOutlivesAy<'a, 'b: 'a> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b () }, - } - - enum BeeWhereOutlivesAy<'a, 'b> where 'b: 'a { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b ()), - } - - enum BeeOutlivesAyTee<'a, 'b: 'a, T> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - W, - } - - enum BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } - - enum BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - W, - } - - enum BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - V { tee: &'a &'b T }, - } - - enum BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug { - //~^ ERROR outlives requirements can be inferred - V(&'a &'b T), - } -} - -mod unions { - use std::fmt::Debug; - - union TeeOutlivesAy<'a, T: 'a> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeOutlivesAyIsDebug<'a, T: 'a + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeIsDebugOutlivesAy<'a, T: Debug + 'a> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereOutlivesAy<'a, T> where T: 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a T - } - - union TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T - } - - union TeeYooOutlivesAy<'a, T, U: 'a> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: *const U - } - - union TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: *const U - } - - union TeeYooWhereOutlivesAy<'a, T, U> where U: 'a { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a U - } - - union TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: *const U - } - - union TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: *const T, - yoo: &'a &'b U - } - - union TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: *const U - } - - union TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a T, - yoo: *const U - } - - union TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - yoo: *const U - } - - union BeeOutlivesAy<'a, 'b: 'a> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - union BeeWhereOutlivesAy<'a, 'b> where 'b: 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b (), - } - - union BeeOutlivesAyTee<'a, 'b: 'a, T> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } - - union BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug { - //~^ ERROR outlives requirements can be inferred - tee: &'a &'b T, - } -} - - -// But outlives inference for 'static lifetimes is under a separate -// feature-gate for now -// (https://github.com/rust-lang/rust/issues/44493#issuecomment-407846046). -struct StaticRef { - field: &'static T -} - - -fn main() {} diff --git a/src/test/ui/rust-2018/edition-lint-infer-outlives.stderr b/src/test/ui/rust-2018/edition-lint-infer-outlives.stderr deleted file mode 100644 index faa9f21e3..000000000 --- a/src/test/ui/rust-2018/edition-lint-infer-outlives.stderr +++ /dev/null @@ -1,920 +0,0 @@ -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:26:31 - | -LL | struct TeeOutlivesAy<'a, T: 'a> { - | ^^^^ help: remove this bound - | -note: the lint level is defined here - --> $DIR/edition-lint-infer-outlives.rs:4:9 - | -LL | #![deny(explicit_outlives_requirements)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:31:40 - | -LL | struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:36:45 - | -LL | struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:41:38 - | -LL | struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:46:47 - | -LL | struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:51:52 - | -LL | struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:56:37 - | -LL | struct TeeWhereOutlivesAy<'a, T> where T: 'a { - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:61:54 - | -LL | struct TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:66:59 - | -LL | struct TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:71:44 - | -LL | struct TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b { - | ^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:76:61 - | -LL | struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:81:66 - | -LL | struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:86:37 - | -LL | struct TeeYooOutlivesAy<'a, T, U: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:92:46 - | -LL | struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:98:51 - | -LL | struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:104:41 - | -LL | struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:110:44 - | -LL | struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:116:53 - | -LL | struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:122:58 - | -LL | struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:128:48 - | -LL | struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:134:43 - | -LL | struct TeeYooWhereOutlivesAy<'a, T, U> where U: 'a { - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:140:60 - | -LL | struct TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:146:65 - | -LL | struct TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:152:46 - | -LL | struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:158:50 - | -LL | struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b { - | ^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:164:67 - | -LL | struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:170:72 - | -LL | struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:176:53 - | -LL | struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:182:62 - | -LL | struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug { - | ^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:188:69 - | -LL | struct TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug { - | ^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:194:32 - | -LL | struct BeeOutlivesAy<'a, 'b: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:199:38 - | -LL | struct BeeWhereOutlivesAy<'a, 'b> where 'b: 'a { - | ^^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:204:35 - | -LL | struct BeeOutlivesAyTee<'a, 'b: 'a, T> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:209:44 - | -LL | struct BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a { - | ^^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:214:52 - | -LL | struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b { - | ^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:219:54 - | -LL | struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:224:40 - | -LL | struct BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:229:61 - | -LL | struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug { - | ^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:238:31 - | -LL | struct TeeOutlivesAy<'a, T: 'a>(&'a T); - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:241:40 - | -LL | struct TeeOutlivesAyIsDebug<'a, T: 'a + Debug>(&'a T); - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:244:45 - | -LL | struct TeeIsDebugOutlivesAy<'a, T: Debug + 'a>(&'a T); - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:247:38 - | -LL | struct TeeOutlivesAyBee<'a, 'b, T: 'a + 'b>(&'a &'b T); - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:250:47 - | -LL | struct TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug>(&'a &'b T); - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:253:52 - | -LL | struct TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b>(&'a &'b T); - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:256:45 - | -LL | struct TeeWhereOutlivesAy<'a, T>(&'a T) where T: 'a; - | ^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:259:61 - | -LL | struct TeeWhereOutlivesAyIsDebug<'a, T>(&'a T) where T: 'a + Debug; - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:262:66 - | -LL | struct TeeWhereIsDebugOutlivesAy<'a, T>(&'a T) where T: Debug + 'a; - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:265:56 - | -LL | struct TeeWhereOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: 'a + 'b; - | ^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:268:72 - | -LL | struct TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T>(&'a &'b T) where T: 'a + 'b + Debug; - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:271:77 - | -LL | struct TeeWhereIsDebugOutlivesAyBee<'a, 'b, T>(&'a &'b T) where T: Debug + 'a + 'b; - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:274:37 - | -LL | struct TeeYooOutlivesAy<'a, T, U: 'a>(T, &'a U); - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:277:46 - | -LL | struct TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug>(T, &'a U); - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:280:51 - | -LL | struct TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a>(T, &'a U); - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:283:41 - | -LL | struct TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug>(&'a T, U); - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:286:44 - | -LL | struct TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b>(T, &'a &'b U); - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:289:53 - | -LL | struct TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug>(T, &'a &'b U); - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:292:58 - | -LL | struct TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b>(T, &'a &'b U); - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:295:48 - | -LL | struct TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug>(&'a &'b T, U); - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:298:54 - | -LL | struct TeeYooWhereOutlivesAy<'a, T, U>(T, &'a U) where U: 'a; - | ^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:301:70 - | -LL | struct TeeYooWhereOutlivesAyIsDebug<'a, T, U>(T, &'a U) where U: 'a + Debug; - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:304:75 - | -LL | struct TeeYooWhereIsDebugOutlivesAy<'a, T, U>(T, &'a U) where U: Debug + 'a; - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:307:46 - | -LL | struct TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U>(&'a T, U) where U: Debug; - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:310:65 - | -LL | struct TeeYooWhereOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + 'b; - | ^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:313:81 - | -LL | struct TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U>(T, &'a &'b U) where U: 'a + 'b + Debug; - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:316:86 - | -LL | struct TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U>(T, &'a &'b U) where U: Debug + 'a + 'b; - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:319:53 - | -LL | struct TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U>(&'a &'b T, U) where U: Debug; - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:322:72 - | -LL | struct TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U>(&'a T, U) where T: 'a, U: Debug; - | ^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:325:75 - | -LL | struct TeeWhereAyBeeYooWhereIsDebug<'a, 'b, T, U>(&'a &'b T, U) where T: 'a + 'b, U: Debug; - | ^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:328:32 - | -LL | struct BeeOutlivesAy<'a, 'b: 'a>(&'a &'b ()); - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:331:51 - | -LL | struct BeeWhereOutlivesAy<'a, 'b>(&'a &'b ()) where 'b: 'a; - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:334:35 - | -LL | struct BeeOutlivesAyTee<'a, 'b: 'a, T>(&'a &'b T); - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:337:56 - | -LL | struct BeeWhereOutlivesAyTee<'a, 'b, T>(&'a &'b T) where 'b: 'a; - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:340:64 - | -LL | struct BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'b; - | ^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:343:66 - | -LL | struct BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: 'a + 'b; - | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:346:40 - | -LL | struct BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug>(&'a &'b T); - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:349:72 - | -LL | struct BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T>(&'a &'b T) where 'b: 'a, T: Debug; - | ^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:356:29 - | -LL | enum TeeOutlivesAy<'a, T: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:361:38 - | -LL | enum TeeOutlivesAyIsDebug<'a, T: 'a + Debug> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:366:43 - | -LL | enum TeeIsDebugOutlivesAy<'a, T: Debug + 'a> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:372:36 - | -LL | enum TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:378:45 - | -LL | enum TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:383:50 - | -LL | enum TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:388:35 - | -LL | enum TeeWhereOutlivesAy<'a, T> where T: 'a { - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:394:52 - | -LL | enum TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:400:57 - | -LL | enum TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:405:42 - | -LL | enum TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b { - | ^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:410:59 - | -LL | enum TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:416:64 - | -LL | enum TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:422:35 - | -LL | enum TeeYooOutlivesAy<'a, T, U: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:428:44 - | -LL | enum TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:434:49 - | -LL | enum TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:440:39 - | -LL | enum TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:446:42 - | -LL | enum TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:452:51 - | -LL | enum TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:458:56 - | -LL | enum TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:464:46 - | -LL | enum TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:470:41 - | -LL | enum TeeYooWhereOutlivesAy<'a, T, U> where U: 'a { - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:476:58 - | -LL | enum TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:482:63 - | -LL | enum TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:488:44 - | -LL | enum TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:494:48 - | -LL | enum TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b { - | ^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:500:65 - | -LL | enum TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:506:70 - | -LL | enum TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:512:51 - | -LL | enum TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:518:60 - | -LL | enum TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug { - | ^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:524:67 - | -LL | enum TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug { - | ^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:530:30 - | -LL | enum BeeOutlivesAy<'a, 'b: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:535:36 - | -LL | enum BeeWhereOutlivesAy<'a, 'b> where 'b: 'a { - | ^^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:540:33 - | -LL | enum BeeOutlivesAyTee<'a, 'b: 'a, T> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:546:42 - | -LL | enum BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a { - | ^^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:552:50 - | -LL | enum BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b { - | ^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:557:52 - | -LL | enum BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:563:38 - | -LL | enum BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:568:59 - | -LL | enum BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug { - | ^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:577:30 - | -LL | union TeeOutlivesAy<'a, T: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:582:39 - | -LL | union TeeOutlivesAyIsDebug<'a, T: 'a + Debug> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:587:44 - | -LL | union TeeIsDebugOutlivesAy<'a, T: Debug + 'a> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:592:37 - | -LL | union TeeOutlivesAyBee<'a, 'b, T: 'a + 'b> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:597:46 - | -LL | union TeeOutlivesAyBeeIsDebug<'a, 'b, T: 'a + 'b + Debug> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:602:51 - | -LL | union TeeIsDebugOutlivesAyBee<'a, 'b, T: Debug + 'a + 'b> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:607:36 - | -LL | union TeeWhereOutlivesAy<'a, T> where T: 'a { - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:612:53 - | -LL | union TeeWhereOutlivesAyIsDebug<'a, T> where T: 'a + Debug { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:617:58 - | -LL | union TeeWhereIsDebugOutlivesAy<'a, T> where T: Debug + 'a { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:622:43 - | -LL | union TeeWhereOutlivesAyBee<'a, 'b, T> where T: 'a + 'b { - | ^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:627:60 - | -LL | union TeeWhereOutlivesAyBeeIsDebug<'a, 'b, T> where T: 'a + 'b + Debug { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:632:65 - | -LL | union TeeWhereIsDebugOutlivesAyBee<'a, 'b, T> where T: Debug + 'a + 'b { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:637:36 - | -LL | union TeeYooOutlivesAy<'a, T, U: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:643:45 - | -LL | union TeeYooOutlivesAyIsDebug<'a, T, U: 'a + Debug> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:649:50 - | -LL | union TeeYooIsDebugOutlivesAy<'a, T, U: Debug + 'a> { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:655:40 - | -LL | union TeeOutlivesAyYooIsDebug<'a, T: 'a, U: Debug> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:661:43 - | -LL | union TeeYooOutlivesAyBee<'a, 'b, T, U: 'a + 'b> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:667:52 - | -LL | union TeeYooOutlivesAyBeeIsDebug<'a, 'b, T, U: 'a + 'b + Debug> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:673:57 - | -LL | union TeeYooIsDebugOutlivesAyBee<'a, 'b, T, U: Debug + 'a + 'b> { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:679:47 - | -LL | union TeeOutlivesAyBeeYooIsDebug<'a, 'b, T: 'a + 'b, U: Debug> { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:685:42 - | -LL | union TeeYooWhereOutlivesAy<'a, T, U> where U: 'a { - | ^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:691:59 - | -LL | union TeeYooWhereOutlivesAyIsDebug<'a, T, U> where U: 'a + Debug { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:697:64 - | -LL | union TeeYooWhereIsDebugOutlivesAy<'a, T, U> where U: Debug + 'a { - | ^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:703:45 - | -LL | union TeeOutlivesAyYooWhereIsDebug<'a, T: 'a, U> where U: Debug { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:709:49 - | -LL | union TeeYooWhereOutlivesAyBee<'a, 'b, T, U> where U: 'a + 'b { - | ^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:715:66 - | -LL | union TeeYooWhereOutlivesAyBeeIsDebug<'a, 'b, T, U> where U: 'a + 'b + Debug { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:721:71 - | -LL | union TeeYooWhereIsDebugOutlivesAyBee<'a, 'b, T, U> where U: Debug + 'a + 'b { - | ^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:727:52 - | -LL | union TeeOutlivesAyBeeYooWhereIsDebug<'a, 'b, T: 'a + 'b, U> where U: Debug { - | ^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:733:61 - | -LL | union TeeWhereOutlivesAyYooWhereIsDebug<'a, T, U> where T: 'a, U: Debug { - | ^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:739:68 - | -LL | union TeeWhereOutlivesAyBeeYooWhereIsDebug<'a, 'b, T, U> where T: 'a + 'b, U: Debug { - | ^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:745:31 - | -LL | union BeeOutlivesAy<'a, 'b: 'a> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:750:37 - | -LL | union BeeWhereOutlivesAy<'a, 'b> where 'b: 'a { - | ^^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:755:34 - | -LL | union BeeOutlivesAyTee<'a, 'b: 'a, T> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:760:43 - | -LL | union BeeWhereOutlivesAyTee<'a, 'b, T> where 'b: 'a { - | ^^^^^^^^^^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:765:51 - | -LL | union BeeWhereOutlivesAyTeeWhereBee<'a, 'b, T> where 'b: 'a, T: 'b { - | ^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:770:53 - | -LL | union BeeWhereOutlivesAyTeeWhereAyBee<'a, 'b, T> where 'b: 'a, T: 'a + 'b { - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these bounds - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:775:39 - | -LL | union BeeOutlivesAyTeeDebug<'a, 'b: 'a, T: Debug> { - | ^^^^ help: remove this bound - -error: outlives requirements can be inferred - --> $DIR/edition-lint-infer-outlives.rs:780:60 - | -LL | union BeeWhereOutlivesAyTeeWhereDebug<'a, 'b, T> where 'b: 'a, T: Debug { - | ^^^^^^^^ help: remove this bound - -error: aborting due to 152 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed deleted file mode 100644 index f25d46ce3..000000000 --- a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.fixed +++ /dev/null @@ -1,34 +0,0 @@ -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] -#![allow(unused_imports)] -#![allow(dead_code)] - -pub(crate) mod foo { - pub(crate) mod bar { - pub(crate) mod baz { } - pub(crate) mod baz1 { } - - pub(crate) struct XX; - } -} - -use crate::foo::{bar::{baz::{}}}; -//~^ ERROR absolute paths must start with -//~| WARN this is accepted in the current edition - -use crate::foo::{bar::{XX, baz::{}}}; -//~^ ERROR absolute paths must start with -//~| WARN this is accepted in the current edition -//~| ERROR absolute paths must start with -//~| WARN this is accepted in the current edition - -use crate::foo::{bar::{baz::{}, baz1::{}}}; -//~^ ERROR absolute paths must start with -//~| WARN this is accepted in the current edition -//~| ERROR absolute paths must start with -//~| WARN this is accepted in the current edition - -fn main() { -} diff --git a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs deleted file mode 100644 index 9be1680c1..000000000 --- a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs +++ /dev/null @@ -1,34 +0,0 @@ -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] -#![allow(unused_imports)] -#![allow(dead_code)] - -pub(crate) mod foo { - pub(crate) mod bar { - pub(crate) mod baz { } - pub(crate) mod baz1 { } - - pub(crate) struct XX; - } -} - -use foo::{bar::{baz::{}}}; -//~^ ERROR absolute paths must start with -//~| WARN this is accepted in the current edition - -use foo::{bar::{XX, baz::{}}}; -//~^ ERROR absolute paths must start with -//~| WARN this is accepted in the current edition -//~| ERROR absolute paths must start with -//~| WARN this is accepted in the current edition - -use foo::{bar::{baz::{}, baz1::{}}}; -//~^ ERROR absolute paths must start with -//~| WARN this is accepted in the current edition -//~| ERROR absolute paths must start with -//~| WARN this is accepted in the current edition - -fn main() { -} diff --git a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr b/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr deleted file mode 100644 index 8769cbb35..000000000 --- a/src/test/ui/rust-2018/edition-lint-nested-empty-paths.stderr +++ /dev/null @@ -1,52 +0,0 @@ -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:17:5 - | -LL | use foo::{bar::{baz::{}}}; - | ^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}}}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 -note: the lint level is defined here - --> $DIR/edition-lint-nested-empty-paths.rs:4:9 - | -LL | #![deny(absolute_paths_not_starting_with_crate)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:21:5 - | -LL | use foo::{bar::{XX, baz::{}}}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:21:5 - | -LL | use foo::{bar::{XX, baz::{}}}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{XX, baz::{}}}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:27:5 - | -LL | use foo::{bar::{baz::{}, baz1::{}}}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-empty-paths.rs:27:5 - | -LL | use foo::{bar::{baz::{}, baz1::{}}}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{bar::{baz::{}, baz1::{}}}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: aborting due to 5 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-nested-paths.fixed b/src/test/ui/rust-2018/edition-lint-nested-paths.fixed deleted file mode 100644 index a04937ae8..000000000 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.fixed +++ /dev/null @@ -1,31 +0,0 @@ -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -use crate::foo::{a, b}; -//~^ ERROR absolute paths must start with -//~| this is accepted in the current edition -//~| ERROR absolute paths must start with -//~| this is accepted in the current edition - -mod foo { - pub(crate) fn a() {} - pub(crate) fn b() {} - pub(crate) fn c() {} -} - -fn main() { - a(); - b(); - - { - use crate::foo::{self as x, c}; - //~^ ERROR absolute paths must start with - //~| this is accepted in the current edition - //~| ERROR absolute paths must start with - //~| this is accepted in the current edition - x::a(); - c(); - } -} diff --git a/src/test/ui/rust-2018/edition-lint-nested-paths.rs b/src/test/ui/rust-2018/edition-lint-nested-paths.rs deleted file mode 100644 index e622a8e24..000000000 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.rs +++ /dev/null @@ -1,31 +0,0 @@ -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -use foo::{a, b}; -//~^ ERROR absolute paths must start with -//~| this is accepted in the current edition -//~| ERROR absolute paths must start with -//~| this is accepted in the current edition - -mod foo { - pub(crate) fn a() {} - pub(crate) fn b() {} - pub(crate) fn c() {} -} - -fn main() { - a(); - b(); - - { - use foo::{self as x, c}; - //~^ ERROR absolute paths must start with - //~| this is accepted in the current edition - //~| ERROR absolute paths must start with - //~| this is accepted in the current edition - x::a(); - c(); - } -} diff --git a/src/test/ui/rust-2018/edition-lint-nested-paths.stderr b/src/test/ui/rust-2018/edition-lint-nested-paths.stderr deleted file mode 100644 index 354a6fe32..000000000 --- a/src/test/ui/rust-2018/edition-lint-nested-paths.stderr +++ /dev/null @@ -1,43 +0,0 @@ -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-paths.rs:6:5 - | -LL | use foo::{a, b}; - | ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 -note: the lint level is defined here - --> $DIR/edition-lint-nested-paths.rs:4:9 - | -LL | #![deny(absolute_paths_not_starting_with_crate)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-paths.rs:6:5 - | -LL | use foo::{a, b}; - | ^^^^^^^^^^^ help: use `crate`: `crate::foo::{a, b}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-paths.rs:23:13 - | -LL | use foo::{self as x, c}; - | ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-nested-paths.rs:23:13 - | -LL | use foo::{self as x, c}; - | ^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::{self as x, c}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: aborting due to 4 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-paths-2018.rs b/src/test/ui/rust-2018/edition-lint-paths-2018.rs deleted file mode 100644 index 2005d8f4d..000000000 --- a/src/test/ui/rust-2018/edition-lint-paths-2018.rs +++ /dev/null @@ -1,10 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 -// compile-flags:--extern edition_lint_paths -// aux-build:edition-lint-paths.rs - -#![deny(absolute_paths_not_starting_with_crate)] - -edition_lint_paths::macro_2015!(); // OK - -fn main() {} diff --git a/src/test/ui/rust-2018/edition-lint-paths.fixed b/src/test/ui/rust-2018/edition-lint-paths.fixed deleted file mode 100644 index 47f82c51d..000000000 --- a/src/test/ui/rust-2018/edition-lint-paths.fixed +++ /dev/null @@ -1,77 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] -#![allow(unused)] - -extern crate edition_lint_paths; - -pub mod foo { - use edition_lint_paths; - use crate::bar::Bar; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - - use super::bar::Bar2; - use crate::bar::Bar3; - - use crate::bar; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - - use crate::bar as something_else; - - use crate::{main, Bar as SomethingElse}; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - //~| ERROR absolute - //~| WARN this is accepted in the current edition - //~| ERROR absolute - //~| WARN this is accepted in the current edition - - use crate::{main as another_main, Bar as SomethingElse2}; - - pub fn test() {} - - pub trait SomeTrait {} -} - -use crate::bar::Bar; -//~^ ERROR absolute -//~| WARN this is accepted in the current edition - -pub mod bar { - use edition_lint_paths as foo; - pub struct Bar; - pub type Bar2 = Bar; - pub type Bar3 = Bar; -} - -mod baz { - use crate::*; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition -} - -impl crate::foo::SomeTrait for u32 {} -//~^ ERROR absolute -//~| WARN this is accepted in the current edition - -fn main() { - let x = crate::bar::Bar; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - - let x = bar::Bar; - let x = crate::bar::Bar; - let x = self::bar::Bar; - foo::test(); - - { - use edition_lint_paths as bar; - edition_lint_paths::foo(); - bar::foo(); - ::edition_lint_paths::foo(); - } -} diff --git a/src/test/ui/rust-2018/edition-lint-paths.rs b/src/test/ui/rust-2018/edition-lint-paths.rs deleted file mode 100644 index e278983da..000000000 --- a/src/test/ui/rust-2018/edition-lint-paths.rs +++ /dev/null @@ -1,77 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] -#![allow(unused)] - -extern crate edition_lint_paths; - -pub mod foo { - use edition_lint_paths; - use bar::Bar; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - - use super::bar::Bar2; - use crate::bar::Bar3; - - use bar; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - - use crate::bar as something_else; - - use {main, Bar as SomethingElse}; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - //~| ERROR absolute - //~| WARN this is accepted in the current edition - //~| ERROR absolute - //~| WARN this is accepted in the current edition - - use crate::{main as another_main, Bar as SomethingElse2}; - - pub fn test() {} - - pub trait SomeTrait {} -} - -use bar::Bar; -//~^ ERROR absolute -//~| WARN this is accepted in the current edition - -pub mod bar { - use edition_lint_paths as foo; - pub struct Bar; - pub type Bar2 = Bar; - pub type Bar3 = Bar; -} - -mod baz { - use *; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition -} - -impl ::foo::SomeTrait for u32 {} -//~^ ERROR absolute -//~| WARN this is accepted in the current edition - -fn main() { - let x = ::bar::Bar; - //~^ ERROR absolute - //~| WARN this is accepted in the current edition - - let x = bar::Bar; - let x = crate::bar::Bar; - let x = self::bar::Bar; - foo::test(); - - { - use edition_lint_paths as bar; - edition_lint_paths::foo(); - bar::foo(); - ::edition_lint_paths::foo(); - } -} diff --git a/src/test/ui/rust-2018/edition-lint-paths.stderr b/src/test/ui/rust-2018/edition-lint-paths.stderr deleted file mode 100644 index 42652be94..000000000 --- a/src/test/ui/rust-2018/edition-lint-paths.stderr +++ /dev/null @@ -1,88 +0,0 @@ -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:12:9 - | -LL | use bar::Bar; - | ^^^^^^^^ help: use `crate`: `crate::bar::Bar` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 -note: the lint level is defined here - --> $DIR/edition-lint-paths.rs:5:9 - | -LL | #![deny(absolute_paths_not_starting_with_crate)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:19:9 - | -LL | use bar; - | ^^^ help: use `crate`: `crate::bar` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:25:9 - | -LL | use {main, Bar as SomethingElse}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:25:9 - | -LL | use {main, Bar as SomethingElse}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:25:9 - | -LL | use {main, Bar as SomethingElse}; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::{main, Bar as SomethingElse}` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:40:5 - | -LL | use bar::Bar; - | ^^^^^^^^ help: use `crate`: `crate::bar::Bar` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:52:9 - | -LL | use *; - | ^ help: use `crate`: `crate::*` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:57:6 - | -LL | impl ::foo::SomeTrait for u32 {} - | ^^^^^^^^^^^^^^^^ help: use `crate`: `crate::foo::SomeTrait` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/edition-lint-paths.rs:62:13 - | -LL | let x = ::bar::Bar; - | ^^^^^^^^^^ help: use `crate`: `crate::bar::Bar` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 - -error: aborting due to 9 previous errors - diff --git a/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs b/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs deleted file mode 100644 index 950ad1f50..000000000 --- a/src/test/ui/rust-2018/edition-lint-uninferable-outlives.rs +++ /dev/null @@ -1,30 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) - -#![allow(unused)] -#![deny(explicit_outlives_requirements)] - -// A case where we can't infer the outlives requirement. Example copied from -// RFC 2093. -// (https://rust-lang.github.io/rfcs/2093-infer-outlives.html -// #where-explicit-annotations-would-still-be-required) - - -trait MakeRef<'a> { - type Type; -} - -impl<'a, T> MakeRef<'a> for Vec - where T: 'a // still required -{ - type Type = &'a T; -} - - -struct Foo<'a, T> - where T: 'a // still required, not inferred from `field` -{ - field: as MakeRef<'a>>::Type -} - - -fn main() {} diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed deleted file mode 100644 index e51ce5d1d..000000000 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.fixed +++ /dev/null @@ -1,28 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths -// edition:2018 - -// The "normal case". Ideally we would remove the `extern crate` here, -// but we don't. - -#![deny(rust_2018_idioms)] -#![allow(dead_code)] - - -//~^ ERROR unused extern crate - -// Shouldn't suggest changing to `use`, as `bar` -// would no longer be added to the prelude which could cause -// compilation errors for imports that use `bar` in other -// modules. See #57672. -extern crate edition_lint_paths as bar; - -fn main() { - // This is not considered to *use* the `extern crate` in Rust 2018: - use edition_lint_paths::foo; - foo(); - - // But this should be a use of the (renamed) crate: - crate::bar::foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs deleted file mode 100644 index debbf085d..000000000 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.rs +++ /dev/null @@ -1,28 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths -// edition:2018 - -// The "normal case". Ideally we would remove the `extern crate` here, -// but we don't. - -#![deny(rust_2018_idioms)] -#![allow(dead_code)] - -extern crate edition_lint_paths; -//~^ ERROR unused extern crate - -// Shouldn't suggest changing to `use`, as `bar` -// would no longer be added to the prelude which could cause -// compilation errors for imports that use `bar` in other -// modules. See #57672. -extern crate edition_lint_paths as bar; - -fn main() { - // This is not considered to *use* the `extern crate` in Rust 2018: - use edition_lint_paths::foo; - foo(); - - // But this should be a use of the (renamed) crate: - crate::bar::foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr b/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr deleted file mode 100644 index bb50ec3f5..000000000 --- a/src/test/ui/rust-2018/extern-crate-idiomatic-in-2018.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error: unused extern crate - --> $DIR/extern-crate-idiomatic-in-2018.rs:12:1 - | -LL | extern crate edition_lint_paths; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove it - | -note: the lint level is defined here - --> $DIR/extern-crate-idiomatic-in-2018.rs:9:9 - | -LL | #![deny(rust_2018_idioms)] - | ^^^^^^^^^^^^^^^^ - = note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]` - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic.fixed b/src/test/ui/rust-2018/extern-crate-idiomatic.fixed deleted file mode 100644 index 3111b1dab..000000000 --- a/src/test/ui/rust-2018/extern-crate-idiomatic.fixed +++ /dev/null @@ -1,18 +0,0 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// compile-flags:--extern edition_lint_paths -// run-rustfix - -// The "normal case". Ideally we would remove the `extern crate` here, -// but we don't. - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -extern crate edition_lint_paths; - -use edition_lint_paths::foo; - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-idiomatic.rs b/src/test/ui/rust-2018/extern-crate-idiomatic.rs deleted file mode 100644 index 3111b1dab..000000000 --- a/src/test/ui/rust-2018/extern-crate-idiomatic.rs +++ /dev/null @@ -1,18 +0,0 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// compile-flags:--extern edition_lint_paths -// run-rustfix - -// The "normal case". Ideally we would remove the `extern crate` here, -// but we don't. - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -extern crate edition_lint_paths; - -use edition_lint_paths::foo; - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed deleted file mode 100644 index 11b9a67ed..000000000 --- a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.fixed +++ /dev/null @@ -1,17 +0,0 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// run-rustfix - -// Oddball: `edition_lint_paths` is accessed via this `self` path -// rather than being accessed directly. Unless we rewrite that path, -// we can't drop the extern crate. - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -extern crate edition_lint_paths; -use self::edition_lint_paths::foo; - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs b/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs deleted file mode 100644 index 11b9a67ed..000000000 --- a/src/test/ui/rust-2018/extern-crate-referenced-by-self-path.rs +++ /dev/null @@ -1,17 +0,0 @@ -// run-pass -// aux-build:edition-lint-paths.rs -// run-rustfix - -// Oddball: `edition_lint_paths` is accessed via this `self` path -// rather than being accessed directly. Unless we rewrite that path, -// we can't drop the extern crate. - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -extern crate edition_lint_paths; -use self::edition_lint_paths::foo; - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-rename.fixed b/src/test/ui/rust-2018/extern-crate-rename.fixed deleted file mode 100644 index ea832ef3e..000000000 --- a/src/test/ui/rust-2018/extern-crate-rename.fixed +++ /dev/null @@ -1,18 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix - -// Oddball: crate is renamed, making it harder for us to rewrite -// paths. We don't (and we leave the `extern crate` in place). - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -extern crate edition_lint_paths as my_crate; - -use crate::my_crate::foo; -//~^ ERROR absolute paths must start -//~| WARNING this is accepted in the current edition - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-rename.rs b/src/test/ui/rust-2018/extern-crate-rename.rs deleted file mode 100644 index b1f617dd8..000000000 --- a/src/test/ui/rust-2018/extern-crate-rename.rs +++ /dev/null @@ -1,18 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix - -// Oddball: crate is renamed, making it harder for us to rewrite -// paths. We don't (and we leave the `extern crate` in place). - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -extern crate edition_lint_paths as my_crate; - -use my_crate::foo; -//~^ ERROR absolute paths must start -//~| WARNING this is accepted in the current edition - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-rename.stderr b/src/test/ui/rust-2018/extern-crate-rename.stderr deleted file mode 100644 index eb040f5de..000000000 --- a/src/test/ui/rust-2018/extern-crate-rename.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/extern-crate-rename.rs:12:5 - | -LL | use my_crate::foo; - | ^^^^^^^^^^^^^ help: use `crate`: `crate::my_crate::foo` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 -note: the lint level is defined here - --> $DIR/extern-crate-rename.rs:8:9 - | -LL | #![deny(absolute_paths_not_starting_with_crate)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/extern-crate-submod.fixed b/src/test/ui/rust-2018/extern-crate-submod.fixed deleted file mode 100644 index 9b0b0dd8e..000000000 --- a/src/test/ui/rust-2018/extern-crate-submod.fixed +++ /dev/null @@ -1,25 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix - -// Oddball: extern crate appears in a submodule, making it harder for -// us to rewrite paths. We don't (and we leave the `extern crate` in -// place). - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -mod m { - // Because this extern crate does not appear at the root, we - // ignore it altogether. - pub extern crate edition_lint_paths; -} - -// And we don't being smart about paths like this, even though you -// *could* rewrite it to `use edition_lint_paths::foo` -use crate::m::edition_lint_paths::foo; -//~^ ERROR absolute paths must start -//~| WARNING this is accepted in the current edition - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-submod.rs b/src/test/ui/rust-2018/extern-crate-submod.rs deleted file mode 100644 index dfce9128c..000000000 --- a/src/test/ui/rust-2018/extern-crate-submod.rs +++ /dev/null @@ -1,25 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix - -// Oddball: extern crate appears in a submodule, making it harder for -// us to rewrite paths. We don't (and we leave the `extern crate` in -// place). - -#![feature(rust_2018_preview)] -#![deny(absolute_paths_not_starting_with_crate)] - -mod m { - // Because this extern crate does not appear at the root, we - // ignore it altogether. - pub extern crate edition_lint_paths; -} - -// And we don't being smart about paths like this, even though you -// *could* rewrite it to `use edition_lint_paths::foo` -use m::edition_lint_paths::foo; -//~^ ERROR absolute paths must start -//~| WARNING this is accepted in the current edition - -fn main() { - foo(); -} diff --git a/src/test/ui/rust-2018/extern-crate-submod.stderr b/src/test/ui/rust-2018/extern-crate-submod.stderr deleted file mode 100644 index 1a9aa7578..000000000 --- a/src/test/ui/rust-2018/extern-crate-submod.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition - --> $DIR/extern-crate-submod.rs:19:5 - | -LL | use m::edition_lint_paths::foo; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::m::edition_lint_paths::foo` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #53130 -note: the lint level is defined here - --> $DIR/extern-crate-submod.rs:9:9 - | -LL | #![deny(absolute_paths_not_starting_with_crate)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/future-proofing-locals.rs b/src/test/ui/rust-2018/future-proofing-locals.rs deleted file mode 100644 index 2c388cf37..000000000 --- a/src/test/ui/rust-2018/future-proofing-locals.rs +++ /dev/null @@ -1,50 +0,0 @@ -// edition:2018 - -#![allow(non_camel_case_types)] -#![allow(unused_imports)] - -mod T { - pub struct U; -} -mod x { - pub struct y; -} - -fn type_param() { - use T as _; //~ ERROR imports cannot refer to type parameters - use T::U; //~ ERROR imports cannot refer to type parameters - use T::*; //~ ERROR imports cannot refer to type parameters -} - -fn self_import() { - use T; //~ ERROR imports cannot refer to type parameters -} - -fn let_binding() { - let x = 10; - - use x as _; //~ ERROR imports cannot refer to local variables - use x::y; // OK - use x::*; // OK -} - -fn param_binding(x: u8) { - use x; //~ ERROR imports cannot refer to local variables -} - -fn match_binding() { - match 0 { - x => { - use x; //~ ERROR imports cannot refer to local variables - } - } -} - -fn nested() { - let x = 10; - - use {T as _, x}; //~ ERROR imports cannot refer to type parameters - //~| ERROR imports cannot refer to local variables -} - -fn main() {} diff --git a/src/test/ui/rust-2018/future-proofing-locals.stderr b/src/test/ui/rust-2018/future-proofing-locals.stderr deleted file mode 100644 index 7021489a6..000000000 --- a/src/test/ui/rust-2018/future-proofing-locals.stderr +++ /dev/null @@ -1,56 +0,0 @@ -error: imports cannot refer to type parameters - --> $DIR/future-proofing-locals.rs:14:9 - | -LL | use T as _; - | ^ - -error: imports cannot refer to type parameters - --> $DIR/future-proofing-locals.rs:15:9 - | -LL | use T::U; - | ^ - -error: imports cannot refer to type parameters - --> $DIR/future-proofing-locals.rs:16:9 - | -LL | use T::*; - | ^ - -error: imports cannot refer to type parameters - --> $DIR/future-proofing-locals.rs:20:9 - | -LL | use T; - | ^ - -error: imports cannot refer to local variables - --> $DIR/future-proofing-locals.rs:26:9 - | -LL | use x as _; - | ^ - -error: imports cannot refer to local variables - --> $DIR/future-proofing-locals.rs:32:9 - | -LL | use x; - | ^ - -error: imports cannot refer to local variables - --> $DIR/future-proofing-locals.rs:38:17 - | -LL | use x; - | ^ - -error: imports cannot refer to type parameters - --> $DIR/future-proofing-locals.rs:46:10 - | -LL | use {T as _, x}; - | ^ - -error: imports cannot refer to local variables - --> $DIR/future-proofing-locals.rs:46:18 - | -LL | use {T as _, x}; - | ^ - -error: aborting due to 9 previous errors - diff --git a/src/test/ui/rust-2018/issue-51008-1.rs b/src/test/ui/rust-2018/issue-51008-1.rs deleted file mode 100644 index 8ae5e8278..000000000 --- a/src/test/ui/rust-2018/issue-51008-1.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Regression test for #51008 -- the anonymous lifetime in `&i32` was -// being incorrectly considered part of the "elided lifetimes" from -// the impl. -// -// run-pass - -#![feature(rust_2018_preview)] - -trait A { - -} - -impl A for F where F: PartialEq { } - -fn main() {} diff --git a/src/test/ui/rust-2018/issue-51008.rs b/src/test/ui/rust-2018/issue-51008.rs deleted file mode 100644 index b62609e32..000000000 --- a/src/test/ui/rust-2018/issue-51008.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Regression test for #51008 -- the anonymous lifetime in `&i32` was -// being incorrectly considered part of the "elided lifetimes" from -// the impl. -// -// run-pass - -#![feature(rust_2018_preview)] - -trait A { - -} - -impl A for F where F: FnOnce(&i32) {} - -fn main() {} diff --git a/src/test/ui/rust-2018/issue-52202-use-suggestions.rs b/src/test/ui/rust-2018/issue-52202-use-suggestions.rs deleted file mode 100644 index 1c0426808..000000000 --- a/src/test/ui/rust-2018/issue-52202-use-suggestions.rs +++ /dev/null @@ -1,13 +0,0 @@ -// edition:2018 - -// The local `use` suggestion should start with `crate::` (but the -// standard-library suggestions should not, obviously). - -mod plumbing { - pub struct Drain; -} - -fn main() { - let _d = Drain {}; - //~^ ERROR cannot find struct, variant or union type `Drain` in this scope -} diff --git a/src/test/ui/rust-2018/issue-52202-use-suggestions.stderr b/src/test/ui/rust-2018/issue-52202-use-suggestions.stderr deleted file mode 100644 index 38cd9713d..000000000 --- a/src/test/ui/rust-2018/issue-52202-use-suggestions.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0422]: cannot find struct, variant or union type `Drain` in this scope - --> $DIR/issue-52202-use-suggestions.rs:11:14 - | -LL | let _d = Drain {}; - | ^^^^^ not found in this scope - | -help: consider importing one of these items - | -LL | use crate::plumbing::Drain; - | -LL | use std::collections::binary_heap::Drain; - | -LL | use std::collections::hash_map::Drain; - | -LL | use std::collections::hash_set::Drain; - | - and 3 other candidates - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0422`. diff --git a/src/test/ui/rust-2018/issue-54006.rs b/src/test/ui/rust-2018/issue-54006.rs deleted file mode 100644 index a7a4770fc..000000000 --- a/src/test/ui/rust-2018/issue-54006.rs +++ /dev/null @@ -1,13 +0,0 @@ -// edition:2018 - -#![no_std] -#![crate_type = "lib"] - -use alloc::vec; -//~^ ERROR unresolved import `alloc` - -pub fn foo() { - let mut xs = vec![]; - //~^ ERROR cannot determine resolution for the macro `vec` - xs.push(0); -} diff --git a/src/test/ui/rust-2018/issue-54006.stderr b/src/test/ui/rust-2018/issue-54006.stderr deleted file mode 100644 index 1978138a6..000000000 --- a/src/test/ui/rust-2018/issue-54006.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0432]: unresolved import `alloc` - --> $DIR/issue-54006.rs:6:5 - | -LL | use alloc::vec; - | ^^^^^ help: a similar path exists: `core::alloc` - -error: cannot determine resolution for the macro `vec` - --> $DIR/issue-54006.rs:10:18 - | -LL | let mut xs = vec![]; - | ^^^ - | - = note: import resolution is stuck, try simplifying macro imports - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed deleted file mode 100644 index d59243800..000000000 --- a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.fixed +++ /dev/null @@ -1,14 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths --cfg blandiloquence -// edition:2018 - -#![deny(rust_2018_idioms)] -#![allow(dead_code)] - -// The suggestion span should include the attribute. - - -//~^ ERROR unused extern crate - -fn main() {} diff --git a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs deleted file mode 100644 index a948baee5..000000000 --- a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.rs +++ /dev/null @@ -1,15 +0,0 @@ -// aux-build:edition-lint-paths.rs -// run-rustfix -// compile-flags:--extern edition_lint_paths --cfg blandiloquence -// edition:2018 - -#![deny(rust_2018_idioms)] -#![allow(dead_code)] - -// The suggestion span should include the attribute. - -#[cfg(blandiloquence)] //~ HELP remove it -extern crate edition_lint_paths; -//~^ ERROR unused extern crate - -fn main() {} diff --git a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr b/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr deleted file mode 100644 index 2ef97e7f2..000000000 --- a/src/test/ui/rust-2018/issue-54400-unused-extern-crate-attr-span.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: unused extern crate - --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:12:1 - | -LL | / #[cfg(blandiloquence)] -LL | | extern crate edition_lint_paths; - | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- - | |________________________________| - | help: remove it - | -note: the lint level is defined here - --> $DIR/issue-54400-unused-extern-crate-attr-span.rs:6:9 - | -LL | #![deny(rust_2018_idioms)] - | ^^^^^^^^^^^^^^^^ - = note: `#[deny(unused_extern_crates)]` implied by `#[deny(rust_2018_idioms)]` - -error: aborting due to previous error - diff --git a/src/test/ui/rust-2018/local-path-suggestions-2015.rs b/src/test/ui/rust-2018/local-path-suggestions-2015.rs deleted file mode 100644 index 32e9c0c33..000000000 --- a/src/test/ui/rust-2018/local-path-suggestions-2015.rs +++ /dev/null @@ -1,26 +0,0 @@ -// aux-build:baz.rs -// compile-flags:--extern baz -// edition:2015 - -// This test exists to demonstrate the behaviour of the import suggestions -// from the `local-path-suggestions-2018.rs` test when not using the 2018 edition. - -extern crate baz as aux_baz; - -mod foo { - pub type Bar = u32; -} - -mod baz { - use foo::Bar; - - fn baz() { - let x: Bar = 22; - } -} - -use foo::Bar; - -use foobar::Baz; //~ ERROR unresolved import `foobar` - -fn main() { } diff --git a/src/test/ui/rust-2018/local-path-suggestions-2015.stderr b/src/test/ui/rust-2018/local-path-suggestions-2015.stderr deleted file mode 100644 index 666864a18..000000000 --- a/src/test/ui/rust-2018/local-path-suggestions-2015.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0432]: unresolved import `foobar` - --> $DIR/local-path-suggestions-2015.rs:24:5 - | -LL | use foobar::Baz; - | ^^^^^^ - | | - | unresolved import - | help: a similar path exists: `aux_baz::foobar` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.rs b/src/test/ui/rust-2018/local-path-suggestions-2018.rs deleted file mode 100644 index 5eafbb2c2..000000000 --- a/src/test/ui/rust-2018/local-path-suggestions-2018.rs +++ /dev/null @@ -1,21 +0,0 @@ -// aux-build:baz.rs -// compile-flags:--extern baz -// edition:2018 - -mod foo { - pub type Bar = u32; -} - -mod bazz { - use foo::Bar; //~ ERROR unresolved import `foo` - - fn baz() { - let x: Bar = 22; - } -} - -use foo::Bar; - -use foobar::Baz; //~ ERROR unresolved import `foobar` - -fn main() { } diff --git a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr b/src/test/ui/rust-2018/local-path-suggestions-2018.stderr deleted file mode 100644 index 40f3d6bf1..000000000 --- a/src/test/ui/rust-2018/local-path-suggestions-2018.stderr +++ /dev/null @@ -1,17 +0,0 @@ -error[E0432]: unresolved import `foo` - --> $DIR/local-path-suggestions-2018.rs:10:9 - | -LL | use foo::Bar; - | ^^^ help: a similar path exists: `crate::foo` - | - = note: `use` statements changed in Rust 2018; read more at - -error[E0432]: unresolved import `foobar` - --> $DIR/local-path-suggestions-2018.rs:19:5 - | -LL | use foobar::Baz; - | ^^^^^^ help: a similar path exists: `baz::foobar` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/rust-2018/macro-use-warned-against.rs b/src/test/ui/rust-2018/macro-use-warned-against.rs deleted file mode 100644 index 72f2868e0..000000000 --- a/src/test/ui/rust-2018/macro-use-warned-against.rs +++ /dev/null @@ -1,14 +0,0 @@ -// aux-build:macro-use-warned-against.rs -// aux-build:macro-use-warned-against2.rs -// check-pass - -#![warn(macro_use_extern_crate, unused)] - -#[macro_use] //~ WARN should be replaced at use sites with a `use` item -extern crate macro_use_warned_against; -#[macro_use] //~ WARN unused `#[macro_use]` -extern crate macro_use_warned_against2; - -fn main() { - foo!(); -} diff --git a/src/test/ui/rust-2018/macro-use-warned-against.stderr b/src/test/ui/rust-2018/macro-use-warned-against.stderr deleted file mode 100644 index 6b46f002e..000000000 --- a/src/test/ui/rust-2018/macro-use-warned-against.stderr +++ /dev/null @@ -1,27 +0,0 @@ -warning: deprecated `#[macro_use]` attribute used to import macros should be replaced at use sites with a `use` item to import the macro instead - --> $DIR/macro-use-warned-against.rs:7:1 - | -LL | #[macro_use] - | ^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/macro-use-warned-against.rs:5:9 - | -LL | #![warn(macro_use_extern_crate, unused)] - | ^^^^^^^^^^^^^^^^^^^^^^ - -warning: unused `#[macro_use]` import - --> $DIR/macro-use-warned-against.rs:9:1 - | -LL | #[macro_use] - | ^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/macro-use-warned-against.rs:5:33 - | -LL | #![warn(macro_use_extern_crate, unused)] - | ^^^^^^ - = note: `#[warn(unused_imports)]` implied by `#[warn(unused)]` - -warning: 2 warnings emitted - diff --git a/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs b/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs deleted file mode 100644 index 2d4cb6514..000000000 --- a/src/test/ui/rust-2018/proc-macro-crate-in-paths.rs +++ /dev/null @@ -1,16 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) -// force-host -// no-prefer-dynamic - -#![crate_type = "proc-macro"] -#![deny(rust_2018_compatibility)] -#![feature(rust_2018_preview)] - -extern crate proc_macro; - -use proc_macro::TokenStream; - -#[proc_macro_derive(Template, attributes(template))] -pub fn derive_template(input: TokenStream) -> TokenStream { - input -} diff --git a/src/test/ui/rust-2018/remove-extern-crate.fixed b/src/test/ui/rust-2018/remove-extern-crate.fixed deleted file mode 100644 index 832632268..000000000 --- a/src/test/ui/rust-2018/remove-extern-crate.fixed +++ /dev/null @@ -1,39 +0,0 @@ -// run-rustfix -// edition:2018 -// check-pass -// aux-build:remove-extern-crate.rs -// compile-flags:--extern remove_extern_crate - -#![warn(rust_2018_idioms)] - - //~ WARNING unused extern crate -// Shouldn't suggest changing to `use`, as `another_name` -// would no longer be added to the prelude which could cause -// compilation errors for imports that use `another_name` in other -// modules. See #57672. -extern crate core as another_name; -use remove_extern_crate; -#[macro_use] -extern crate remove_extern_crate as something_else; - -// Shouldn't suggest changing to `use`, as the `alloc` -// crate is not in the extern prelude - see #54381. -extern crate alloc; - -fn main() { - another_name::mem::drop(3); - another::foo(); - remove_extern_crate::foo!(); - bar!(); - alloc::vec![5]; -} - -mod another { - use core; //~ WARNING `extern crate` is not idiomatic - use remove_extern_crate; - - pub fn foo() { - core::mem::drop(4); - remove_extern_crate::foo!(); - } -} diff --git a/src/test/ui/rust-2018/remove-extern-crate.rs b/src/test/ui/rust-2018/remove-extern-crate.rs deleted file mode 100644 index bbb84cd46..000000000 --- a/src/test/ui/rust-2018/remove-extern-crate.rs +++ /dev/null @@ -1,39 +0,0 @@ -// run-rustfix -// edition:2018 -// check-pass -// aux-build:remove-extern-crate.rs -// compile-flags:--extern remove_extern_crate - -#![warn(rust_2018_idioms)] - -extern crate core; //~ WARNING unused extern crate -// Shouldn't suggest changing to `use`, as `another_name` -// would no longer be added to the prelude which could cause -// compilation errors for imports that use `another_name` in other -// modules. See #57672. -extern crate core as another_name; -use remove_extern_crate; -#[macro_use] -extern crate remove_extern_crate as something_else; - -// Shouldn't suggest changing to `use`, as the `alloc` -// crate is not in the extern prelude - see #54381. -extern crate alloc; - -fn main() { - another_name::mem::drop(3); - another::foo(); - remove_extern_crate::foo!(); - bar!(); - alloc::vec![5]; -} - -mod another { - extern crate core; //~ WARNING `extern crate` is not idiomatic - use remove_extern_crate; - - pub fn foo() { - core::mem::drop(4); - remove_extern_crate::foo!(); - } -} diff --git a/src/test/ui/rust-2018/remove-extern-crate.stderr b/src/test/ui/rust-2018/remove-extern-crate.stderr deleted file mode 100644 index bde4c1808..000000000 --- a/src/test/ui/rust-2018/remove-extern-crate.stderr +++ /dev/null @@ -1,21 +0,0 @@ -warning: unused extern crate - --> $DIR/remove-extern-crate.rs:9:1 - | -LL | extern crate core; - | ^^^^^^^^^^^^^^^^^^ help: remove it - | -note: the lint level is defined here - --> $DIR/remove-extern-crate.rs:7:9 - | -LL | #![warn(rust_2018_idioms)] - | ^^^^^^^^^^^^^^^^ - = note: `#[warn(unused_extern_crates)]` implied by `#[warn(rust_2018_idioms)]` - -warning: `extern crate` is not idiomatic in the new edition - --> $DIR/remove-extern-crate.rs:32:5 - | -LL | extern crate core; - | ^^^^^^^^^^^^^^^^^^ help: convert it to a `use` - -warning: 2 warnings emitted - diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed b/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed deleted file mode 100644 index f5afbad9f..000000000 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.fixed +++ /dev/null @@ -1,23 +0,0 @@ -// aux-build:suggestions-not-always-applicable.rs -// edition:2015 -// run-rustfix -// rustfix-only-machine-applicable -// check-pass - -#![feature(rust_2018_preview)] -#![warn(rust_2018_compatibility)] - -extern crate suggestions_not_always_applicable as foo; - -pub struct Foo; - -mod test { - use crate::foo::foo; - - #[foo] - fn main() {} -} - -fn main() { - test::foo(); -} diff --git a/src/test/ui/rust-2018/suggestions-not-always-applicable.rs b/src/test/ui/rust-2018/suggestions-not-always-applicable.rs deleted file mode 100644 index f5afbad9f..000000000 --- a/src/test/ui/rust-2018/suggestions-not-always-applicable.rs +++ /dev/null @@ -1,23 +0,0 @@ -// aux-build:suggestions-not-always-applicable.rs -// edition:2015 -// run-rustfix -// rustfix-only-machine-applicable -// check-pass - -#![feature(rust_2018_preview)] -#![warn(rust_2018_compatibility)] - -extern crate suggestions_not_always_applicable as foo; - -pub struct Foo; - -mod test { - use crate::foo::foo; - - #[foo] - fn main() {} -} - -fn main() { - test::foo(); -} diff --git a/src/test/ui/rust-2018/trait-import-suggestions.rs b/src/test/ui/rust-2018/trait-import-suggestions.rs deleted file mode 100644 index 9c67c3f4b..000000000 --- a/src/test/ui/rust-2018/trait-import-suggestions.rs +++ /dev/null @@ -1,31 +0,0 @@ -// edition:2018 -// aux-build:trait-import-suggestions.rs -// compile-flags:--extern trait-import-suggestions - -mod foo { - mod foobar { - pub(crate) trait Foobar { - fn foobar(&self) { } - } - - impl Foobar for u32 { } - } - - pub(crate) trait Bar { - fn bar(&self) { } - } - - impl Bar for u32 { } - - fn in_foo() { - let x: u32 = 22; - x.foobar(); //~ ERROR no method named `foobar` - } -} - -fn main() { - let x: u32 = 22; - x.bar(); //~ ERROR no method named `bar` - x.baz(); //~ ERROR no method named `baz` - let y = u32::from_str("33"); //~ ERROR no function or associated item named `from_str` -} diff --git a/src/test/ui/rust-2018/trait-import-suggestions.stderr b/src/test/ui/rust-2018/trait-import-suggestions.stderr deleted file mode 100644 index 6454b6045..000000000 --- a/src/test/ui/rust-2018/trait-import-suggestions.stderr +++ /dev/null @@ -1,55 +0,0 @@ -error[E0599]: no method named `foobar` found for type `u32` in the current scope - --> $DIR/trait-import-suggestions.rs:22:11 - | -LL | fn foobar(&self) { } - | ------ the method is available for `u32` here -... -LL | x.foobar(); - | ^^^^^^ method not found in `u32` - | - = help: items from traits can only be used if the trait is in scope -help: the following trait is implemented but not in scope; perhaps add a `use` for it: - | -LL | use crate::foo::foobar::Foobar; - | - -error[E0599]: no method named `bar` found for type `u32` in the current scope - --> $DIR/trait-import-suggestions.rs:28:7 - | -LL | fn bar(&self) { } - | --- the method is available for `u32` here -... -LL | x.bar(); - | ^^^ method not found in `u32` - | - = help: items from traits can only be used if the trait is in scope -help: the following trait is implemented but not in scope; perhaps add a `use` for it: - | -LL | use crate::foo::Bar; - | - -error[E0599]: no method named `baz` found for type `u32` in the current scope - --> $DIR/trait-import-suggestions.rs:29:7 - | -LL | x.baz(); - | ^^^ method not found in `u32` - -error[E0599]: no function or associated item named `from_str` found for type `u32` in the current scope - --> $DIR/trait-import-suggestions.rs:30:18 - | -LL | let y = u32::from_str("33"); - | ^^^^^^^^ function or associated item not found in `u32` - | - = help: items from traits can only be used if the trait is in scope -help: the following trait is implemented but not in scope; perhaps add a `use` for it: - | -LL | use std::str::FromStr; - | -help: there is an associated function with a similar name - | -LL | let y = u32::from_str_radix("33"); - | ~~~~~~~~~~~~~~ - -error: aborting due to 4 previous errors - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/rust-2018/try-ident.fixed b/src/test/ui/rust-2018/try-ident.fixed deleted file mode 100644 index 985348665..000000000 --- a/src/test/ui/rust-2018/try-ident.fixed +++ /dev/null @@ -1,15 +0,0 @@ -// run-rustfix -// check-pass - -#![warn(rust_2018_compatibility)] - -fn main() { - r#try(); - //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this is accepted in the current edition -} - -fn r#try() { - //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/try-ident.rs b/src/test/ui/rust-2018/try-ident.rs deleted file mode 100644 index 2c02b7596..000000000 --- a/src/test/ui/rust-2018/try-ident.rs +++ /dev/null @@ -1,15 +0,0 @@ -// run-rustfix -// check-pass - -#![warn(rust_2018_compatibility)] - -fn main() { - try(); - //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this is accepted in the current edition -} - -fn try() { - //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this is accepted in the current edition -} diff --git a/src/test/ui/rust-2018/try-ident.stderr b/src/test/ui/rust-2018/try-ident.stderr deleted file mode 100644 index 74015ac9d..000000000 --- a/src/test/ui/rust-2018/try-ident.stderr +++ /dev/null @@ -1,26 +0,0 @@ -warning: `try` is a keyword in the 2018 edition - --> $DIR/try-ident.rs:7:5 - | -LL | try(); - | ^^^ help: you can use a raw identifier to stay compatible: `r#try` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 -note: the lint level is defined here - --> $DIR/try-ident.rs:4:9 - | -LL | #![warn(rust_2018_compatibility)] - | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(keyword_idents)]` implied by `#[warn(rust_2018_compatibility)]` - -warning: `try` is a keyword in the 2018 edition - --> $DIR/try-ident.rs:12:4 - | -LL | fn try() { - | ^^^ help: you can use a raw identifier to stay compatible: `r#try` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 - -warning: 2 warnings emitted - diff --git a/src/test/ui/rust-2018/try-macro.fixed b/src/test/ui/rust-2018/try-macro.fixed deleted file mode 100644 index 3308870f6..000000000 --- a/src/test/ui/rust-2018/try-macro.fixed +++ /dev/null @@ -1,18 +0,0 @@ -// Test that `try!` macros are rewritten. - -// run-rustfix -// check-pass - -#![warn(rust_2018_compatibility)] -#![allow(dead_code)] -#![allow(deprecated)] - -fn foo() -> Result { - let x: Result = Ok(22); - r#try!(x); - //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this is accepted in the current edition - Ok(44) -} - -fn main() {} diff --git a/src/test/ui/rust-2018/try-macro.rs b/src/test/ui/rust-2018/try-macro.rs deleted file mode 100644 index 69e87a1ff..000000000 --- a/src/test/ui/rust-2018/try-macro.rs +++ /dev/null @@ -1,18 +0,0 @@ -// Test that `try!` macros are rewritten. - -// run-rustfix -// check-pass - -#![warn(rust_2018_compatibility)] -#![allow(dead_code)] -#![allow(deprecated)] - -fn foo() -> Result { - let x: Result = Ok(22); - try!(x); - //~^ WARNING `try` is a keyword in the 2018 edition - //~| WARNING this is accepted in the current edition - Ok(44) -} - -fn main() {} diff --git a/src/test/ui/rust-2018/try-macro.stderr b/src/test/ui/rust-2018/try-macro.stderr deleted file mode 100644 index 760378f09..000000000 --- a/src/test/ui/rust-2018/try-macro.stderr +++ /dev/null @@ -1,17 +0,0 @@ -warning: `try` is a keyword in the 2018 edition - --> $DIR/try-macro.rs:12:5 - | -LL | try!(x); - | ^^^ help: you can use a raw identifier to stay compatible: `r#try` - | - = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! - = note: for more information, see issue #49716 -note: the lint level is defined here - --> $DIR/try-macro.rs:6:9 - | -LL | #![warn(rust_2018_compatibility)] - | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: `#[warn(keyword_idents)]` implied by `#[warn(rust_2018_compatibility)]` - -warning: 1 warning emitted - diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs deleted file mode 100644 index 678b4774d..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.rs +++ /dev/null @@ -1,21 +0,0 @@ -// edition:2018 - -// This test is similar to `ambiguity-macros.rs`, but nested in a module. - -#![allow(non_camel_case_types)] - -mod foo { - pub use std::io; - //~^ ERROR `std` is ambiguous - - macro_rules! m { - () => { - mod std { - pub struct io; - } - } - } - m!(); -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr deleted file mode 100644 index 7e008d465..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros-nested.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0659]: `std` is ambiguous - --> $DIR/ambiguity-macros-nested.rs:8:13 - | -LL | pub use std::io; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources - = note: `std` could refer to a built-in crate - = help: use `::std` to refer to this crate unambiguously -note: `std` could also refer to the module defined here - --> $DIR/ambiguity-macros-nested.rs:13:13 - | -LL | / mod std { -LL | | pub struct io; -LL | | } - | |_____________^ -... -LL | m!(); - | ---- in this macro invocation - = help: use `self::std` to refer to this module unambiguously - = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.rs b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.rs deleted file mode 100644 index 56ea726d7..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.rs +++ /dev/null @@ -1,19 +0,0 @@ -// edition:2018 - -// This test is similar to `ambiguity.rs`, but with macros defining local items. - -#![allow(non_camel_case_types)] - -use std::io; -//~^ ERROR `std` is ambiguous - -macro_rules! m { - () => { - mod std { - pub struct io; - } - } -} -m!(); - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr deleted file mode 100644 index 771d2c10c..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-macros.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error[E0659]: `std` is ambiguous - --> $DIR/ambiguity-macros.rs:7:5 - | -LL | use std::io; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources - = note: `std` could refer to a built-in crate - = help: use `::std` to refer to this crate unambiguously -note: `std` could also refer to the module defined here - --> $DIR/ambiguity-macros.rs:12:9 - | -LL | / mod std { -LL | | pub struct io; -LL | | } - | |_________^ -... -LL | m!(); - | ---- in this macro invocation - = help: use `crate::std` to refer to this module unambiguously - = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.rs b/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.rs deleted file mode 100644 index 50c8fc822..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.rs +++ /dev/null @@ -1,16 +0,0 @@ -// edition:2018 - -// This test is similar to `ambiguity.rs`, but nested in a module. - -#![allow(non_camel_case_types)] - -mod foo { - pub use std::io; - //~^ ERROR `std` is ambiguous - - mod std { - pub struct io; - } -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr deleted file mode 100644 index defb16f79..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity-nested.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0659]: `std` is ambiguous - --> $DIR/ambiguity-nested.rs:8:13 - | -LL | pub use std::io; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources - = note: `std` could refer to a built-in crate - = help: use `::std` to refer to this crate unambiguously -note: `std` could also refer to the module defined here - --> $DIR/ambiguity-nested.rs:11:5 - | -LL | / mod std { -LL | | pub struct io; -LL | | } - | |_____^ - = help: use `self::std` to refer to this module unambiguously - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity.rs b/src/test/ui/rust-2018/uniform-paths/ambiguity.rs deleted file mode 100644 index 60f77a1c6..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity.rs +++ /dev/null @@ -1,12 +0,0 @@ -// edition:2018 - -#![allow(non_camel_case_types)] - -use std::io; -//~^ ERROR `std` is ambiguous - -mod std { - pub struct io; -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr b/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr deleted file mode 100644 index 2d735c7e3..000000000 --- a/src/test/ui/rust-2018/uniform-paths/ambiguity.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0659]: `std` is ambiguous - --> $DIR/ambiguity.rs:5:5 - | -LL | use std::io; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources - = note: `std` could refer to a built-in crate - = help: use `::std` to refer to this crate unambiguously -note: `std` could also refer to the module defined here - --> $DIR/ambiguity.rs:8:1 - | -LL | / mod std { -LL | | pub struct io; -LL | | } - | |_^ - = help: use `crate::std` to refer to this module unambiguously - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs b/src/test/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs deleted file mode 100644 index 4aa5d1870..000000000 --- a/src/test/ui/rust-2018/uniform-paths/auxiliary/cross-crate.rs +++ /dev/null @@ -1,5 +0,0 @@ -// edition:2018 - -pub use ignore as built_in_attr; -pub use u8 as built_in_type; -pub use rustfmt as tool_mod; diff --git a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-55779-extern-trait.rs b/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-55779-extern-trait.rs deleted file mode 100644 index 1ce9841c1..000000000 --- a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-55779-extern-trait.rs +++ /dev/null @@ -1 +0,0 @@ -pub trait Trait { fn no_op(&self); } diff --git a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596-2.rs b/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596-2.rs deleted file mode 100644 index db723075f..000000000 --- a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596-2.rs +++ /dev/null @@ -1 +0,0 @@ -pub extern crate core; diff --git a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs b/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs deleted file mode 100644 index bc010a3dd..000000000 --- a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-56596.rs +++ /dev/null @@ -1 +0,0 @@ -// Nothing here diff --git a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-87932-a.rs b/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-87932-a.rs deleted file mode 100644 index 8fd2d77be..000000000 --- a/src/test/ui/rust-2018/uniform-paths/auxiliary/issue-87932-a.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub trait Deserialize { - fn deserialize(); -} diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs deleted file mode 100644 index 3f5897901..000000000 --- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.rs +++ /dev/null @@ -1,20 +0,0 @@ -// edition:2018 - -mod my { - pub mod sub { - pub fn bar() {} - } -} - -mod sub { - pub fn bar() {} -} - -fn foo() { - use my::sub; - { - use sub::bar; //~ ERROR `sub` is ambiguous - } -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr deleted file mode 100644 index 3d45a8140..000000000 --- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow-nested.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0659]: `sub` is ambiguous - --> $DIR/block-scoped-shadow-nested.rs:16:13 - | -LL | use sub::bar; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources -note: `sub` could refer to the module imported here - --> $DIR/block-scoped-shadow-nested.rs:14:9 - | -LL | use my::sub; - | ^^^^^^^ -note: `sub` could also refer to the module defined here - --> $DIR/block-scoped-shadow-nested.rs:9:1 - | -LL | / mod sub { -LL | | pub fn bar() {} -LL | | } - | |_^ - = help: use `crate::sub` to refer to this module unambiguously - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.rs b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.rs deleted file mode 100644 index 828ee4fe4..000000000 --- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.rs +++ /dev/null @@ -1,21 +0,0 @@ -// edition:2018 - -#![allow(non_camel_case_types)] - -enum Foo {} - -struct std; - -fn main() { - enum Foo { A, B } - use Foo::*; - //~^ ERROR `Foo` is ambiguous - - let _ = (A, B); - - fn std() {} - enum std {} - use std as foo; - //~^ ERROR `std` is ambiguous - //~| ERROR `std` is ambiguous -} diff --git a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr b/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr deleted file mode 100644 index b068312ce..000000000 --- a/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.stderr +++ /dev/null @@ -1,60 +0,0 @@ -error[E0659]: `Foo` is ambiguous - --> $DIR/block-scoped-shadow.rs:11:9 - | -LL | use Foo::*; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources -note: `Foo` could refer to the enum defined here - --> $DIR/block-scoped-shadow.rs:10:5 - | -LL | enum Foo { A, B } - | ^^^^^^^^^^^^^^^^^ -note: `Foo` could also refer to the enum defined here - --> $DIR/block-scoped-shadow.rs:5:1 - | -LL | enum Foo {} - | ^^^^^^^^^^^ - = help: use `crate::Foo` to refer to this enum unambiguously - -error[E0659]: `std` is ambiguous - --> $DIR/block-scoped-shadow.rs:18:9 - | -LL | use std as foo; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources -note: `std` could refer to the enum defined here - --> $DIR/block-scoped-shadow.rs:17:5 - | -LL | enum std {} - | ^^^^^^^^^^^ -note: `std` could also refer to the struct defined here - --> $DIR/block-scoped-shadow.rs:7:1 - | -LL | struct std; - | ^^^^^^^^^^^ - = help: use `crate::std` to refer to this struct unambiguously - -error[E0659]: `std` is ambiguous - --> $DIR/block-scoped-shadow.rs:18:9 - | -LL | use std as foo; - | ^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources -note: `std` could refer to the function defined here - --> $DIR/block-scoped-shadow.rs:16:5 - | -LL | fn std() {} - | ^^^^^^^^^^^ -note: `std` could also refer to the unit struct defined here - --> $DIR/block-scoped-shadow.rs:7:1 - | -LL | struct std; - | ^^^^^^^^^^^ - = help: use `crate::std` to refer to this unit struct unambiguously - -error: aborting due to 3 previous errors - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/cross-crate.rs b/src/test/ui/rust-2018/uniform-paths/cross-crate.rs deleted file mode 100644 index 0ca7fa37a..000000000 --- a/src/test/ui/rust-2018/uniform-paths/cross-crate.rs +++ /dev/null @@ -1,12 +0,0 @@ -// edition:2018 -// aux-build:cross-crate.rs - -extern crate cross_crate; -use cross_crate::*; - -#[built_in_attr] //~ ERROR cannot use a built-in attribute through an import -#[tool_mod::skip] //~ ERROR cannot use a tool module through an import - //~| ERROR cannot use a tool module through an import -fn main() { - let _: built_in_type; // OK -} diff --git a/src/test/ui/rust-2018/uniform-paths/cross-crate.stderr b/src/test/ui/rust-2018/uniform-paths/cross-crate.stderr deleted file mode 100644 index 45f77a0c9..000000000 --- a/src/test/ui/rust-2018/uniform-paths/cross-crate.stderr +++ /dev/null @@ -1,38 +0,0 @@ -error: cannot use a built-in attribute through an import - --> $DIR/cross-crate.rs:7:3 - | -LL | #[built_in_attr] - | ^^^^^^^^^^^^^ - | -note: the built-in attribute imported here - --> $DIR/cross-crate.rs:5:5 - | -LL | use cross_crate::*; - | ^^^^^^^^^^^^^^ - -error: cannot use a tool module through an import - --> $DIR/cross-crate.rs:8:3 - | -LL | #[tool_mod::skip] - | ^^^^^^^^ - | -note: the tool module imported here - --> $DIR/cross-crate.rs:5:5 - | -LL | use cross_crate::*; - | ^^^^^^^^^^^^^^ - -error: cannot use a tool module through an import - --> $DIR/cross-crate.rs:8:3 - | -LL | #[tool_mod::skip] - | ^^^^^^^^ - | -note: the tool module imported here - --> $DIR/cross-crate.rs:5:5 - | -LL | use cross_crate::*; - | ^^^^^^^^^^^^^^ - -error: aborting due to 3 previous errors - diff --git a/src/test/ui/rust-2018/uniform-paths/deadlock.rs b/src/test/ui/rust-2018/uniform-paths/deadlock.rs deleted file mode 100644 index 2427bde6d..000000000 --- a/src/test/ui/rust-2018/uniform-paths/deadlock.rs +++ /dev/null @@ -1,8 +0,0 @@ -// edition:2018 -// compile-flags:--extern foo --extern bar - -use bar::foo; //~ ERROR can't find crate for `bar` -use foo::bar; //~ ERROR can't find crate for `foo` -//~^^ ERROR unresolved imports `bar::foo`, `foo::bar` - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/deadlock.stderr b/src/test/ui/rust-2018/uniform-paths/deadlock.stderr deleted file mode 100644 index 8b9863948..000000000 --- a/src/test/ui/rust-2018/uniform-paths/deadlock.stderr +++ /dev/null @@ -1,24 +0,0 @@ -error[E0463]: can't find crate for `bar` - --> $DIR/deadlock.rs:4:5 - | -LL | use bar::foo; - | ^^^ can't find crate - -error[E0463]: can't find crate for `foo` - --> $DIR/deadlock.rs:5:5 - | -LL | use foo::bar; - | ^^^ can't find crate - -error[E0432]: unresolved imports `bar::foo`, `foo::bar` - --> $DIR/deadlock.rs:4:5 - | -LL | use bar::foo; - | ^^^^^^^^ -LL | use foo::bar; - | ^^^^^^^^ - -error: aborting due to 3 previous errors - -Some errors have detailed explanations: E0432, E0463. -For more information about an error, try `rustc --explain E0432`. diff --git a/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs b/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs deleted file mode 100644 index c6525869b..000000000 --- a/src/test/ui/rust-2018/uniform-paths/fn-local-enum.rs +++ /dev/null @@ -1,13 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 - -fn main() { - enum E { A, B, C } - - use E::*; - match A { - A => {} - B => {} - C => {} - } -} diff --git a/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs b/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs deleted file mode 100644 index 9af520a07..000000000 --- a/src/test/ui/rust-2018/uniform-paths/from-decl-macro.rs +++ /dev/null @@ -1,12 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 - -#![feature(decl_macro)] - -macro check() { - ::std::vec::Vec::::new() -} - -fn main() { - check!(); -} diff --git a/src/test/ui/rust-2018/uniform-paths/issue-54253.rs b/src/test/ui/rust-2018/uniform-paths/issue-54253.rs deleted file mode 100644 index 7db469945..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-54253.rs +++ /dev/null @@ -1,17 +0,0 @@ -// edition:2018 - -// Dummy import that previously introduced uniform path canaries. -use std; - -// fn version() -> &'static str {""} - -mod foo { - // Error wasn't reported, despite `version` being commented out above. - use crate::version; //~ ERROR unresolved import `crate::version` - - fn bar() { - version(); - } -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr b/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr deleted file mode 100644 index adde63590..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-54253.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0432]: unresolved import `crate::version` - --> $DIR/issue-54253.rs:10:9 - | -LL | use crate::version; - | ^^^^^^^^^^^^^^ no `version` in the root - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/rust-2018/uniform-paths/issue-55779.rs b/src/test/ui/rust-2018/uniform-paths/issue-55779.rs deleted file mode 100644 index 0af17a89b..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-55779.rs +++ /dev/null @@ -1,29 +0,0 @@ -// run-pass -// edition:2018 -// aux-crate:issue_55779_extern_trait=issue-55779-extern-trait.rs - -use issue_55779_extern_trait::Trait; - -struct Local; -struct Helper; - -impl Trait for Local { - fn no_op(&self) - { - // (Unused) extern crate declaration necessary to reproduce bug - extern crate issue_55779_extern_trait; - - // This one works - // impl Trait for Helper { fn no_op(&self) { } } - - // This one infinite-loops - const _IMPL_SERIALIZE_FOR_HELPER: () = { - // (extern crate can also appear here to reproduce bug, - // as in originating example from serde) - impl Trait for Helper { fn no_op(&self) { } } - }; - - } -} - -fn main() { } diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs b/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs deleted file mode 100644 index 9ea7e496d..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-56596-2.rs +++ /dev/null @@ -1,11 +0,0 @@ -// check-pass -// edition:2018 -// compile-flags: --extern issue_56596_2 -// aux-build:issue-56596-2.rs - -mod m { - use core::any; - pub use issue_56596_2::*; -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.rs b/src/test/ui/rust-2018/uniform-paths/issue-56596.rs deleted file mode 100644 index ec5bb656a..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-56596.rs +++ /dev/null @@ -1,12 +0,0 @@ -// edition:2018 -// compile-flags: --extern issue_56596 -// aux-build:issue-56596.rs - -mod m { - pub mod issue_56596 {} -} - -use m::*; -use issue_56596; //~ ERROR `issue_56596` is ambiguous - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr b/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr deleted file mode 100644 index 8b8ab26dc..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-56596.stderr +++ /dev/null @@ -1,19 +0,0 @@ -error[E0659]: `issue_56596` is ambiguous - --> $DIR/issue-56596.rs:10:5 - | -LL | use issue_56596; - | ^^^^^^^^^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources - = note: `issue_56596` could refer to a crate passed with `--extern` - = help: use `::issue_56596` to refer to this crate unambiguously -note: `issue_56596` could also refer to the module imported here - --> $DIR/issue-56596.rs:9:5 - | -LL | use m::*; - | ^^^^ - = help: use `crate::issue_56596` to refer to this module unambiguously - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0659`. diff --git a/src/test/ui/rust-2018/uniform-paths/issue-87932.rs b/src/test/ui/rust-2018/uniform-paths/issue-87932.rs deleted file mode 100644 index 70a641d8a..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-87932.rs +++ /dev/null @@ -1,15 +0,0 @@ -// edition:2018 -// aux-crate:issue_87932_a=issue-87932-a.rs - -pub struct A {} - -impl issue_87932_a::Deserialize for A { - fn deserialize() { - extern crate issue_87932_a as _a; - } -} - -fn main() { - A::deserialize(); - //~^ ERROR no function or associated item named `deserialize` found for struct `A` -} diff --git a/src/test/ui/rust-2018/uniform-paths/issue-87932.stderr b/src/test/ui/rust-2018/uniform-paths/issue-87932.stderr deleted file mode 100644 index b52720ae3..000000000 --- a/src/test/ui/rust-2018/uniform-paths/issue-87932.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error[E0599]: no function or associated item named `deserialize` found for struct `A` in the current scope - --> $DIR/issue-87932.rs:13:8 - | -LL | pub struct A {} - | ------------ function or associated item `deserialize` not found for this struct -... -LL | A::deserialize(); - | ^^^^^^^^^^^ function or associated item not found in `A` - | - = help: items from traits can only be used if the trait is in scope -help: the following trait is implemented but not in scope; perhaps add a `use` for it: - | -LL | use ::deserialize::_a::Deserialize; - | - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/rust-2018/uniform-paths/macro-rules.rs b/src/test/ui/rust-2018/uniform-paths/macro-rules.rs deleted file mode 100644 index 2d9a6a9a9..000000000 --- a/src/test/ui/rust-2018/uniform-paths/macro-rules.rs +++ /dev/null @@ -1,43 +0,0 @@ -// edition:2018 - -#![feature(decl_macro)] - -mod m1 { - // Non-exported legacy macros are treated as `pub(crate)`. - macro_rules! legacy_macro { () => () } - - use legacy_macro as _; // OK - pub(crate) use legacy_macro as _; // OK - pub use legacy_macro as _; //~ ERROR `legacy_macro` is only public within the crate, and cannot be re-exported outside -} - -mod m2 { - macro_rules! legacy_macro { () => () } - - #[allow(non_camel_case_types)] - type legacy_macro = u8; - - // Legacy macro imports don't prevent names from other namespaces from being imported. - use legacy_macro as _; // OK -} - -mod m3 { - macro legacy_macro() {} - - fn f() { - macro_rules! legacy_macro { () => () } - - // Legacy macro imports create ambiguities with other names in the same namespace. - use legacy_macro as _; //~ ERROR `legacy_macro` is ambiguous - } -} - -mod exported { - // Exported legacy macros are treated as `pub`. - #[macro_export] - macro_rules! legacy_macro { () => () } - - pub use legacy_macro as _; // OK -} - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr b/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr deleted file mode 100644 index 9f8c928c3..000000000 --- a/src/test/ui/rust-2018/uniform-paths/macro-rules.stderr +++ /dev/null @@ -1,35 +0,0 @@ -error[E0364]: `legacy_macro` is only public within the crate, and cannot be re-exported outside - --> $DIR/macro-rules.rs:11:13 - | -LL | pub use legacy_macro as _; - | ^^^^^^^^^^^^^^^^^ - | -help: consider adding a `#[macro_export]` to the macro in the imported module - --> $DIR/macro-rules.rs:7:5 - | -LL | macro_rules! legacy_macro { () => () } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error[E0659]: `legacy_macro` is ambiguous - --> $DIR/macro-rules.rs:31:13 - | -LL | use legacy_macro as _; - | ^^^^^^^^^^^^ ambiguous name - | - = note: ambiguous because of multiple potential import sources -note: `legacy_macro` could refer to the macro defined here - --> $DIR/macro-rules.rs:28:9 - | -LL | macro_rules! legacy_macro { () => () } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: `legacy_macro` could also refer to the macro defined here - --> $DIR/macro-rules.rs:25:5 - | -LL | macro legacy_macro() {} - | ^^^^^^^^^^^^^^^^^^^^^^^ - = help: use `self::legacy_macro` to refer to this macro unambiguously - -error: aborting due to 2 previous errors - -Some errors have detailed explanations: E0364, E0659. -For more information about an error, try `rustc --explain E0364`. diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs deleted file mode 100644 index 44da71de0..000000000 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.rs +++ /dev/null @@ -1,21 +0,0 @@ -// edition:2018 - -// Built-in attribute -use inline as imported_inline; -mod builtin { - pub use inline as imported_inline; -} - -// Tool module -use rustfmt as imported_rustfmt; -mod tool_mod { - pub use rustfmt as imported_rustfmt; -} - -#[imported_inline] //~ ERROR cannot use a built-in attribute through an import -#[builtin::imported_inline] //~ ERROR cannot use a built-in attribute through an import -#[imported_rustfmt::skip] //~ ERROR cannot use a tool module through an import - //~| ERROR cannot use a tool module through an import -#[tool_mod::imported_rustfmt::skip] //~ ERROR cannot use a tool module through an import - //~| ERROR cannot use a tool module through an import -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr deleted file mode 100644 index 908bb4985..000000000 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail-2.stderr +++ /dev/null @@ -1,68 +0,0 @@ -error: cannot use a built-in attribute through an import - --> $DIR/prelude-fail-2.rs:15:3 - | -LL | #[imported_inline] - | ^^^^^^^^^^^^^^^ - | -note: the built-in attribute imported here - --> $DIR/prelude-fail-2.rs:4:5 - | -LL | use inline as imported_inline; - | ^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: cannot use a built-in attribute through an import - --> $DIR/prelude-fail-2.rs:16:3 - | -LL | #[builtin::imported_inline] - | ^^^^^^^^^^^^^^^^^^^^^^^^ - -error: cannot use a tool module through an import - --> $DIR/prelude-fail-2.rs:17:3 - | -LL | #[imported_rustfmt::skip] - | ^^^^^^^^^^^^^^^^ - | -note: the tool module imported here - --> $DIR/prelude-fail-2.rs:10:5 - | -LL | use rustfmt as imported_rustfmt; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: cannot use a tool module through an import - --> $DIR/prelude-fail-2.rs:19:13 - | -LL | #[tool_mod::imported_rustfmt::skip] - | ^^^^^^^^^^^^^^^^ - | -note: the tool module imported here - --> $DIR/prelude-fail-2.rs:12:13 - | -LL | pub use rustfmt as imported_rustfmt; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: cannot use a tool module through an import - --> $DIR/prelude-fail-2.rs:17:3 - | -LL | #[imported_rustfmt::skip] - | ^^^^^^^^^^^^^^^^ - | -note: the tool module imported here - --> $DIR/prelude-fail-2.rs:10:5 - | -LL | use rustfmt as imported_rustfmt; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: cannot use a tool module through an import - --> $DIR/prelude-fail-2.rs:19:13 - | -LL | #[tool_mod::imported_rustfmt::skip] - | ^^^^^^^^^^^^^^^^ - | -note: the tool module imported here - --> $DIR/prelude-fail-2.rs:12:13 - | -LL | pub use rustfmt as imported_rustfmt; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 6 previous errors - diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs b/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs deleted file mode 100644 index 48c33d720..000000000 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail.rs +++ /dev/null @@ -1,6 +0,0 @@ -// edition:2018 - -// Tool attribute -use rustfmt::skip as imported_rustfmt_skip; //~ ERROR unresolved import `rustfmt` - -fn main() {} diff --git a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr b/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr deleted file mode 100644 index 97d4c7367..000000000 --- a/src/test/ui/rust-2018/uniform-paths/prelude-fail.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0432]: unresolved import `rustfmt` - --> $DIR/prelude-fail.rs:4:5 - | -LL | use rustfmt::skip as imported_rustfmt_skip; - | ^^^^^^^ `rustfmt` is a tool module, not a module - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0432`. diff --git a/src/test/ui/rust-2018/uniform-paths/prelude.rs b/src/test/ui/rust-2018/uniform-paths/prelude.rs deleted file mode 100644 index 65763614c..000000000 --- a/src/test/ui/rust-2018/uniform-paths/prelude.rs +++ /dev/null @@ -1,22 +0,0 @@ -// build-pass (FIXME(62277): could be check-pass?) -// edition:2018 - -// Macro imported with `#[macro_use] extern crate` -use vec as imported_vec; - -// Standard library prelude -use Vec as ImportedVec; - -// Built-in type -use u8 as imported_u8; - -// Built-in macro -use env as env_imported; - -type A = imported_u8; - -fn main() { - imported_vec![0]; - ImportedVec::::new(); - env_imported!("PATH"); -} diff --git a/src/test/ui/rust-2018/uniform-paths/redundant.rs b/src/test/ui/rust-2018/uniform-paths/redundant.rs deleted file mode 100644 index fd7fc7fbd..000000000 --- a/src/test/ui/rust-2018/uniform-paths/redundant.rs +++ /dev/null @@ -1,20 +0,0 @@ -// run-pass -// edition:2018 - -use std; -use std::io; - -mod foo { - pub use std as my_std; -} - -mod bar { - pub use std::{self}; -} - -fn main() { - let _ = io::stdout(); - let _ = self::std::io::stdout(); - let _ = foo::my_std::io::stdout(); - let _ = bar::std::io::stdout(); -} diff --git a/src/test/ui/rust-2018/unresolved-asterisk-imports.rs b/src/test/ui/rust-2018/unresolved-asterisk-imports.rs deleted file mode 100644 index ad1064570..000000000 --- a/src/test/ui/rust-2018/unresolved-asterisk-imports.rs +++ /dev/null @@ -1,6 +0,0 @@ -// edition:2018 - -use not_existing_crate::*; //~ ERROR unresolved import `not_existing_crate -use std as foo; - -fn main() {} diff --git a/src/test/ui/rust-2018/unresolved-asterisk-imports.stderr b/src/test/ui/rust-2018/unresolved-asterisk-imports.stderr deleted file mode 100644 index 09e9edc63..000000000 --- a/src/test/ui/rust-2018/unresolved-asterisk-imports.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0432]: unresolved import `not_existing_crate` - --> $DIR/unresolved-asterisk-imports.rs:3:5 - | -LL | use not_existing_crate::*; - | ^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `not_existing_crate` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0432`. -- cgit v1.2.3