about summary refs log tree commit diff
path: root/tests/ui/sized
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-04-14 10:26:59 -0400
committerMichael Goulet <michael@errs.io>2024-04-15 18:48:12 -0400
commit619e0441784126defd42454ec1949e0a4dd0e4fa (patch)
treebbdb9bf20c75054ed9cce1706fc290bdd0630279 /tests/ui/sized
parent3493a56529b3f972205f2cdda920132deef4b475 (diff)
downloadrust-619e0441784126defd42454ec1949e0a4dd0e4fa.tar.gz
rust-619e0441784126defd42454ec1949e0a4dd0e4fa.zip
Fix pretty hir for anon consts in diagnostics
Diffstat (limited to 'tests/ui/sized')
-rw-r--r--tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs2
-rw-r--r--tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr4
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs
index 5c96c653df5..196da30b864 100644
--- a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs
+++ b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs
@@ -3,5 +3,5 @@ fn main() {
 //~^ ERROR expected a pattern, found an expression
 //~| ERROR cannot find type `T` in this scope
 //~| ERROR const and type arguments are not allowed on builtin type `str`
-//~| ERROR expected unit struct, unit variant or constant, found associated function `str<, T>::as_bytes`
+//~| ERROR expected unit struct, unit variant or constant, found associated function `str<
 }
diff --git a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr
index d62c019a1e1..8df0613695b 100644
--- a/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr
+++ b/tests/ui/sized/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.stderr
@@ -24,7 +24,9 @@ LL -     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;
 LL +     let str::as_bytes;
    |
 
-error[E0533]: expected unit struct, unit variant or constant, found associated function `str<, T>::as_bytes`
+error[E0533]: expected unit struct, unit variant or constant, found associated function `str<{
+                      fn str() { let (/*ERROR*/); }
+                  }, T>::as_bytes`
   --> $DIR/ensure-overriding-bindings-in-pattern-with-ty-err-doesnt-ice.rs:2:9
    |
 LL |     let str::<{fn str() { let str::T>>::as_bytes; }}, T>::as_bytes;