diff options
author | Esteban Küber <esteban@kuber.com.ar> | 2023-01-06 19:21:47 +0000 |
---|---|---|
committer | Esteban Küber <esteban@kuber.com.ar> | 2023-01-30 20:12:21 +0000 |
commit | 153ed09fb3a0e7ed8d42749720e8a0b4fac50d74 (patch) | |
tree | 27ebdb0d446b0d3718c83ce08eb8dab909e88eba /tests/ui/suggestions | |
parent | ab8dc9a0adedcee75a217ea0d60709fe38269768 (diff) |
Tweak use of trimmed paths
Diffstat (limited to 'tests/ui/suggestions')
-rw-r--r-- | tests/ui/suggestions/remove-as_str.stderr | 2 | ||||
-rw-r--r-- | tests/ui/suggestions/suggest-using-chars.rs | 4 | ||||
-rw-r--r-- | tests/ui/suggestions/suggest-using-chars.stderr | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/ui/suggestions/remove-as_str.stderr b/tests/ui/suggestions/remove-as_str.stderr index cb618db704d..534c497780a 100644 --- a/tests/ui/suggestions/remove-as_str.stderr +++ b/tests/ui/suggestions/remove-as_str.stderr @@ -4,7 +4,7 @@ error[E0599]: no method named `as_str` found for reference `&str` in the current LL | s.as_str(); | -^^^^^^-- help: remove this method call -error[E0599]: no method named `as_str` found for reference `&str` in the current scope +error[E0599]: no method named `as_str` found for reference `&'a str` in the current scope --> $DIR/remove-as_str.rs:7:7 | LL | s.as_str(); diff --git a/tests/ui/suggestions/suggest-using-chars.rs b/tests/ui/suggestions/suggest-using-chars.rs index 29750a20199..95732881baf 100644 --- a/tests/ui/suggestions/suggest-using-chars.rs +++ b/tests/ui/suggestions/suggest-using-chars.rs @@ -1,6 +1,6 @@ pub fn main() { - let _ = "foo".iter(); //~ ERROR no method named `iter` found for reference `&str` in the current scope - let _ = "foo".foo(); //~ ERROR no method named `foo` found for reference `&str` in the current scope + let _ = "foo".iter(); //~ ERROR no method named `iter` found for reference `&'static str` in the current scope + let _ = "foo".foo(); //~ ERROR no method named `foo` found for reference `&'static str` in the current scope let _ = String::from("bar").iter(); //~ ERROR no method named `iter` found for struct `String` in the current scope let _ = (&String::from("bar")).iter(); //~ ERROR no method named `iter` found for reference `&String` in the current scope let _ = 0.iter(); //~ ERROR no method named `iter` found for type `{integer}` in the current scope diff --git a/tests/ui/suggestions/suggest-using-chars.stderr b/tests/ui/suggestions/suggest-using-chars.stderr index 57b0e866f84..ba80ec6a201 100644 --- a/tests/ui/suggestions/suggest-using-chars.stderr +++ b/tests/ui/suggestions/suggest-using-chars.stderr @@ -1,4 +1,4 @@ -error[E0599]: no method named `iter` found for reference `&str` in the current scope +error[E0599]: no method named `iter` found for reference `&'static str` in the current scope --> $DIR/suggest-using-chars.rs:2:19 | LL | let _ = "foo".iter(); @@ -9,7 +9,7 @@ help: because of the in-memory representation of `&str`, to obtain an `Iterator` LL | let _ = "foo".chars(); | ~~~~~ -error[E0599]: no method named `foo` found for reference `&str` in the current scope +error[E0599]: no method named `foo` found for reference `&'static str` in the current scope --> $DIR/suggest-using-chars.rs:3:19 | LL | let _ = "foo".foo(); |