]> git.lizzy.rs Git - rust.git/commitdiff
Fix unquoted projection types in label
authorEsteban Küber <esteban@kuber.com.ar>
Mon, 30 Jan 2023 22:02:30 +0000 (22:02 +0000)
committerEsteban Küber <esteban@kuber.com.ar>
Mon, 30 Jan 2023 22:02:30 +0000 (22:02 +0000)
compiler/rustc_middle/src/ty/error.rs
tests/ui/generic-associated-types/collections-project-default.stderr

index d188199773a5dc201f73a8c24dbda23435c1702f..bd78705cdb59b59c875c765dd30c319f70d27d0d 100644 (file)
@@ -195,7 +195,7 @@ fn report_maybe_different(expected: &str, found: &str) -> String {
             )
             .into(),
             ProjectionMismatched(ref values) => format!(
-                "expected {}, found {}",
+                "expected `{}`, found `{}`",
                 tcx.def_path_str(values.expected),
                 tcx.def_path_str(values.found)
             )
index 9aa0b239e4786f252dd0e4234422b76396ec73ff..3c3ae24dd473094ed225b55e3e67baee7f7fb2ae 100644 (file)
@@ -5,7 +5,7 @@ LL | fn floatify_sibling<C>(ints: &C) -> <C as Collection<i32>>::Sibling<f32>
    |                                     ------------------------------------ expected `<C as Collection<i32>>::Sibling<f32>` because of return type
 ...
 LL |     res
-   |     ^^^ expected Collection::Sibling, found CollectionFamily::Member
+   |     ^^^ expected `Collection::Sibling`, found `CollectionFamily::Member`
    |
    = note: expected associated type `<C as Collection<i32>>::Sibling<f32>`
               found associated type `<<C as Collection<i32>>::Family as CollectionFamily>::Member<f32>`