mirror of https://github.com/rust-lang/rust.git
53 lines
2.1 KiB
Plaintext
53 lines
2.1 KiB
Plaintext
error: relative drop order changing in Rust 2024
|
|
--> $DIR/lint-tail-expr-drop-order-borrowck.rs:9:15
|
|
|
|
|
LL | let _ = { String::new().as_str() }.len();
|
|
| ^^^^^^^^^^^^^ --- borrow later used by call
|
|
| |
|
|
| this temporary value will be dropped at the end of the block
|
|
|
|
|
= warning: this changes meaning in Rust 2024
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
|
|
note: the lint level is defined here
|
|
--> $DIR/lint-tail-expr-drop-order-borrowck.rs:6:9
|
|
|
|
|
LL | #![deny(tail_expr_drop_order)]
|
|
| ^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error: relative drop order changing in Rust 2024
|
|
--> $DIR/lint-tail-expr-drop-order-borrowck.rs:19:16
|
|
|
|
|
LL | f(unsafe { String::new().as_str() }.len());
|
|
| ^^^^^^^^^^^^^ --- borrow later used by call
|
|
| |
|
|
| this temporary value will be dropped at the end of the block
|
|
|
|
|
= warning: this changes meaning in Rust 2024
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
|
|
|
|
error: relative drop order changing in Rust 2024
|
|
--> $DIR/lint-tail-expr-drop-order-borrowck.rs:31:9
|
|
|
|
|
LL | &mut || 0
|
|
| ^^^^^^^^^
|
|
| |
|
|
| this temporary value will be dropped at the end of the block
|
|
| borrow later used here
|
|
|
|
|
= warning: this changes meaning in Rust 2024
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
|
|
|
|
error: relative drop order changing in Rust 2024
|
|
--> $DIR/lint-tail-expr-drop-order-borrowck.rs:43:9
|
|
|
|
|
LL | g({ &f() });
|
|
| - ^^^^ this temporary value will be dropped at the end of the block
|
|
| |
|
|
| borrow later used by call
|
|
|
|
|
= warning: this changes meaning in Rust 2024
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/temporary-tail-expr-scope.html>
|
|
|
|
error: aborting due to 4 previous errors
|
|
|