Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update more 2024 tests to remove -Zunstable-options #133584

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/doctest/doctest-output-include-fail.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//@ edition:2024
//@ compile-flags:--test --test-args=--test-threads=1 -Z unstable-options
//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
Expand Down
2 changes: 1 addition & 1 deletion tests/rustdoc-ui/doctest/doctest-output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//@[edition2015]compile-flags:--test --test-args=--test-threads=1
//@[edition2024]edition:2015
//@[edition2024]aux-build:extern_macros.rs
//@[edition2024]compile-flags:--test --test-args=--test-threads=1 -Z unstable-options
//@[edition2024]compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//@[edition2015]compile-flags:--test --test-args=--test-threads=1
//@[edition2024]edition:2024
//@[edition2024]check-pass
//@[edition2024]compile-flags:--test --test-args=--test-threads=1 -Z unstable-options
//@[edition2024]compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/coroutine/async-gen-deduce-yield.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ compile-flags: --edition 2024 -Zunstable-options
//@ compile-flags: --edition 2024
//@ check-pass

#![feature(async_iterator, gen_blocks)]
Expand Down
2 changes: 1 addition & 1 deletion tests/ui/coroutine/async-gen-yield-ty-is-unit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//@ compile-flags: --edition 2024 -Zunstable-options
//@ compile-flags: --edition 2024
//@ check-pass

#![feature(async_iterator, gen_blocks, noop_waker)]
Expand Down
1 change: 0 additions & 1 deletion tests/ui/drop/drop_order.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//@ compile-flags: -Z validate-mir
//@ revisions: edition2021 edition2024
//@ [edition2021] edition: 2021
//@ [edition2024] compile-flags: -Z unstable-options
//@ [edition2024] edition: 2024

