Skip to content

Commit 688c79f

Browse files
committed
tidy
1 parent eb8bde5 commit 688c79f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: tests/ui/lint/dangling-pointers-from-temporaries/issue123613.stderr renamed to tests/ui/lint/dangling-pointers-from-temporaries/example-from-issue123613.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: getting a pointer from a temporary `String` will result in a dangling pointer
2-
--> $DIR/issue123613.rs:5:48
2+
--> $DIR/example-from-issue123613.rs:5:48
33
|
44
LL | let str1 = String::with_capacity(MAX_PATH).as_mut_ptr();
55
| ------------------------------- ^^^^^^^^^^ this pointer will immediately be invalid
@@ -9,13 +9,13 @@ LL | let str1 = String::with_capacity(MAX_PATH).as_mut_ptr();
99
= note: pointers do not have a lifetime; when calling `as_mut_ptr` the `String` will be deallocated at the end of the statement because nothing is referencing it as far as the type system is concerned
1010
= help: for more information, see https://doc.rust-lang.org/reference/destructors.html
1111
note: the lint level is defined here
12-
--> $DIR/issue123613.rs:1:9
12+
--> $DIR/example-from-issue123613.rs:1:9
1313
|
1414
LL | #![deny(dangling_pointers_from_temporaries)]
1515
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1616

1717
error: getting a pointer from a temporary `String` will result in a dangling pointer
18-
--> $DIR/issue123613.rs:7:70
18+
--> $DIR/example-from-issue123613.rs:7:70
1919
|
2020
LL | let str2 = String::from("TotototototototototototototototototoT").as_ptr();
2121
| ----------------------------------------------------- ^^^^^^ this pointer will immediately be invalid

0 commit comments

Comments
 (0)