about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-02-12 20:26:35 +0000
committerbors <bors@rust-lang.org>2025-02-12 20:26:35 +0000
commitef148cd7eb00a5a973130dc6473da71fd6c487ee (patch)
treed355ad9542f2c7b39e7ab32b08b8b670869ebbcd /tests/ui
parentced8e650cddbafad92094b2c89dee97b8a807d9c (diff)
parent8567fbb4b5b5153a7789d7eb76a8a46700183a1c (diff)
downloadrust-ef148cd7eb00a5a973130dc6473da71fd6c487ee.tar.gz
rust-ef148cd7eb00a5a973130dc6473da71fd6c487ee.zip
Auto merge of #136943 - GuillaumeGomez:rollup-amtd3mq, r=GuillaumeGomez
Rollup of 10 pull requests

Successful merges:

 - #136758 (tests: `-Copt-level=3` instead of `-O` in assembly tests)
 - #136761 (tests: `-Copt-level=3` instead of `-O` in codegen tests)
 - #136784 (Nuke `Buffer` abstraction from `librustdoc`, take 2 💣)
 - #136838 (Check whole `Unsize` predicate for escaping bound vars)
 - #136848 (add docs and ut for bootstrap util cache)
 - #136871 (dev-guide: Link to `t-lang` procedures for new features)
 - #136890 (Change swap_nonoverlapping from lang to library UB)
 - #136901 (compiler: give `ExternAbi` truly stable `Hash` and `Ord`)
 - #136907 (compiler: Make middle errors `pub(crate)` and bury the dead code)
 - #136916 (use cc archiver as default in `cc2ar`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/symbol-names/basic.legacy.stderr4
-rw-r--r--tests/ui/symbol-names/issue-60925.legacy.stderr4
-rw-r--r--tests/ui/traits/unsize-goal-escaping-bounds.current.stderr19
-rw-r--r--tests/ui/traits/unsize-goal-escaping-bounds.rs22
4 files changed, 45 insertions, 4 deletions
diff --git a/tests/ui/symbol-names/basic.legacy.stderr b/tests/ui/symbol-names/basic.legacy.stderr
index 2f26c0cf0d3..167262dcf06 100644
--- a/tests/ui/symbol-names/basic.legacy.stderr
+++ b/tests/ui/symbol-names/basic.legacy.stderr
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN5basic4main17h144191e1523a280eE)
+error: symbol-name(_ZN5basic4main17hc88b9d80a69d119aE)
   --> $DIR/basic.rs:8:1
    |
 LL | #[rustc_symbol_name]
    | ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(basic::main::h144191e1523a280e)
+error: demangling(basic::main::hc88b9d80a69d119a)
   --> $DIR/basic.rs:8:1
    |
 LL | #[rustc_symbol_name]
diff --git a/tests/ui/symbol-names/issue-60925.legacy.stderr b/tests/ui/symbol-names/issue-60925.legacy.stderr
index cc79cc8b516..4e17bdc4577 100644
--- a/tests/ui/symbol-names/issue-60925.legacy.stderr
+++ b/tests/ui/symbol-names/issue-60925.legacy.stderr
@@ -1,10 +1,10 @@
-error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17h71f988fda3b6b180E)
+error: symbol-name(_ZN11issue_609253foo37Foo$LT$issue_60925..llv$u6d$..Foo$GT$3foo17hbddb77d6f71afb32E)
   --> $DIR/issue-60925.rs:21:9
    |
 LL |         #[rustc_symbol_name]
    |         ^^^^^^^^^^^^^^^^^^^^
 
-error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::h71f988fda3b6b180)
+error: demangling(issue_60925::foo::Foo<issue_60925::llvm::Foo>::foo::hbddb77d6f71afb32)
   --> $DIR/issue-60925.rs:21:9
    |
 LL |         #[rustc_symbol_name]
diff --git a/tests/ui/traits/unsize-goal-escaping-bounds.current.stderr b/tests/ui/traits/unsize-goal-escaping-bounds.current.stderr
new file mode 100644
index 00000000000..e63a0bf50b7
--- /dev/null
+++ b/tests/ui/traits/unsize-goal-escaping-bounds.current.stderr
@@ -0,0 +1,19 @@
+error[E0277]: the trait bound `for<'a> (): Unsize<(dyn Trait + 'a)>` is not satisfied
+  --> $DIR/unsize-goal-escaping-bounds.rs:20:5
+   |
+LL |     foo();
+   |     ^^^^^ the trait `for<'a> Unsize<(dyn Trait + 'a)>` is not implemented for `()`
+   |
+   = note: all implementations of `Unsize` are provided automatically by the compiler, see <https://doc.rust-lang.org/stable/std/marker/trait.Unsize.html> for more information
+note: required by a bound in `foo`
+  --> $DIR/unsize-goal-escaping-bounds.rs:15:17
+   |
+LL | fn foo()
+   |    --- required by a bound in this function
+LL | where
+LL |     for<'a> (): Unsize<dyn Trait + 'a>,
+   |                 ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/unsize-goal-escaping-bounds.rs b/tests/ui/traits/unsize-goal-escaping-bounds.rs
new file mode 100644
index 00000000000..fb25f7a4239
--- /dev/null
+++ b/tests/ui/traits/unsize-goal-escaping-bounds.rs
@@ -0,0 +1,22 @@
+//@ revisions: current next
+//@[next] compile-flags: -Znext-solver
+//@[next] check-pass
+//@ ignore-compare-mode-next-solver (explicit revisions)
+
+#![feature(unsize)]
+
+use std::marker::Unsize;
+
+trait Trait {}
+impl Trait for () {}
+
+fn foo()
+where
+    for<'a> (): Unsize<dyn Trait + 'a>,
+{
+}
+
+fn main() {
+    foo();
+    //[current]~^ ERROR the trait bound `for<'a> (): Unsize<(dyn Trait + 'a)>` is not satisfied
+}