#![feature(let_chains)]
Expand Down
6 changes: 3 additions & 3 deletions tests/ui/drop/lint-if-let-rescope-gated.edition2021.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: `if let` assigns a shorter lifetime since Edition 2024
--> $DIR/lint-if-let-rescope-gated.rs:27:8
--> $DIR/lint-if-let-rescope-gated.rs:26:8
|
LL | if let Some(_value) = Droppy.get() {
| ^^^^^^^^^^^^^^^^^^^------^^^^^^
Expand All @@ -9,12 +9,12 @@ LL | if let Some(_value) = Droppy.get() {
= warning: this changes meaning in Rust 2024
= note: for more information, see issue #124085 </~https://github.com/rust-lang/rust/issues/124085>
help: the value is now dropped here in Edition 2024
--> $DIR/lint-if-let-rescope-gated.rs:31:5
--> $DIR/lint-if-let-rescope-gated.rs:30:5
|
LL | } else {
| ^
note: the lint level is defined here
--> $DIR/lint-if-let-rescope-gated.rs:11:9
--> $DIR/lint-if-let-rescope-gated.rs:10:9
|
LL | #![deny(if_let_rescope)]
| ^^^^^^^^^^^^^^
Expand Down
1 change: 0 additions & 1 deletion tests/ui/drop/lint-if-let-rescope-gated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//@ revisions: edition2021 edition2024
//@ [edition2021] edition: 2021
//@ [edition2024] edition: 2024
//@ [edition2024] compile-flags: -Zunstable-options
//@ [edition2024] check-pass

#![deny(if_let_rescope)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0716]: temporary value dropped while borrowed
--> $DIR/tail-expr-drop-order-negative.rs:9:15
--> $DIR/tail-expr-drop-order-negative.rs:8:15
|
LL | x.replace(std::cell::RefCell::new(123).borrow()).is_some()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
Expand Down
1 change: 0 additions & 1 deletion tests/ui/drop/tail-expr-drop-order-negative.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ revisions: edition2021 edition2024
//@ [edition2024] compile-flags: -Zunstable-options
//@ [edition2024] edition: 2024
//@ [edition2021] check-pass

Expand Down
1 change: 0 additions & 1 deletion tests/ui/editions/never-type-fallback-breaking.e2021.fixed
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
//@[e2021] edition: 2021
//@[e2024] edition: 2024
//@[e2024] compile-flags: -Zunstable-options
//
//@[e2021] run-pass
//@[e2021] run-rustfix
Expand Down
12 changes: 6 additions & 6 deletions tests/ui/editions/never-type-fallback-breaking.e2021.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
warning: this function depends on never type fallback being `()`
--> $DIR/never-type-fallback-breaking.rs:17:1
--> $DIR/never-type-fallback-breaking.rs:16:1
|
LL | fn m() {
| ^^^^^^
Expand All @@ -8,7 +8,7 @@ LL | fn m() {
= note: for more information, see issue #123748 </~https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: Default` will fail
--> $DIR/never-type-fallback-breaking.rs:21:17
--> $DIR/never-type-fallback-breaking.rs:20:17
|
LL | true => Default::default(),
| ^^^^^^^^^^^^^^^^^^
Expand All @@ -19,7 +19,7 @@ LL | let x: () = match true {
| ++++

warning: this function depends on never type fallback being `()`
--> $DIR/never-type-fallback-breaking.rs:29:1
--> $DIR/never-type-fallback-breaking.rs:28:1
|
LL | fn q() -> Option<()> {
| ^^^^^^^^^^^^^^^^^^^^
Expand All @@ -28,7 +28,7 @@ LL | fn q() -> Option<()> {
= note: for more information, see issue #123748 </~https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `!: Default` will fail
--> $DIR/never-type-fallback-breaking.rs:36:5
--> $DIR/never-type-fallback-breaking.rs:35:5
|
LL | deserialize()?;
| ^^^^^^^^^^^^^
Expand All @@ -38,7 +38,7 @@ LL | deserialize::<()>()?;
| ++++++

warning: this function depends on never type fallback being `()`
--> $DIR/never-type-fallback-breaking.rs:46:1
--> $DIR/never-type-fallback-breaking.rs:45:1
|
LL | fn meow() -> Result<(), ()> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand All @@ -47,7 +47,7 @@ LL | fn meow() -> Result<(), ()> {
= note: for more information, see issue #123748 </~https://github.com/rust-lang/rust/issues/123748>
= help: specify the types explicitly
note: in edition 2024, the requirement `(): From<!>` will fail
--> $DIR/never-type-fallback-breaking.rs:49:5
--> $DIR/never-type-fallback-breaking.rs:48:5
|
LL | help(1)?;
| ^^^^^^^
Expand Down
10 changes: 5 additions & 5 deletions tests/ui/editions/never-type-fallback-breaking.e2024.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0277]: the trait bound `!: Default` is not satisfied
--> $DIR/never-type-fallback-breaking.rs:21:17
--> $DIR/never-type-fallback-breaking.rs:20:17
|
LL | true => Default::default(),
| ^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `!`
Expand All @@ -8,21 +8,21 @@ LL | true => Default::default(),
= help: did you intend to use the type `()` here instead?

error[E0277]: the trait bound `!: Default` is not satisfied
--> $DIR/never-type-fallback-breaking.rs:36:5
--> $DIR/never-type-fallback-breaking.rs:35:5
|
LL | deserialize()?;
| ^^^^^^^^^^^^^ the trait `Default` is not implemented for `!`
|
= note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 </~https://github.com/rust-lang/rust/issues/48950> for more information)
= help: did you intend to use the type `()` here instead?
note: required by a bound in `deserialize`
--> $DIR/never-type-fallback-breaking.rs:32:23
--> $DIR/never-type-fallback-breaking.rs:31:23
|
LL | fn deserialize<T: Default>() -> Option<T> {
| ^^^^^^^ required by this bound in `deserialize`

error[E0277]: the trait bound `(): From<!>` is not satisfied
--> $DIR/never-type-fallback-breaking.rs:49:5
--> $DIR/never-type-fallback-breaking.rs:48:5
|
LL | help(1)?;
| ^^^^^^^ the trait `From<!>` is not implemented for `()`
Expand All @@ -39,7 +39,7 @@ LL | help(1)?;
and 4 others
= note: required for `!` to implement `Into<()>`
note: required by a bound in `help`
--> $DIR/never-type-fallback-breaking.rs:43:20
--> $DIR/never-type-fallback-breaking.rs:42:20
|
LL | fn help<'a: 'a, T: Into<()>, U>(_: U) -> Result<T, ()> {
| ^^^^^^^^ required by this bound in `help`
Expand Down
1 change: 0 additions & 1 deletion tests/ui/editions/never-type-fallback-breaking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
//@[e2021] edition: 2021
//@[e2024] edition: 2024
//@[e2024] compile-flags: -Zunstable-options
//
//@[e2021] run-pass
//@[e2021] run-rustfix
Expand Down
1 change: 0 additions & 1 deletion tests/ui/editions/never-type-fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
//
//@[e2021] edition: 2021
//@[e2024] edition: 2024
//@[e2024] compile-flags: -Zunstable-options
//
//@ run-pass
//@ check-run-results
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
//@[e2021] edition:2021
//@[e2024] edition:2024

//@[e2024] compile-flags: -Zunstable-options

fn main() {
println!("hello");
}
8 changes: 4 additions & 4 deletions tests/ui/impl-trait/variance.e2024.stderr
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
error: ['a: *, 'a: o]
--> $DIR/variance.rs:14:36
--> $DIR/variance.rs:13:36
|
LL | fn not_captured_early<'a: 'a>() -> impl Sized {}
| ^^^^^^^^^^

error: ['a: *, 'a: o]
--> $DIR/variance.rs:19:32
--> $DIR/variance.rs:18:32
|
LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: ['a: o]
--> $DIR/variance.rs:21:40
--> $DIR/variance.rs:20:40
|
LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
| ^^^^^^^^^^

error: ['a: o]
--> $DIR/variance.rs:26:36
--> $DIR/variance.rs:25:36
|
LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/impl-trait/variance.new.stderr
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
error: ['a: *, 'a: o]
--> $DIR/variance.rs:14:36
--> $DIR/variance.rs:13:36
|
LL | fn not_captured_early<'a: 'a>() -> impl Sized {}
| ^^^^^^^^^^

error: ['a: *, 'a: o]
--> $DIR/variance.rs:19:32
--> $DIR/variance.rs:18:32
|
LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: ['a: o]
--> $DIR/variance.rs:21:40
--> $DIR/variance.rs:20:40
|
LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
| ^^^^^^^^^^

error: ['a: o]
--> $DIR/variance.rs:26:36
--> $DIR/variance.rs:25:36
|
LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
8 changes: 4 additions & 4 deletions tests/ui/impl-trait/variance.old.stderr
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
error: ['a: *]
--> $DIR/variance.rs:14:36
--> $DIR/variance.rs:13:36
|
LL | fn not_captured_early<'a: 'a>() -> impl Sized {}
| ^^^^^^^^^^

error: ['a: *, 'a: o]
--> $DIR/variance.rs:19:32
--> $DIR/variance.rs:18:32
|
LL | fn captured_early<'a: 'a>() -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^

error: []
--> $DIR/variance.rs:21:40
--> $DIR/variance.rs:20:40
|
LL | fn not_captured_late<'a>(_: &'a ()) -> impl Sized {}
| ^^^^^^^^^^

error: ['a: o]
--> $DIR/variance.rs:26:36
--> $DIR/variance.rs:25:36
|
LL | fn captured_late<'a>(_: &'a ()) -> impl Sized + Captures<'a> {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
1 change: 0 additions & 1 deletion tests/ui/impl-trait/variance.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ revisions: old new e2024
//@[e2024] edition: 2024
//@[e2024] compile-flags: -Z unstable-options

#![cfg_attr(new, feature(lifetime_capture_rules_2024))]

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/lifetimes/raw/gen-lt.e2024.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error: lifetimes cannot use keyword names
--> $DIR/gen-lt.rs:11:11
--> $DIR/gen-lt.rs:10:11
|
LL | fn gen_lt<'gen>() {}
| ^^^^
Expand Down
1 change: 0 additions & 1 deletion tests/ui/lifetimes/raw/gen-lt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

//@[e2021] edition:2021
//@[e2024] edition:2024
//@[e2024] compile-flags: -Zunstable-options

//@[e2021] check-pass

Expand Down
2 changes: 1 addition & 1 deletion tests/ui/lifetimes/refcell-in-tail-expr.edition2021.stderr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0597]: `cell` does not live long enough
--> $DIR/refcell-in-tail-expr.rs:10:27
--> $DIR/refcell-in-tail-expr.rs:9:27
|
LL | let cell = std::cell::RefCell::new(0u8);
| ---- binding `cell` declared here
Expand Down
1 change: 0 additions & 1 deletion tests/ui/lifetimes/refcell-in-tail-expr.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//@ revisions: edition2021 edition2024
//@ [edition2021] edition: 2021
//@ [edition2024] edition: 2024
//@ [edition2024] compile-flags: -Zunstable-options
//@ [edition2024] check-pass

fn main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
error[E0597]: `c` does not live long enough
--> $DIR/shorter-tail-expr-lifetime.rs:8:5
--> $DIR/shorter-tail-expr-lifetime.rs:7:5
|
LL | let c = std::cell::RefCell::new("..");
| - binding `c` declared here
Expand Down
1 change: 0 additions & 1 deletion tests/ui/lifetimes/shorter-tail-expr-lifetime.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ revisions: edition2021 edition2024
//@ [edition2024] compile-flags: -Zunstable-options
//@ [edition2024] edition: 2024
//@ [edition2024] run-pass

Expand Down
1 change: 0 additions & 1 deletion tests/ui/lifetimes/tail-expr-lock-poisoning.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ revisions: edition2021 edition2024
//@ ignore-wasm no panic or subprocess support
//@ [edition2024] compile-flags: -Zunstable-options
//@ [edition2024] edition: 2024
//@ run-pass
//@ needs-unwind
Expand Down
1 change: 0 additions & 1 deletion tests/ui/lifetimes/temporary-lifetime-extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
//@ revisions: edition2021 edition2024
//@ [edition2021] edition: 2021
//@ [edition2024] edition: 2024
//@ [edition2024] compile-flags: -Z unstable-options

fn temp() -> (String, i32) {
(String::from("Hello"), 1)
Expand Down
Loading
Loading