Skip to content

Commit f4cd3cd

Browse files
committed
Relocate issues/issue-53348.rs to type/deref-string-assign.rs
1 parent ca5f6b9 commit f4cd3cd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/ui/issues/issue-53348.rs renamed to tests/ui/type/assign-deref-string-to-string.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
//! Regression test for issue https://github.com/rust-lang/rust/issues/53348
2+
//! Test that attempting to assign a dereferenced `String` (which is `str`)
3+
//! to a `String` variable correctly results in a mismatched types error (E0308).
4+
15
fn main() {
26
let mut v = vec!["hello", "this", "is", "a", "test"];
37

48
let v2 = Vec::new();
59

6-
v.into_iter().map(|s|s.to_owned()).collect::<Vec<_>>();
10+
v.into_iter().map(|s| s.to_owned()).collect::<Vec<_>>();
711

812
let mut a = String::new(); //~ NOTE expected due to this value
913
for i in v {

tests/ui/issues/issue-53348.stderr renamed to tests/ui/type/assign-deref-string-to-string.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0308]: mismatched types
2-
--> $DIR/issue-53348.rs:10:13
2+
--> $DIR/assign-deref-string-to-string.rs:14:13
33
|
44
LL | let mut a = String::new();
55
| ------------- expected due to this value

0 commit comments

Comments
 (0)